40 JMultipleFileScanner<Evt> inputFile;
48 JParser<> zap(
"Example program to determine speed of PMT router.");
53 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
58 catch(
const exception& error) {
59 FATAL(error.what() << endl);
69 load(detectorFile, detector);
71 catch(
const JException& error) {
75 const JPMTRouter router(detector);
81 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
82 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
83 zmap[pmt->getID()] = module->getLocation();
89 JRange_t floor = JRange_t::DEFAULT_RANGE;
90 JRange_t
string = JRange_t::DEFAULT_RANGE;
92 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
93 floor .
include(module->getFloor());
94 string.
include(module->getString());
97 NOTICE(
"String " <<
string.getLowerLimit() <<
" - " <<
string.getUpperLimit() << endl);
98 NOTICE(
"Floor " << floor .getLowerLimit() <<
" - " << floor .getUpperLimit() << endl);
104 string.getLength() + 1,
105 string.getLowerLimit() - 0.5,
106 string.getUpperLimit() + 0.5,
107 floor.getLength() + 1,
108 floor.getLowerLimit() - 0.5,
109 floor.getUpperLimit() + 0.5);
112 string.getLength() + 1,
113 string.getLowerLimit() - 0.5,
114 string.getUpperLimit() + 0.5,
115 floor.getLength() + 1,
116 floor.getLowerLimit() - 0.5,
117 floor.getUpperLimit() + 0.5);
122 while (inputFile.hasNext()) {
124 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
126 const Evt*
event = inputFile.next();
132 const JModuleLocation& pos = zmap[hit->pmt_id];
134 h1.Fill((
double) pos.getString(), (double) pos.getFloor());
143 while (inputFile.hasNext()) {
145 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
147 const Evt*
event = inputFile.next();
153 const JModuleLocation& pos = router.getParentModule(hit->pmt_id);
155 h2.Fill((
double) pos.getString(), (double) pos.getFloor());