99{
103
105 JLimit_t & numberOfEvents = inputFile.getLimit();
108 int N;
111
112 try {
113
114 JParser<> zap(
"Example program to check timeslice data for errors.");
115
123
125 }
126 catch(const exception& error) {
128 }
129
130
132
133
136 }
137
140
142
146
148
149 for (
counter_type counter = 0; in.hasNext(); ++counter) {
150
152
154
155 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
156
158
160
162 misses[frame->getModuleID()] += 1;
163 }
164 }
165
167
169
170 H1[error->type]->Fill((
Double_t) frame->getFrameIndex());
171 }
172
174
176
177 if (error->pos >= 0) {
178
179 const int pmt = (*frame)[error->pos].getPMT();
180
183 <<
setw(8) << frame->getFrameIndex() <<
' '
184 <<
setw(6) << error->pos <<
'/' <<
setw(8) << frame->size() <<
' '
185 <<
setw(2) << error->type <<
' ';
186
187 if (pmt < NUMBER_OF_PMTS) {
188 cout <<
setw(1) << frame->testHighRateVeto(pmt)
189 <<
setw(1) << frame->testFIFOStatus (pmt) <<
' ';
190 }
191
192 cout <<
setw(4) << frame->getUDPNumberOfReceivedPackets() <<
'/'
193 <<
setw(4) << frame->getUDPMaximalSequenceNumber();
194
196
198
200
202
203 for (
int i = error->pos - 1,
n = 0; i >= 0 &&
n <= N; --i) {
204 if ((*frame)[i].getPMT() == (*frame)[error->pos].getPMT()) {
205 buffer.push_front((*frame)[i]);
207 }
208 }
209
212 }
213
215
217
218 for (
int i = error->pos + 1,
n = 0; i < frame->size() &&
n <= N; ++i) {
219 if ((*frame)[i].getPMT() == (*frame)[error->pos].getPMT()) {
222 }
223 }
224
225 } else {
226
228 <<
setw(10) << frame->getModuleID() <<
' ' <<
setw(2) <<
' ' <<
' '
229 <<
setw(8) << frame->getFrameIndex() <<
' '
230 <<
setw(6) << error->pos <<
'/' <<
setw(8) << frame->size() <<
' '
231 <<
setw(2) << error->type <<
' ';
232
234 <<
setw(1) <<
' ' <<
' ';
235
236 cout <<
setw(4) << frame->getUDPNumberOfReceivedPackets() <<
'/'
237 <<
setw(4) << frame->getUDPMaximalSequenceNumber();
238
240
242
244 }
245 }
246 }
247 }
248 }
250
252
254
256 }
257
258 int ns = 0;
259
261
262 cout <<
"misses " <<
setw(10) << i->first <<
' ' <<
setw(8) << i->second <<
endl;
263
264 ns += i->second;
265 }
266 {
268 }
269
271}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
std::ostream & print(std::ostream &out, const JTestSummary &summary, T __begin, T __end, const bool useColors=true, const JFormat_t &formatting=JFormat_t(18, 3, std::ios::fixed))
Print test summary.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const JChecksum checksum
Function object to perform check-sum of raw data.
static int MAXIMAL_FRAME_SIZE
Maximal frame size.
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
Auxiliary class to select ROOT class based on class name.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for result of checksum.
@ EPMT_t
PMT number error.
@ TIME_t
Time order error.
result_type::const_iterator const_iterator