47 JParser<> zap(
"Example program to histogram various data profiles.");
51 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
57 catch(
const exception& error) {
58 FATAL(error.what() << endl);
62 NOTICE(
"Determine frame index range... " << flush);
64 const JFrameIndexRange frame_index = getFrameIndexRange<JDAQSummaryslice>(inputFile);
68 const Long64_t NX = frame_index.
second - frame_index.
first + 1;
69 const Long64_t nx = (NX + prescale - 1) / prescale;
71 const Double_t
xmax = frame_index.
first + nx * prescale;
78 JManager_t m_summary(
new TH1D(
"Summary[%]", NULL, nx,
xmin,
xmax));
79 JManager_t m_trigger(
new TH1D(
"Trigger[%]", NULL, nx,
xmin,
xmax));
82 TH1D hu(
"#N [all]", NULL, nx,
xmin,
xmax);
83 TH1D hv(
"#M [UDP]", NULL, nx,
xmin,
xmax);
84 TH1D hw(
"#L [HRV]", NULL, nx,
xmin,
xmax);
85 TH1D ha(
"L0 [all]", NULL, nx,
xmin,
xmax);
86 TH1D hb(
"L0 [HRV]", NULL, nx,
xmin,
xmax);
88 TH1D h2(
"trigger", NULL, nx,
xmin,
xmax);
89 TH1D h3(
"PMT", NULL, nx,
xmin,
xmax);
95 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
101 Double_t U = summary->size();
104 Double_t Y[] = { 0.0, 0.0 };
107 for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
111 if (frame->testDAQStatus()) {
117 if (frame->testHighRateVeto(pmt) || frame->testFIFOStatus(pmt))
118 m_status[frame->getModuleID()]->Fill((Double_t) pmt);
122 y += frame->getRate(pmt) * 1e-3;
126 m_summary[frame->getModuleID()]->Fill(
x,
y);
130 Y[0] += frame->getRate(pmt) * 1e-3;
132 if (!frame->testHighRateVeto(pmt) && !frame->testFIFOStatus(pmt)) {
133 Y[1] += frame->getRate(pmt) * 1e-3;
137 if (frame->testWhiteRabbitStatus()) {
144 Z /= summary->size();
146 hu.Fill(
x, U / prescale);
147 hv.Fill(
x, V / prescale);
148 hw.Fill(
x, W / prescale);
149 ha.Fill(
x, Y[0] / prescale);
150 hb.Fill(
x, Y[1] / prescale);
151 h1.Fill(
x, Z / prescale);
157 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
161 const Double_t
x =
event->getFrameIndex();
170 m_trigger[hit->getModuleID()]->Fill(
x);
175 m_summary.Write(out);
176 m_trigger.Write(out);
177 m_status .Write(out);
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
int getFrameIndex() const
Get frame index.
JTriggerCounter_t next()
Increment trigger counter.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class to set-up Hit.
Auxiliary class for defining the range of iterations of objects.