50{
   54 
   56 
   59  JLimit_t&          numberOfEvents = inputFile.getLimit();
 
   60  string             detectorFile;
   62  bool               reuse_parameters;
   65 
   66  try { 
   67 
   68    JParser<> zap(
"Auxiliary program to re-process time slice data.");
 
   69    
   78 
   79    zap(argc, argv);
   80  }
   81  catch(const exception &error) {
   82    FATAL(error.what() << endl);
 
   83  }
   84 
   85 
   87 
   89  DEBUG(
"Reset time [ms] " << 
getRTS()       * 1e-6 << endl);
 
   90  DEBUG(
"Trigger"          << endl << parameters    << endl);
 
   91 
   93 
   94  try {
   96  }
   99  }
  100 
  101  if (reuse_parameters) {
  102 
  103    try {
  104 
  106 
  107      NOTICE(
"Set trigger parameters from input." << endl);
 
  108    }
  110      FATAL(
"No trigger parameters from input." << endl);
 
  111    }
  112  }
  113  
  114 
  115  if (parameters.disableHighRateVeto) {
  116 
  117    NOTICE(
"Disabling high-rate veto of all PMTs." << endl);
 
  118 
  120  }
  121  
  123 
  125 
  126  if (parameters.writeSummary()) { 
WARNING(
"Discard writeSummary option during reprocesing of data." << endl); }
 
  127 
  128  
  129  
  131 
  134  typedef JTimeslice   <hit_type>   JTimeslice_t;
  135  typedef JBuildL1     <hit_type>   JBuildL1_t;
  136  typedef JBuildL2     <hit_type>   JBuildL2_t;
  137 
  138  const JBuildL1_t buildL1(parameters);
  139  const JBuildL2_t buildL2(parameters.L2);
  140  const JBuildL2_t buildSN(parameters.SN);
  141 
  143 
  145 
  148  }
  149 
  152 
  154 
  156 
  157  for ( ; in.hasNext() && counter != inputFile.getLimit(); ++counter) {
  158 
  159    STATUS(
"event: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
  160 
  162 
  163    DEBUG(*timeslice << endl);
 
  164 
  165    timesliceRouter.configure(*timeslice);
  166 
  171    
  172    for (JDAQTimeslice::const_iterator super_frame = timeslice->begin(); super_frame != timeslice->end(); ++super_frame) {
  173 
  174      if (moduleRouter.hasModule(super_frame->getModuleID())) {
  175 
  176        
  177      
  178        const JModule&   module = moduleRouter.getModule(super_frame->getModuleID()); 
 
  179        JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*super_frame, module);
  180      
  181        
  182 
  183        buffer.applyHighRateVeto(parameters.highRateVeto_Hz);
  184 
  185        
  186      
  187        timesliceL0.push_back(JSuperFrame1D_t(buffer));
  188 
  189        
  190      
  191        timesliceL1.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
  192                                              super_frame->getModuleIdentifier(),
  194      
  195        buildL1(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
  196 
  197        
  198 
  199        timesliceL2.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
  200                                              super_frame->getModuleIdentifier(),
  202 
  203        buildL2(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
  204 
  205        
  206 
  207        timesliceSN.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
  208                                              super_frame->getModuleIdentifier(),
  210 
  211        buildSN(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceSN.rbegin()));
  212      }
  213    }
  214 
  215    if (parameters.writeL0()) {
  217    }
  218 
  219    if (parameters.writeL1()) {
  221    }
  222 
  223    if (parameters.writeL2()) {
  225    }
  226 
  227    if (parameters.writeSN()) {
  229    }
  230  }
  232 
  234 
  236 
  238}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Router for direct addressing of module data in detector data structure.
 
Data structure for a composite optical module.
 
const JPosition3D & getPosition() const
Get position.
 
Auxiliary class for multiplexing object iterators.
 
Utility class to parse command line options.
 
Object reading from a list of files.
 
1-dimensional frame with time calibrated data from one optical module.
 
2-dimensional frame with time calibrated data from one optical module.
 
Auxiliary class to build JDAQTimeslice for L1 timeslice.
 
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
double getMaximalDistance(const JDetector &detector, const bool option=false)
Get maximal distance between modules in detector.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
std::set< JROOTClassSelector > getROOTClassSelection(const bool option=false)
Get ROOT class selection.
 
Long64_t counter_type
Type definition for counter.
 
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
 
KM3NeT DAQ data structures and auxiliaries.
 
double getFrameTime()
Get frame time duration.
 
void setDAQLongprint(const bool option)
Set DAQ print option.
 
double getRTS()
Get TDC dynamic range.
 
static const int HIGH_RATE_VETO_DISABLE
Enable (disable) use of high-rate veto test if this status bit is 0 (1);.
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Auxiliary class to select ROOT class based on class name.
 
Auxiliary class for defining the range of iterations of objects.
 
static counter_type max()
Get maximum counter value.
 
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...