23 int main(
int argc,
char **argv)
29 JSingleFileScanner<JDAQSummaryslice> inputFile;
36 JParser<> zap(
"Auxiliary program to monitor summary data.");
39 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
45 catch(
const exception &error) {
46 FATAL(error.what() << endl);
52 JQuantile Q3(
"High-rate veto");
53 JQuantile Q4(
"FIFO ");
55 JQuantile Q6(
"Rate [Hz] ");
57 while (inputFile.hasNext()) {
59 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
65 for (JDAQSummaryslice::const_iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
67 Q1.put(frame->testDAQStatus() ? 1.0 : 0.0);
68 Q2.put(frame->testWhiteRabbitStatus() ? 1.0 : 0.0);
70 Q3.put((
double) frame->countHighRateVeto() / (double)
NUMBER_OF_PMTS);
71 Q4.put((
double) frame->countFIFOStatus() / (double)
NUMBER_OF_PMTS);
75 if (frame->getValue(pmt) != 0) {
79 if (!frame->testHighRateVeto(pmt) &&
80 !frame->testFIFOStatus (pmt)) {
81 Q6.put(frame->getRate(pmt));
86 Q5.put((
double) numberOfPTMs);
90 for (
const JQuantile* buffer[] = { &Q1, &Q2, &Q3, &Q4, &Q5, &Q6, NULL }, **i = buffer; *i != NULL; ++i) {
95 <<
FIXED(7,5) << Q1.getMean() <<
' '
96 <<
FIXED(7,5) << Q2.getMean() <<
' '
97 <<
FIXED(7,5) << Q3.getMean() <<
' '
98 <<
FIXED(7,5) << Q4.getMean() <<
' '
99 <<
FIXED(8,1) << Q5.getMean() <<
' '
100 <<
FIXED(7,0) << Q6.getMean() <<
' '
101 <<
FIXED(7,0) << Q6.getSTDev() << endl);