31 int main(
int argc,
char **argv)
35 using namespace KM3NETDAQ;
45 JParser<> zap(
"Program to plot snapshot data.");
47 zap[
'f'] =
make_field(inputFile,
"input file.");
49 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
50 zap[
'a'] =
make_field(detectorFile,
"detector file.") =
"";
55 catch(
const exception& error) {
56 FATAL(error.what() << endl);
64 if (detectorFile !=
"") {
81 TH1D h0(
"h0", NULL, 250, -0.5, 499.5);
82 TH1D h1(
"h1", NULL, 250, -0.5, 499.5);
84 while (inputFile.hasNext()) {
86 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
92 int number_of_hits = 0;
113 DEBUG(
"Number of snapshot hits " << event->size<
JDAQSnapshotHit>() <<
' ' << number_of_hits << endl);
116 h1.Fill((
double) number_of_hits);
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
int getModuleID() const
Get module identifier.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
void update(const JDAQHeader &header)
Update router.
Router for direct addressing of module data in detector data structure.
const JDAQSummaryFrame & getSummaryFrame() const
Get default summary frame.
Data structure for detector geometry and calibration.
Scanning of objects from a single file according a format that follows from the extension of each fil...
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data storage class for rate measurements of all PMTs in one module.
Auxiliary class for handling status.
File router for fast addressing of summary data.
General purpose messaging.
Direct access to module in detector data structure.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Utility class to parse command line options.
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
bool hasModule(const JObjectID &id) const
Has module.
Object reading from a list of files.
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.