33{
37
39 JLimit_t& numberOfEvents = inputFile.getLimit();
41 string detectorFile;
42 double T_ns;
45
46 try {
47
48 JParser<> zap(
"Example program to monitor event duration.");
49
54 zap[
'T'] =
make_field(T_ns,
"Time limit for event duration [ns]") = 10.0e3;
57
58 zap(argc, argv);
59 }
60 catch(const exception& error) {
61 FATAL(error.what() << endl);
62 }
63
64
66
67 try {
69 }
72 }
73
75
76 TH1D h1("h1", NULL, 100, 0.0, 10.0e3);
77
78 size_t N = 0;
79
81
83
85
87
90 }
91
93
95 N += 1;
96 }
97 }
99
101
102 out << h1;
103
104 out.Write();
105 out.Close();
106
107 NOTICE(
"Number of event with duration beyond " <<
FIXED(9,0) << T_ns <<
" [ns] " << N << endl);
108
110
111 return 0;
112}
#define DEBUG(A)
Message macros.
#define QAQC(A)
QA/QC output macro.
int qaqc
QA/QC file descriptor.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
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.
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.
Auxiliary data structure for floating point format specification.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.