32 int main(
int argc, 
char **argv)
 
   38   JSingleFileScanner<JDAQEvent> inputFile;
 
   48     JParser<> zap(
"Auxiliary program to monitor optical module response.");
 
   52     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   59   catch(
const exception& error) {
 
   60     FATAL(error.what() << endl);
 
   70     load(detectorFile, detector);
 
   72   catch(
const JException& error) {
 
   79   for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
 
   84   while (inputFile.hasNext()) {
 
   86     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
   91       zmap[hit->getModuleID()] += 1;
 
   97   JQuantile Q(
"DOM", 1);
 
   99   for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
 
  100     Q.put(zmap[i->getID()]);
 
  103   const double Rmin = factor * Q.getQuantile(0.5);
 
  105   NOTICE(
"Minimal DOM count " << Rmin << endl);
 
  107   for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
 
  109            << setw(3) << i->getString()   << 
' ' 
  110            << setw(2) << i->getFloor()    << 
' ' 
  111            << setw(8) << i->getID()       << 
' ' 
  112            << setw(6) << zmap[i->getID()] << 
' ' 
  113            << (zmap[i->getID()] < Rmin ? 
"***" : 
"") << endl);
 
  119     JPMTParametersMap parameters;
 
  122       parameters.load(pmtFile.c_str());
 
  124     catch(
const JException& error) {}
 
  126     for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
 
  127       if (zmap[i->getID()] < Rmin) {
 
  129           parameters[JPMTIdentifier(i->getID(), pmt)].QE = 0.0;
 
  134     parameters.store(pmtFile.c_str());