32{
36
39 JLimit_t& numberOfEvents = inputFile.getLimit();
40 string detectorFile;
42
43 try {
44
45 JParser<> zap(
"Program to plot snapshot data.");
46
47 zap[
'f'] =
make_field(inputFile,
"input file.");
50 zap[
'a'] =
make_field(detectorFile,
"detector file.") =
"";
52
53 zap(argc, argv);
54 }
55 catch(const exception& error) {
56 FATAL(error.what() << endl);
57 }
58
59
61
62 if (detectorFile != "") {
63
64 try {
66 }
69 }
70 }
71
73
74
76
78
79 TH1D h0("h0", NULL, 250, -0.5, 499.5);
80 TH1D h1("h1", NULL, 250, -0.5, 499.5);
81
83
85
87
88 summary.update(*event);
89
90 int number_of_hits = 0;
91
93
94 if (summary.hasSummaryFrame(hit->getModuleID())) {
95
97
99
102 }
103
106 ++number_of_hits;
107 }
108 }
109 }
110
111 DEBUG(
"Number of snapshot hits " << event->size<
JDAQSnapshotHit>() <<
' ' << number_of_hits << endl);
112
114 h1.Fill((double) number_of_hits);
115 }
117
118 out.Write();
119 out.Close();
120}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Utility class to parse command line options.
Object reading from a list of files.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
File router for fast addressing of summary data.
int getModuleID() const
Get module identifier.
Data storage class for rate measurements of all PMTs in one module.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
KM3NeT DAQ data structures and auxiliaries.
Auxiliary class for handling status.
int getStatus() const
Get status.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.