29int main(
int argc,
char **argv)
36 JLimit_t& numberOfEvents = inputFile.getLimit();
42 JParser<> zap(
"Example program to print DAQ events with associated information.");
51 catch(
const exception& error) {
52 FATAL(error.what() << endl);
58 if (detectorFile !=
"") {
79 cout <<
"TTree counter " << in.getCounter() << endl;
80 cout <<
"Detector identifier " << tev->
getDetectorID() << endl;
84 cout <<
"Trigger counter " << tev->
getCounter() << endl;
85 cout <<
"Trigger mask (hex) " << hex << tev->
getTriggerMask() << dec << endl;
91 cout <<
" module PMT TDC ToT trigger rate [kHz] status location serial x y z dx dy dz t0 status t1" << endl;
97 cout << setw(8) << hit->getModuleID() <<
' '
98 << setw(2) << (int) hit->getPMT() <<
' '
99 << setw(10) << (int) hit->getT() <<
' '
100 << setw(3) << (int) hit->getToT() <<
' '
101 << setw(10) << hex << hit->getTriggerMask() << dec;
108 cout <<
' ' << setw(9) <<
" ? " <<
' '
111 if (router.
hasModule(hit->getModuleID())) {
114 const JPMT&
PMT =
module.getPMT(hit->getPMT());
116 cout << setw(2) <<
' ';
119 cout << setw(6) <<
' ';
120 cout <<
' ' <<
FIXED(10,1) <<
getTime(hit->getT(),
PMT.getCalibration());
134 cout << setw(8) << hit->getModuleID() <<
' '
135 << setw(2) << (int) hit->getPMT() <<
' '
136 << setw(10) << (int) hit->getT() <<
' '
137 << setw(3) << (int) hit->getToT() <<
' '
145 cout <<
' ' << setw(9) <<
" ? " <<
' '
148 if (router.
hasModule(hit->getModuleID())) {
151 const JPMT&
PMT =
module.getPMT(hit->getPMT());
153 cout << setw(2) <<
' ' ;
156 cout << setw(6) <<
' ';
157 cout <<
' ' <<
FIXED(10,1) <<
getTime(hit->getT(),
PMT.getCalibration());
int main(int argc, char **argv)
JDAQPMTIdentifier PMT
Command line options.
Data structure for detector geometry and calibration.
General purpose messaging.
Direct access to module in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Scanning of objects from a single file according a format that follows from the extension of each fil...
ROOT TTree parameter settings of various packages.
const JLocation & getLocation() const
Get location.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Data structure for PMT geometry, calibration and status.
Utility class to parse command line options.
File router for fast addressing of summary data.
void update(const JDAQHeader &header)
Update router.
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
double getRate(const JDAQPMTIdentifier &id) const
Get rate.
const JDAQSummaryFrame & getSummaryFrame(const JDAQModuleIdentifier &module) const
Get summary frame.
Template definition for direct access of elements in ROOT TChain.
int getDetectorID() const
Get detector identifier.
int getRunNumber() const
Get run number.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
static JTriggerMask_t getTriggerMask(const JDAQTriggeredHit &hit)
Get trigger mask of given hit.
const_iterator< T > end() const
Get end of data.
unsigned int size() const
Get number of hits.
const_iterator< T > begin() const
Get begin of data.
bool testFIFOStatus() const
Test FIFO status.
bool testHighRateVeto() const
Test high-rate veto status.
JTriggerCounter_t getCounter() const
Get trigger counter.
JTriggerCounter_t next()
Increment trigger counter.
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
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 to set-up Hit.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.