36{
40
42 JLimit_t& numberOfEvents = inputFile.getLimit();
44 string detectorFile;
46
47 try {
48
49 JParser<> zap(
"Example program to histogram string and floor hits.");
50
56
57 zap(argc, argv);
58 }
59 catch(const exception& error) {
60 FATAL(error.what() << endl);
61 }
62
63
65
66 try {
68 }
71 }
72
74
77
78
79 TH1D h1("h1", NULL, 100, 0.0, 1.0e1);
80
82 string.size(), -0.5, string.size() - 0.5,
84
85 for (Int_t i = 1; i <= H2->GetXaxis()->GetNbins(); ++i) {
86 H2->GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
87 }
88 for (Int_t i = 1; i <= H2->GetYaxis()->GetNbins(); ++i) {
90 }
91
92 TH2D* h3 = (TH2D*) H2->Clone("h3");
93
95
97
99
101
102 {
104
106
107 const JPMTChannel& channel = router.getPMTChannel(*hit);
108
110
112 if (hit->hasTriggerBit(i)) {
114 }
115 }
116
118 }
119 }
120
122
123 {
125
127
128 const JPMTChannel& channel = router.getPMTChannel(*hit);
129
131 }
132 }
133 }
135
137
138 out << h1;
139 out << *H2;
140 out << H2;
141 out << *h3;
142
143 out.Write();
144 out.Close();
145}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
int getFloor() const
Get floor number.
int getString() const
Get string number.
Auxiliary class to uniquely identify PMT readout channel.
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.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
int getIndex()
Get index for user I/O manipulation.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const char * getTime()
Get current local time conform ISO-8601 standard.
KM3NeT DAQ data structures and auxiliaries.
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
Router for mapping of string identifier to index.
Auxiliary class to set-up Hit.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.