67{
   71 
   75 
   76  try { 
   77 
   78    JParser<> zap(
"Example program to test hit coincidence building with user data."\
 
   79                  "\nformat: -u \"(<PMT> <time> <time-over-threshold>)+\"");
   80    
   84    
   85    zap(argc, argv);
   86  }
   87  catch(const exception &error) {
   88    FATAL(error.what() << endl);
 
   89  }
   90 
   92 
   93 
   95  
   96  parameters.set();
   97  
   98  cout << parameters << endl;
   99 
  100  
  102 
  103  const JModule module = getModule<JKM3NeT_t>(1001);
 
  104  
  106 
  108  
  109  
  113  typedef JTimeslice   <hit_type>   JTimeslice_t;
  114  typedef JBuildL1     <hit_type>   JBuildL1_t;
  115  typedef JBuildL2     <hit_type>   JBuildL2_t;
  116 
  117  const JBuildL1_t buildL1(parameters);
  118  const JBuildL2_t buildL2(parameters.L2);
  119 
  121 
  122  
  124  
  126 
  127  frame.add(
data.size(), 
data.data());
 
  128 
  129  timeslice.push_back(frame);
  130 
  131  cout << timeslice << endl;
  132 
  133  timesliceRouter.configure(timeslice);
  134  
  135  const JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(timeslice[0], module);
  136 
  137  JTimeslice_t timesliceL0;
  138  JTimeslice_t timesliceL1;
  139  JTimeslice_t timesliceL2;
  140 
  141  timesliceL0.push_back(JSuperFrame1D_t(buffer));
  144 
  145  buildL1(buffer, back_inserter(timesliceL1[0]));
  146  buildL2(buffer, timesliceL1[0], back_inserter(timesliceL2[0]));
  147  
  148  print(cout, 
"Trigger L0", timesliceL0);
 
  149  print(cout, 
"Trigger L1", timesliceL1);
 
  150  print(cout, 
"Trigger L2", timesliceL2);
 
  151 
  154 
  155  cout << outputL1;
  156  cout << outputL2;
  157}
#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.
 
int getID() const
Get identifier.
 
Utility class to parse command line options.
 
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.
 
Data frame of one optical module.
 
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
KM3NeT DAQ data structures and auxiliaries.
 
void setDAQLongprint(const bool option)
Set DAQ print option.
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...