30{
34
36 JLimit_t& numberOfEvents = inputFile.getLimit();
37 string detectorFile;
39
40 try {
41
42 JParser<> zap(
"Example program to print DAQ events with associated information.");
43
48
49 zap(argc, argv);
50 }
51 catch(const exception& error) {
52 FATAL(error.what() << endl);
53 }
54
55
57
58 if (detectorFile != "") {
59
60 try {
62 }
65 }
66 }
67
69
70
72
74
76
77 summary.update(*tev);
78
79 cout <<
"Detector identifier " << tev->
getDetectorID() << endl;
83 cout <<
"Trigger counter " << tev->
getCounter() << endl;
84 cout <<
"Trigger mask (hex) " << hex << tev->
getTriggerMask() << dec << endl;
88 cout << endl;
89
90 cout << " module PMT TDC ToT trigger rate [kHz] serial x y z dx dy dz t0 status" << endl;
91 {
93
95
96 cout << setw(8) << hit->getModuleID() << ' '
97 << setw(2) << (int) hit->getPMT() << ' '
98 << setw(10) << (int) hit->getT() << ' '
99 << setw(3) << (int) hit->getToT() << ' '
100 << setw(10) << hex << hit->getTriggerMask() << dec;
101
102 if (summary.hasSummaryFrame(hit->getModuleID()))
103 cout <<
' ' <<
FIXED(9,2) << summary.getRate(
JDAQPMTIdentifier(hit->getModuleID(), hit->getPMT())) * 1.0e-3;
104 else
105 cout << ' ' << setw(9) << " ? ";
106
107 if (router.hasModule(hit->getModuleID())) {
108 cout <<
' ' << router.getPMT(
JPMTIdentifier(hit->getModuleID(), hit->getPMT()));
109 }
110
111 cout << endl;
112 }
113 }
114 cout << endl;
115
117
119
121
122 cout << setw(8) << hit->getModuleID() << ' '
123 << setw(2) << (int) hit->getPMT() << ' '
124 << setw(10) << (int) hit->getT() << ' '
125 << setw(3) << (int) hit->getToT() << ' '
126 << setw(10) << ' ';
127
128 if (summary.hasSummaryFrame(hit->getModuleID()))
129 cout <<
' ' <<
FIXED(9,2) << summary.getRate(
JDAQPMTIdentifier(hit->getModuleID(), hit->getPMT())) * 1.0e-3;
130 else
131 cout << ' ' << setw(9) << " ? ";
132
133 if (router.hasModule(hit->getModuleID())) {
134 cout <<
' ' << router.getPMT(
JPMTIdentifier(hit->getModuleID(), hit->getPMT()));
135 }
136
137 cout << endl;
138 }
139 }
140 cout << endl;
141 }
142}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Utility class to parse command line options.
File router for fast addressing of summary data.
Template definition for direct access of elements in ROOT TChain.
int getDetectorID() const
Get detector identifier.
int getRunNumber() const
Get run number.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
static JTriggerMask_t getTriggerMask(const JDAQTriggeredHit &hit)
Get trigger mask of given hit.
const_iterator< T > end() const
Get end of data.
unsigned int size() const
Get number of hits.
const_iterator< T > begin() const
Get begin of data.
JTriggerCounter_t getCounter() const
Get trigger counter.
JTriggerCounter_t next()
Increment 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.
Auxiliary data structure for floating point format specification.
Auxiliary class to set-up Hit.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.