68{
   72 
   74  JLimit_t&      numberOfEvents = inputFile.getLimit();
 
   77 
   78  try { 
   79 
   80    JParser<> zap(
"Example program to histogram UTC profiles.");
 
   81    
   86    
   87    zap(argc, argv);
   88  }
   89  catch(const exception& error) {
   90    FATAL(error.what() << endl);
 
   91  }
   92 
   93 
   95 
   97  
  100  }
  101 
  102  if (N == 0) { 
  103    FATAL(
"Number of time slices in file(s) " << N << endl);
 
  104  }
  105 
  106  const Long64_t NX   = in.getEntry(N-1)->getFrameIndex()  -  in.getEntry(0)->getFrameIndex()  +  1;
  107  const Double_t 
xmin = (Double_t) in.getEntry( 0 )->getFrameIndex() - 0.5;
 
  108  const Double_t 
xmax = (Double_t) in.getEntry(N-1)->getFrameIndex() + 0.5;
 
  109 
  110 
  112 
  113  TH1D h0("UTC",  NULL, NX, xmin, xmax);
  114  TH1D h1("!utc", NULL, NX, xmin, xmax);
  115  TH1D h2("dt",   NULL, 1001, -500.5, +500.5);
  116 
  117 
  118  const int        frame_index =         in.getEntry(0)->getFrameIndex();
  119  const JUTCTime_t t0          = 
getTime(in.getEntry(0)->getTimesliceStart());
 
  120  
  121  for (in.rewind(); in.hasNext() && in.getCounter() != numberOfEvents.
getUpperLimit(); ) {
 
  122 
  123    STATUS(
"event: " << setw(10) << in.getCounter() << 
'\r'); 
DEBUG(endl);
 
  124 
  126 
  129 
  131 
  133 
  134    for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
  135 
  136      if (utc != frame->getTimesliceStart()) {
  137        h1.Fill(x);
  138      }
  139 
  140      h2.Fill(
getTime(frame->getTimesliceStart()) - t1);
 
  141    }
  142  }
  144 
  145  out.Write();
  146  out.Close();
  147}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
Template definition for direct access of elements in ROOT TChain.
 
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
 
int getFrameIndex() const
Get frame index.
 
Data structure for UTC time.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Long64_t counter_type
Type definition for counter.
 
const char * getTime()
Get current local time conform ISO-8601 standard.
 
KM3NeT DAQ data structures and auxiliaries.
 
Auxiliary class for defining the range of iterations of objects.
 
static counter_type max()
Get maximum counter value.