42{
   46 
   48 
   50 
   52  typedef JParallelFileScanner_t::multi_pointer_type               multi_pointer_type;
   53 
   54  JParallelFileScanner_t          inputFile;
   55  size_t                          numberOfEvents;
   57  string                          detectorFile;
   58  map_type                        selector;
   60 
   61  try { 
   62 
   63    JParser<> zap(
"Example program to select events based on hits in strings.");
 
   64    
   65    zap[
'f'] = 
make_field(inputFile,      
"input file (output of JXXXReconstruction.sh)");
 
   66    zap[
'n'] = 
make_field(numberOfEvents, 
"maximum number of selected events")
 
   67      = std::numeric_limits<size_t>::max();
   69      = "extract.root";
   70    zap[
'a'] = 
make_field(detectorFile,   
"detector file.");
 
   71    zap[
'S'] = 
make_field(selector,       
"selection: pairs of <string number> <minimum number of triggered hits>");
 
   73    
   76 
   77    zap(argc, argv);
   78  }
   79  catch(const exception& error) {
   80    FATAL(error.what() << endl);
 
   81  }
   82 
   83 
   85 
   86  if (detectorFile != "") {
   87 
   88    try {
   90    }
   93    }
   94 
   95  } else if (!selector.empty()) {
   96 
   97    FATAL(
"Missing detector file.");
 
   98  }
   99 
  101 
  102 
  104 
  106 
  108 
  110 
  111    STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  112 
  113    multi_pointer_type ps = inputFile.next();
  114 
  118 
  119    if (in->empty()) { continue; }
  120 
  121    if (mc.getEntries() != 0) {
  123    }
  124 
  125    bool status = selector.empty();
  126 
  127    if (!status) {
  128 
  130    
  132 
  134 
  135        const JPMTChannel& channel = router.getPMTChannel(*hit);
 
  136      
  138      }
  139     
  140      for (map_type::const_iterator i = selector.begin(); i != selector.end() && !status; ++i) {
  141        status = 
response[i->first] >= i->second;
 
  142      }
  143    }
  144 
  145    if (status) {
  146 
  147      if (event != NULL) {
  149      }
  152 
  154    }
  155  }
  157 
  158 
  160 
  161    STATUS(
"event: " << setw(10) << in.getCounter() << 
'\r'); 
DEBUG(endl);
 
  162 
  164    
  167    }
  168  }
  170 
  171 
  173 
  175 
  177}
#define DEBUG(A)
Message macros.
 
#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...
 
int getString() const
Get string number.
 
Auxiliary class to uniquely identify PMT readout channel.
 
Data structure for set of track fit results.
 
Utility class to parse command line options.
 
General purpose class for object reading from a list of file names.
 
General purpose class for parallel reading of objects from a single file or multiple files.
 
Template definition for direct access of elements in ROOT TChain.
 
int getRunNumber() const
Get run number.
 
int getFrameIndex() const
Get frame index.
 
const_iterator< T > end() const
Get end of data.
 
const_iterator< T > begin() const
Get begin of data.
 
JTriggerCounter_t getCounter() const
Get trigger counter.
 
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).
 
KM3NeT DAQ data structures and auxiliaries.
 
std::map< int, range_type > map_type
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
Auxiliary class for recursive type list generation.
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Auxiliary class to set-up Hit.