37{
   41 
   43 
   45  JLimit_t&      numberOfEvents = inputFile.getLimit();
 
   47  string         detectorFile;
   49  double         Wmin;
   50  double         Qmin;
   53 
   54  try { 
   55 
   56    JParser<> zap(
"Example program to histogram string and floor time difference.");
 
   57    
   62    zap[
'T'] = 
make_field(T_ns,   
"Time window for coincidences [ns]")                = 
JRange_t(-50.0, +200.0);
 
   63    zap[
'W'] = 
make_field(Wmin,   
"Minimal number of entries")                        = 10.0;
 
   64    zap[
'q'] = 
make_field(Qmin,   
"Minimal fraction of coincidences")                 =  0.5;
 
   67 
   68    zap(argc, argv);
   69  }
   70  catch(const exception& error) {
   71    FATAL(error.what() << endl);
 
   72  }
   73 
   74 
   76 
   77  try {
   79  }
   82  }
   83 
   85 
   87 
   89 
   91 
   93 
   95 
   97      buffer[router.getModule(*hit)].put(
getTime(*hit, router.getPMT(*hit)) + router.getModule(*hit).getZ() * getInverseSpeedOfLight());
 
   98    }
   99 
  100    if (buffer.size() >= 2u) {
  102        if (p->first.getString() == q->first.getString() && p->first.getFloor() + 1 == q->first.getFloor()) {
  103          H1[p->first]->Fill(q->second.getMean() - p->second.getMean());
  104        }
  105      }
  106    }
  107  }
  109 
  110 
  112 
  113  out << H1;
  114 
  115  out.Write();
  116  out.Close();
  117 
  118 
  119  int nin  = 0;
  120  int nout = 0;
  121 
  122  for (const auto& i : H1) {
  123    
  124    Double_t W = 0.0;
  125 
  126    TH1D* h1 = i.second;
  127 
  128    if (h1->GetSumOfWeights() > Wmin) {
  129 
  130      for (Int_t ix = 1; ix <= h1->GetXaxis()->GetNbins(); ++ix) {
  131 
  132        const Double_t 
x = h1->GetBinCenter (ix);
 
  133        const Double_t 
y = h1->GetBinContent(ix);
 
  134 
  135        if (T_ns(x)) {
  137        }
  138      }
  139 
  140      DEBUG(i.first << 
' ' << 
FIXED(6,0) << W << 
'/' << 
FIXED(6,0) << h1->GetSumOfWeights() << endl);
 
  141      
  142      if (W / h1->GetSumOfWeights() >= Qmin)
  143        nin  += 1;
  144      else
  145        nout += 1;
  146    }
  147  }
  148 
  149  NOTICE(
"Number of modules out/in micro-sync " << nout << 
'/' << nin << endl);
 
  150 
  151  QAQC(nin << 
' ' << nout << endl);
 
  152 
  153  return 0;
  154}
#define DEBUG(A)
Message macros.
 
#define QAQC(A)
QA/QC output macro.
 
int qaqc
QA/QC file descriptor.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
 
Utility class to parse command line options.
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
 
General purpose class for object reading from a list of file names.
 
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).
 
const char * getTime()
Get current local time conform ISO-8601 standard.
 
KM3NeT DAQ data structures and auxiliaries.
 
Auxiliary data structure for floating point format specification.
 
Type definition of range.
 
Auxiliary class for defining the range of iterations of objects.
 
static counter_type max()
Get maximum counter value.