33{
37
39 JLimit_t& numberOfEvents = inputFile.getLimit();
41 string detectorFile;
43
44 try {
45
46 JParser<> zap(
"Example program to histogram string and floor rates.");
47
53
54 zap(argc, argv);
55 }
56 catch(const exception& error) {
57 FATAL(error.what() << endl);
58 }
59
60
62
63 try {
65 }
68 }
69
71
72
74
77
79
80 TProfile2D h2("h2", NULL,
81 string.size(), -0.5, string.size() - 0.5,
82 floor .size(), -0.5, floor .size() - 0.5);
83
84 for (Int_t i = 1; i <= h2.GetXaxis()->GetNbins(); ++i) {
85 h2.GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
86 }
87 for (Int_t i = 1; i <= h2.GetYaxis()->GetNbins(); ++i) {
88 h2.GetYaxis()->SetBinLabel(i,
MAKE_CSTRING(floor .at(i-1)));
89 }
90
92
94
96
97 for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
98
99 if (router.hasModule(frame->getModuleID())) {
100
101 const JModule& module = router.getModule(frame->getModuleID());
102
104 if (!frame->testHighRateVeto(pmt) && !frame->testFIFOStatus(pmt)) {
106 (
double) floor .getIndex(module.
getFloor()),
107 frame->getRate(pmt) * 1.0e-3);
108 }
109 }
110 } else {
111 FATAL(
"JModuleRouter trying to access non existing identifier: " << frame->getModuleID());
112 }
113 }
114 }
116
117 out.Write();
118 out.Close();
119}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
int getFloor() const
Get floor number.
int getString() const
Get string number.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
Utility class to parse command line options.
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.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
int getIndex()
Get index for user I/O manipulation.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.