33{
37
39 JLimit_t& numberOfEvents = inputFile.getLimit();
41 string detectorFile;
42 string pmtFile;
43 double factor;
45
46 try {
47
48 JParser<> zap(
"Auxiliary program to monitor optical module response.");
49
56
57 zap(argc, argv);
58 }
59 catch(const exception& error) {
60 FATAL(error.what() << endl);
61 }
62
63
65
66 try {
68 }
71 }
72
73
75
76 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
77 zmap[i->getID()] = 0;
78 }
79
80
82
84
86
88 zmap[hit->getModuleID()] += 1;
89 }
90 }
92
93
95
96 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
97 Q.put(zmap[i->getID()]);
98 }
99
100 const double Rmin = factor * Q.getQuantile(0.5);
101
102 NOTICE(
"Minimal DOM count " << Rmin << endl);
103
104 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
106 << setw(3) << i->getString() << ' '
107 << setw(2) << i->getFloor() << ' '
108 << setw(8) << i->getID() << ' '
109 << setw(6) << zmap[i->getID()] << ' '
110 << (zmap[i->getID()] < Rmin ? "***" : "") << endl);
111 }
112
113
114 if (pmtFile != "") {
115
117
118 try {
119 parameters.
load(pmtFile.c_str());
120 }
122
123 for (JDetector::const_iterator i =
detector.begin(); i !=
detector.end(); ++i) {
124 if (zmap[i->getID()] < Rmin) {
127 }
128 }
129 }
130
131 parameters.
store(pmtFile.c_str());
132 }
133}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for map of PMT parameters.
Utility class to parse command line options.
Object reading from a list of files.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
void store(const char *file_name) const
Store to output file.
void load(const char *file_name)
Load from input file.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.