31 int main(
int argc,
char **argv)
35 using namespace KM3NETDAQ;
37 JMultipleFileScanner<JDAQEvent> inputFile;
45 JParser<> zap(
"Example program to histogram string and floor hits.");
50 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
55 catch(
const exception& error) {
56 FATAL(error.what() << endl);
68 load(detectorFile, detector);
70 catch(
const JException& error) {
74 const JDAQHitRouter router(detector);
79 const JRange_t string(detector.begin(), detector.end(), &JModule::getString);
80 const JRange_t floor (detector.begin(), detector.end(), &JModule::getFloor);
82 NOTICE(
"String " <<
string.getLowerLimit() <<
" - " <<
string.getUpperLimit() << endl);
83 NOTICE(
"Floor " << floor .getLowerLimit() <<
" - " << floor .getUpperLimit() << endl);
88 TH1D h1(
"h1", NULL, 100, 0.0, 1.0e1);
90 string.getLength() + 1,
91 string.getLowerLimit() - 0.5,
92 string.getUpperLimit() + 0.5,
93 floor.getLength() + 1,
94 floor.getLowerLimit() - 0.5,
95 floor.getUpperLimit() + 0.5);
98 while (inputFile.hasNext()) {
100 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
110 const JPMTChannel& channel = router.getPMTChannel(*hit);
112 h2.Fill((
double) channel.getString(), (double) channel.getFloor());
114 tx.include(
getTime(*hit, router.getPMT(*hit)));
117 h1.Fill(tx.getLength() * 1.0e-3);
Utility class to parse command line options.
Direct access to PMT data in detector data structure for DAQ hits.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
double getTime(const Hit &hit)
Get true time of hit.
Data structure for detector geometry and calibration.
JLimit JLimit_t
Type definition of limit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Auxiliary class to define a range between two values.
Utility class to parse command line options.
ROOT TTree parameter settings.
const JLimit & getLimit() const
Get limit.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])