27 int main(
int argc,
char **argv)
31 using namespace KM3NETDAQ;
41 JParser<> zap(
"Example program to histogram event data.");
45 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
51 catch(
const exception& error) {
52 FATAL(error.what() << endl);
61 TH1D h0(
"h0", NULL, numeric_limits<JDAQHit::JPMT_t>::max(), -0.5, numeric_limits<JDAQHit::JPMT_t>::max() - 0.5);
62 TH1D
h1(
"h1", NULL, numeric_limits<JDAQHit::JTOT_t>::max(), -0.5, numeric_limits<JDAQHit::JTOT_t>::max() - 0.5);
65 TH1D hn(
"hn", NULL, 1001, -0.5, 1000.5);
66 TH1D hs(
"hs", NULL, 1001, -0.5, 1000.5);
67 TH1D ho(
"ho", NULL, 101, -0.5, 100.5);
69 TH1D ha(
"ha", NULL, 101, -0.5, 100.5);
70 TH1D hb(
"hb", NULL, 101, -0.5, 100.5);
73 while (inputFile.hasNext()) {
75 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
79 if (event->hasTriggerMask(trigger_mask)) {
85 h0.Fill(hit->getPMT());
86 h1.Fill(hit->getToT());
93 ho.Fill((
double) event->getOverlays());
99 if (hit->hasTriggerMask(trigger_mask)) {
100 buffer.insert(hit->getModuleID());
104 ha.Fill((
double) buffer.size());
111 buffer.insert(hit->getModuleID());
114 hb.Fill((
double) buffer.size());
Auxiliary class to set-up Hit.
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Auxiliary class for trigger mask.
then for HISTOGRAM in h0 h1
static const JDAQTriggerMask TRIGGER_MASK_ON
Trigger mask on;.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getFrameTime()
Get frame time duration.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.