Example program to analyse KM3NETDAQ::JDAQEvent.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <limits>
#include <set>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JDAQ/JDAQEvent.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to analyse KM3NETDAQ::JDAQEvent.
- Author
- mdejong
Definition in file examples/JDAQ/JDAQEvent.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 27 of file examples/JDAQ/JDAQEvent.cc.
31 using namespace KM3NETDAQ;
33 JMultipleFileScanner<JDAQEvent> inputFile;
41 JParser<> zap(
"Example program to histogram event data.");
45 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
51 catch(
const exception& error) {
52 FATAL(error.what() << endl);
61 TH1D h0(
"h0", NULL, numeric_limits<JDAQHit::JPMT_t>::max(), -0.5, numeric_limits<JDAQHit::JPMT_t>::max() - 0.5);
62 TH1D h1(
"h1", NULL, numeric_limits<JDAQHit::JTOT_t>::max(), -0.5, numeric_limits<JDAQHit::JTOT_t>::max() - 0.5);
65 TH1D hn(
"hn", NULL, 51, -0.5, 50.5);
66 TH1D hm(
"hm", NULL, 51, -0.5, 50.5);
67 TH1D ho(
"ho", NULL, 51, -0.5, 50.5);
70 while (inputFile.hasNext()) {
72 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
76 if (
event->hasTriggerMask(trigger_mask)) {
82 h0.Fill(hit->getPMT());
83 h1.Fill(hit->getToT());
91 if (hit->hasTriggerMask(trigger_mask)) {
92 buffer.insert(hit->getModuleID());
96 hm.Fill((
double) buffer.size());
98 ho.Fill((
double)
event->getOverlays());
Utility class to parse command line options.
Auxiliary class for trigger mask.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
static const JDAQTriggerMask TRIGGER_MASK_ON
Trigger mask on;.
JLimit JLimit_t
Type definition of limit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getFrameTime()
Get frame time duration.
const JLimit & getLimit() const
Get limit.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.