31 int main(
int argc, 
char **argv)
 
   37   JMultipleFileScanner<JDAQEvent> inputFile;
 
   45     JParser<> zap(
"Example program to histogram string and floor hits.");
 
   50     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   55   catch(
const exception& error) {
 
   56     FATAL(error.what() << endl);
 
   68     load(detectorFile, detector);
 
   70   catch(
const JException& error) {
 
   74   const JDAQHitRouter router(detector);
 
   79   const JRange_t string(detector.begin(), detector.end(), &JModule::getString);
 
   80   const JRange_t floor (detector.begin(), detector.end(), &JModule::getFloor);
 
   82   NOTICE(
"String  " << 
string.getLowerLimit() << 
" - " << 
string.getUpperLimit() << endl);
 
   83   NOTICE(
"Floor   " << floor .getLowerLimit() << 
" - " << floor .getUpperLimit() << endl);
 
   88   TH1D h1(
"h1", NULL, 100, 0.0, 1.0e1);
 
   90           string.getLength() + 1,
 
   91           string.getLowerLimit() - 0.5,
 
   92           string.getUpperLimit() + 0.5,
 
   93           floor.getLength() + 1,
 
   94           floor.getLowerLimit() - 0.5,
 
   95           floor.getUpperLimit() + 0.5);
 
   98   while (inputFile.hasNext()) {
 
  100     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  110       const JPMTChannel& channel = router.getPMTChannel(*hit);
 
  112       h2.Fill((
double) channel.getString(), (double) channel.getFloor());
 
  114       tx.include(
getTime(*hit, router.getPMT(*hit)));
 
  117     h1.Fill(tx.getLength() * 1.0e-3);