28 int main(
int argc,
char **argv)
33 typedef JRange<double> JRange_t;
54 catch(
const exception &error) {
55 FATAL(error.what() << endl);
58 using namespace KM3NETDAQ;
65 catch(
const JException& error) {
70 FATAL(
"Empty detector." << endl);
76 const int ny = number_of_strings * number_of_floors;
79 TFile*
in = TFile::Open(inputFile.c_str(),
"read");
82 FATAL(
"No data in inputfile " << inputFile << endl);
89 const string key = i->first;
90 const JRange_t
range = i->second;
94 100, range.first, range.second);
103 for (
size_t dom = 0; dom !=
detector.size(); ++dom) {
105 const JModule& module =
detector.at(dom);
113 const int iy = (module.getString() - 1) * number_of_floors + module.getFloor();
117 const double value = p1->GetBinContent(pmt+1);
121 h2.SetBinContent(pmt+1, iy, value);
127 h1.GetXaxis()->SetTitle(key.c_str());
128 h1.GetYaxis()->SetTitle(
"PMTs");
130 h2.GetXaxis()->SetTitle(
"PMT DAQ index");
132 for (
size_t dom = 0; dom !=
detector.size(); ++dom) {
134 const JModule& module =
detector.at(dom);
137 << setw(3) << setfill(
'0') << module.getString() <<
' '
138 << setw(2) << setfill(
'0') << module.getFloor()));
141 h2.GetZaxis()->SetTitle(key.c_str());
Utility class to parse command line options.
int main(int argc, char *argv[])
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
#define MAKE_CSTRING(A)
Make C-string.
Data structure for detector geometry and calibration.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
General purpose messaging.
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Auxiliary class to define a range between two values.
Utility class to parse command line options.
do set_variable DETECTOR_TXT $WORKDIR detector
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in