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);
79 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
80 for (JModule::const_iterator
pmt = module->begin();
pmt != module->end(); ++
pmt) {
81 zmap[
pmt->
getID()] = module->getLocation();
87 JRange_t floor = JRange_t::DEFAULT_RANGE;
88 JRange_t string = JRange_t::DEFAULT_RANGE;
90 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
91 floor .
include(module->getFloor());
92 string.
include(module->getString());
95 NOTICE(
"String " <<
string.getLowerLimit() <<
" - " <<
string.getUpperLimit() << endl);
96 NOTICE(
"Floor " << floor .getLowerLimit() <<
" - " << floor .getUpperLimit() << endl);
102 string.getLength() + 1,
103 string.getLowerLimit() - 0.5,
104 string.getUpperLimit() + 0.5,
105 floor.getLength() + 1,
106 floor.getLowerLimit() - 0.5,
107 floor.getUpperLimit() + 0.5);
110 string.getLength() + 1,
111 string.getLowerLimit() - 0.5,
112 string.getUpperLimit() + 0.5,
113 floor.getLength() + 1,
114 floor.getLowerLimit() - 0.5,
115 floor.getUpperLimit() + 0.5);
120 while (inputFile.hasNext()) {
122 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
124 const Evt*
event = inputFile.next();
130 const JLocation& pos = zmap[hit->pmt_id];
141 while (inputFile.hasNext()) {
143 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
145 const Evt*
event = inputFile.next();
Router for direct addressing of PMT data in detector data structure.
Utility class to parse command line options.
ROOT TTree parameter settings.
int getFloor() const
Get floor number.
void print(std::ostream &out, const JScale_t scale=milli_t) const
Print timer data.
then for HISTOGRAM in h0 h1
Data structure for detector geometry and calibration.
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
Auxiliary class for defining the range of iterations of objects.
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.
int getID() const
Get identifier.
Auxiliary class for CPU timing and usage.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
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...
JRange< Double_t > JRange_t
int getString() const
Get string number.
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.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])