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 << "TTree counter " << in.getCounter() << endl;
80 cout <<
"Detector identifier " << tev->
getDetectorID() << endl;
84 cout <<
"Trigger counter " << tev->
getCounter() << endl;
85 cout <<
"Trigger mask (hex) " << hex << tev->
getTriggerMask() << dec << endl;
89 cout << endl;
90
91 cout << " module PMT TDC ToT trigger rate [kHz] status location serial x y z dx dy dz t0 status t1" << endl;
92 {
94
96
97 cout << setw(8) << hit->getModuleID() << ' '
98 << setw(2) << (int) hit->getPMT() << ' '
99 << setw(10) << (int) hit->getT() << ' '
100 << setw(3) << (int) hit->getToT() << ' '
101 << setw(10) << hex << hit->getTriggerMask() << dec;
102
103 if (summary.hasSummaryFrame(hit->getModuleID()))
104 cout <<
' ' <<
FIXED(9,2) << summary.getRate(
JDAQPMTIdentifier(hit->getModuleID(), hit->getPMT())) * 1.0e-3 << setw(6) <<
' '
105 << summary.getSummaryFrame(hit->getModuleID()).testHighRateVeto(hit->getPMT())
106 << summary.getSummaryFrame(hit->getModuleID()).testFIFOStatus (hit->getPMT());
107 else
108 cout << ' ' << setw(9) << " ? " << ' '
109 << " ";
110
111 if (router.hasModule(hit->getModuleID())) {
112
113 const JModule& module = router.getModule(hit->getModuleID());
114 const JPMT&
PMT =
module.getPMT(hit->getPMT());
115
116 cout << setw(2) << ' ';
119 cout << setw(6) << ' ';
120 cout <<
' ' <<
FIXED(10,1) <<
getTime(hit->getT(),
PMT.getCalibration());
121 }
122
123 cout << endl;
124 }
125 }
126 cout << endl;
127
129
131
133
134 cout << setw(8) << hit->getModuleID() << ' '
135 << setw(2) << (int) hit->getPMT() << ' '
136 << setw(10) << (int) hit->getT() << ' '
137 << setw(3) << (int) hit->getToT() << ' '
138 << setw(10) << '_';
139
140 if (summary.hasSummaryFrame(hit->getModuleID()))
141 cout <<
' ' <<
FIXED(9,2) << summary.getRate(
JDAQPMTIdentifier(hit->getModuleID(), hit->getPMT())) * 1.0e-3 << setw(6) <<
' '
142 << summary.getSummaryFrame(hit->getModuleID()).testHighRateVeto(hit->getPMT())
143 << summary.getSummaryFrame(hit->getModuleID()).testFIFOStatus (hit->getPMT());
144 else
145 cout << ' ' << setw(9) << " ? " << ' '
146 << " ";
147
148 if (router.hasModule(hit->getModuleID())) {
149
150 const JModule& module = router.getModule(hit->getModuleID());
151 const JPMT&
PMT =
module.getPMT(hit->getPMT());
152
153 cout << setw(2) << ' ' ;
156 cout << setw(6) << ' ';
157 cout <<
' ' <<
FIXED(10,1) <<
getTime(hit->getT(),
PMT.getCalibration());
158 }
159
160 cout << endl;
161 }
162 }
163 cout << endl;
164 }
165}
JDAQPMTIdentifier PMT
Command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const JLocation & getLocation() const
Get location.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
Data structure for PMT geometry, calibration and status.
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.
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
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).
const char * getTime()
Get current local time conform ISO-8601 standard.
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.