37 using namespace KM3NETDAQ;
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);
65 NOTICE(
"Determine frame index range... " << flush);
67 JFrameIndexRange frame_index = getFrameIndexRange<JDAQSummaryslice>(inputFile);
69 NOTICE(
"= (" << frame_index.first <<
"," << frame_index.second <<
")" << endl);
71 const Long64_t NX = frame_index.second - frame_index.first + 1;
72 const Long64_t nx = (NX + prescale - 1) / prescale;
73 const Double_t xmin = (Double_t) frame_index.first - 0.5;
74 const Double_t xmax = (Double_t) frame_index.second + 0.5;
81 JManager_t map_summary(
new TH1D(
"Summary[%]", NULL, NX, xmin, xmax));
82 JManager_t map_trigger(
new TH1D(
"Trigger[%]", NULL, nx, xmin, xmax));
85 TH1D hn(
"N", NULL, NX, xmin, xmax);
86 TH1D h0(
"L0", NULL, NX, xmin, xmax);
87 TH1D
h1(
"WR", NULL, NX, xmin, xmax);
88 TH1D h2(
"trigger", NULL, nx, xmin, xmax);
94 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
101 for (JDAQSummaryslice::const_iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
103 if (frame->testHighRateVeto()) {
107 if (frame->testHighRateVeto(pmt)) {
108 map_status[frame->getModuleID()]->Fill((Double_t) pmt);
116 if (!frame->testHighRateVeto(pmt)) {
117 y += frame->getRate(pmt) * 1e-3;
121 map_summary[frame->getModuleID()]->Fill(x, y);
127 for (JDAQSummaryslice::const_iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
130 y += frame->getRate(pmt) * 1e-3;
133 h1.Fill(x, (frame->testWhiteRabbitStatus() ? 1.0 : 0.0));
136 hn.Fill(x, summaryslice->size());
144 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
148 const Double_t x =
event->getFrameIndex();
157 map_trigger[hit->getModuleID()]->Fill(x);
162 map_summary.Write(out);
163 map_trigger.Write(out);
164 map_status .Write(out);
Auxiliary class to set-up Hit.
Utility class to parse command line options.
then for HISTOGRAM in h0 h1
int getFrameIndex() const
Get frame index.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getFrameTime()
Get frame time duration.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
#define DEBUG(A)
Message macros.