99{
103
109
110 try {
111
112 JParser<> zap(
"Auxiliary program to compare summary data.");
113
114 zap[
'f'] =
make_field(inputFile,
"pair of input files");
119
120 zap(argc, argv);
121 }
122 catch(const exception &error) {
123 FATAL(error.what() << endl);
124 }
125
127
129
130 TH1D h0("h0", NULL, 200, -2.0, +2.0);
132 TH2D h2("h2", NULL, 2, -0.5, +1.5, 2, -0.5, +1.5);
133 TH2D h3("h3", NULL, 2, -0.5, +1.5, 2, -0.5, +1.5);
134 TH2D h4("h4", NULL, 100, 0.0, 100.0, 100, 0.0, 100.0);
135 TH2D h5("h5", NULL, 100, 0.0, 100.0, 100, 0.0, 100.0);
136 TH2D h6("h6", NULL, 2, -0.5, +1.5, 2, -0.5, +1.5);
137
140
141 size_t counts = 0;
142 size_t misses = 0;
143
144 struct {
147 } module;
148
149 struct {
154
155
157
158 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
159
161
162 router.update(*p);
163
164 counts += 1;
165
166 DEBUG(
"frame index: " << setw(6) << p->
getFrameIndex() <<
' ' << p->
getTimesliceStart() <<
" / " << setw(6) << router.getFrameIndex() <<
' ' << router.getTimesliceStart() << endl);
167
169
170 for (JDAQSummaryslice::const_iterator i = p->begin(); i != p->end(); ++i) {
171
173
174 module.counts[f1.getModuleID()] += 1;
175
177
179
181
183
185 cout << "PMT " << id << ' ' << printer(*i,pmt) << " -> " << printer(f2,pmt) << endl;
186 }
187
189
193 }
194
195 if (!rate_kHz(f2.
getRate(pmt, factor) - f1.
getRate(pmt, factor))) {
197 }
198
205 }
206
210
211 } else {
212
213 module.misses[f1.getModuleID()] += 1;
214 }
215 }
216 } else {
217
218 misses += 1;
219 }
220 }
222
223 cout << "Number of slice misses "<< setw(6) << misses << '/' << setw(6) << counts << endl;
224
225 for (const auto& i : module.misses) {
226 cout << "Number of module misses " << setw(8) << i.first << ' ' << setw(6) << i.second << '/' << setw(6) << module.counts[i.first] << endl;
227 }
228
229 for (
const auto& i :
PMT.misses) {
230 cout <<
"Number of PMT misses " << i.first <<
' ' << setw(6) << i.second <<
'/' << setw(6) <<
PMT.counts[i.first] << endl;
231 }
232
233 for (
const auto& i :
PMT.errors) {
234 cout <<
"Number of PMT errors " << i.first <<
' ' << setw(6) << i.second <<
'/' << setw(6) <<
PMT.counts[i.first] << endl;
235 }
236
237 out.Write();
238 out.Close();
239}
JDAQPMTIdentifier PMT
Command line options.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Object reading from a list of files.
virtual bool hasNext() override
Check availability of next element.
File router for fast addressing of summary data.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
bool testFIFOStatus() const
Test FIFO status.
int getUDPNumberOfReceivedPackets() const
Get number of received UDP packets.
bool hasUDPTrailer() const
Get UDP trailer status.
bool testHighRateVeto() const
Test high-rate veto status.
int getUDPMaximalSequenceNumber() const
Get maximal sequence number of UDP packet.
int getModuleID() const
Get module identifier.
static int getN()
Get number of bins.
static const double * getData(const double factor=1.0)
Get abscissa values.
Data storage class for rate measurements of all PMTs in one module.
double getRate(const int tdc, const double factor=1.0) const
Get count rate.
JRate_t getValue(const int tdc) const
Get value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.