32{
36
38 JLimit_t& numberOfEvents = inputFile.getLimit();
42
43 try {
44
45 JParser<> zap(
"Example program to histogram timeslice data.");
46
52
53 zap(argc, argv);
54 }
55 catch(const exception& error) {
56 FATAL(error.what() << endl);
57 }
58
59
62
63 JManager<string, TH1D> H0(
new TH1D(
"h0[%]", NULL, numeric_limits<JDAQHit::JPMT_t>::max(), -0.5, numeric_limits<JDAQHit::JPMT_t>::max() - 0.5));
64 JManager<string, TH1D> H1(
new TH1D(
"h1[%]", NULL, numeric_limits<JDAQHit::JTOT_t>::max(), -0.5, numeric_limits<JDAQHit::JTOT_t>::max() - 0.5));
67
68 H0->Sumw2();
69 H1->Sumw2();
70 H2->Sumw2();
71
73
74 for (
counter_type counter = 0; in.hasNext(); ++counter) {
75
76 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
77
79
84
85 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
86
87 h3->Fill(log10((double) frame->size()));
88
90
92 h0->Fill(hit->getPMT());
93 h1->Fill(hit->getToT());
94 h2->Fill(hit->getT());
95 }
96 }
97 }
98 }
100
102
103 out << H0 << H1 << H2 << H3;
104
105 out.Write();
106 out.Close();
107}
JDAQPMTIdentifier PMT
Command line options.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for multiplexing object iterators.
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.
int getModuleID() const
Get module identifier.
int getPMTAddress() const
Get PMT identifier.
static bool compare(const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
Compare PMT identifiers.
std::string getClassname(const std::string &type_name)
Get type name, i.e. part after JEEP::TYPENAME_SEPARATOR.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Long64_t counter_type
Type definition for counter.
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.