102{
106
108
110 JLimit_t& numberOfEvents = inputFile.getLimit();
114 int numberOfHits;
118
119 try {
120
121 JParser<> zap(
"Example program to search for spurious hits.");
122
128 zap[
'M'] =
make_field(numberOfHits,
"minimum number of hits for periodicity");
132
134 }
135 catch(const exception& error) {
137 }
138
139
141
142 for (
counter_type counter = 0; in.hasNext() && counter != inputFile.getLimit(); ++counter) {
143
145
147
148 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
149
150
151
154
156
158 buffer[
hit->getPMT()].push_back(*
hit);
159 }
160
161
162
164
166
167 if (!buffer[pmt].empty()) {
168
170
171 for (buffer1D_type::iterator i = buffer[pmt].begin(); i != buffer[pmt].end(); ) {
172
173 if (
ToT_ns(i->getToT())) {
174
175 buffer1D_type::iterator p = i;
176
177 for (++p; p != buffer[pmt].end() &&
ToT_ns(p->getToT()) &&
is_periodic(*i, *p); ++p) {}
178
179 if (
distance(i, p) >= numberOfHits) {
180 top[id].push_back(*i);
181 }
182
183 i = p;
184
185 } else {
186
187 ++i;
188 }
189 }
190 }
191 }
192
193
195
197
198 if (
veto.count(i->first) == 0) {
199
200 const int pmt = i->first.getPMTAddress();
201
203 <<
setw(9) << i->first.getModuleID() <<
'.' <<
FILL(2,
'0') << i->first.getPMTAddress() <<
FILL() <<
' '
204 <<
setw(1) << frame->testHighRateVeto(pmt)
205 <<
setw(1) << frame->testFIFOStatus (pmt) <<
endl;
206
207 int count = 0;
208
209 string eol = "";
210
212
213 const bool has_pmt = (
hit->getPMT() == i->first.getPMTAddress());
214 const bool has_hit = (find(i->second.begin(), i->second.end(), *
hit) != i->second.end());
215
217
219 eol = "*";
220 }
221
223
225
227
228 eol = "";
229 }
230 }
231 }
232
233 cout <<
endl <<
"press any key to continue> " << flush;
234
236
238 }
239 }
240 }
241 }
242 }
244}
#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.
Enable unbuffered terminal input.
char get()
Get single character.
int getRunNumber() const
Get run number.
int getFrameIndex() const
Get frame index.
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 data structure for sequence of same character.
Type definition of range.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
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.