33 int main(
int argc,
char **argv)
46 JParser<> zap(
"Example program to determine speed of PMT router.");
51 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
56 catch(
const exception& error) {
57 FATAL(error.what() << endl);
76 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
77 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
78 zmap[pmt->getID()] = module->getLocation();
84 JRange_t floor = JRange_t::DEFAULT_RANGE;
85 JRange_t string = JRange_t::DEFAULT_RANGE;
87 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
88 floor .
include(module->getFloor());
89 string.
include(module->getString());
92 NOTICE(
"String " <<
string.getLowerLimit() <<
" - " <<
string.getUpperLimit() << endl);
93 NOTICE(
"Floor " << floor .getLowerLimit() <<
" - " << floor .getUpperLimit() << endl);
99 string.getLength() + 1,
100 string.getLowerLimit() - 0.5,
101 string.getUpperLimit() + 0.5,
102 floor.getLength() + 1,
103 floor.getLowerLimit() - 0.5,
104 floor.getUpperLimit() + 0.5);
107 string.getLength() + 1,
108 string.getLowerLimit() - 0.5,
109 string.getUpperLimit() + 0.5,
110 floor.getLength() + 1,
111 floor.getLowerLimit() - 0.5,
112 floor.getUpperLimit() + 0.5);
117 while (inputFile.hasNext()) {
119 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
121 const Evt*
event = inputFile.next();
127 const JLocation& pos = zmap[hit->pmt_id];
138 while (inputFile.hasNext()) {
140 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
142 const Evt*
event = inputFile.next();
Router for direct addressing of PMT data in detector data structure.
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
int getFloor() const
Get floor number.
void print(std::ostream &out, const JScale_t scale=milli_t) const
Print timer data.
Data structure for detector geometry and calibration.
Auxiliary class for defining the range of iterations of objects.
Type definition of range.
Logical location of module.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const JModule & getParentModule(const JObjectID &id) const
Get parent module.
Auxiliary class for CPU timing and usage.
Direct access to PMT in detector data structure.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.