25{
29
31 JLimit_t& numberOfEvents = inputFile.getLimit();
33 int highRateThreshold;
35
36 try {
37
38 JParser<> zap(
"Auxiliary program to monitor summary data.");
39
43 zap[
't'] =
make_field(highRateThreshold) = 50000;
45
46 zap(argc, argv);
47 }
48 catch(const exception &error) {
49 FATAL(error.what() << endl);
50 }
51
52
55 JStats Q3(
"High-rate veto");
59
61
62 int nbOfHighRateNotFiltered = 0;
63 int nbOfDuplicated = 0;
64
66
68
70
72
73 if (!frameIndexCounter.insert(frameIndex).second) {
74 nbOfDuplicated += 1;
75 }
76
77
78 int numberOfPTMs = 0;
79
80 for (JDAQSummaryslice::const_iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
81
82 Q1.put(frame->testDAQStatus() ? 1.0 : 0.0);
83 Q2.put(frame->testWhiteRabbitStatus() ? 1.0 : 0.0);
84
85 Q3.put((double) frame->countHighRateVeto() / (double) NUMBER_OF_PMTS);
86 Q4.put((double) frame->countFIFOStatus() / (double) NUMBER_OF_PMTS);
87
89
91 ++numberOfPTMs;
92 }
93
94 if (!frame->testHighRateVeto(pmt) &&
95 !frame->testFIFOStatus (pmt)) {
96 Q6.put(frame->getRate(pmt));
97
98 if (frame->getRate(pmt) > highRateThreshold){
99 nbOfHighRateNotFiltered += 1;
100 }
101 }
102 }
103 }
104
105 Q5.put((double) numberOfPTMs);
106 }
108
109 for (
const JStats* p : { &Q1, &Q2, &Q3, &Q4, &Q5, &Q6}) {
111 }
112
113 STATUS(
"Number of high-rate vetos not filtered " << setw(6) << nbOfHighRateNotFiltered << endl);
114 STATUS(
"Number of duplicated frame indices " << setw(6) << nbOfDuplicated << endl);
115
117 <<
FIXED(7,5) << Q1.getMean() <<
' '
118 <<
FIXED(7,5) << Q2.getMean() <<
' '
119 <<
FIXED(7,5) << Q3.getMean() <<
' '
120 <<
FIXED(7,5) << Q4.getMean() <<
' '
121 <<
FIXED(8,1) << Q5.getMean() <<
' '
122 <<
FIXED(7,0) << Q6.getMean() <<
' '
123 <<
FIXED(7,0) << Q6.getSTDev() <<
' '
124 <<
FIXED(7,0) << nbOfHighRateNotFiltered <<
' '
125 <<
FIXED(7,0) << nbOfDuplicated << endl);
126}
#define DEBUG(A)
Message macros.
#define QAQC(A)
QA/QC output macro.
int qaqc
QA/QC file descriptor.
#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.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
int getFrameIndex() const
Get frame index.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool is_valid(const json &js)
Check validity of JSon data.
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary data structure for floating point format specification.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.