31 int main(
int argc,
char **argv)
35 using namespace KM3NETDAQ;
45 JParser<> zap(
"Example program to histogram timeslice data.");
49 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
55 catch(
const exception& error) {
56 FATAL(error.what() << endl);
60 const bool zoom = (
PMT.getModuleID() != -1 &&
61 PMT.getPMTAddress() != -1);
63 JManager<string, TH1D> H0(
new TH1D(
"h0[%]", NULL, numeric_limits<JDAQHit::JPMT_t>::max(), -0.5, numeric_limits<JDAQHit::JPMT_t>::max() - 0.5));
64 JManager<string, TH1D> H1(
new TH1D(
"h1[%]", NULL, numeric_limits<JDAQHit::JTOT_t>::max(), -0.5, numeric_limits<JDAQHit::JTOT_t>::max() - 0.5));
76 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
85 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
87 h3->Fill(
log10((
double) frame->size()));
92 h0->Fill(hit->getPMT());
93 h1->Fill(hit->getToT());
94 h2->Fill(hit->getT());
103 out << H0 << H1 << H2 << H3;
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
Long64_t counter_type
Type definition for counter.
Dynamic ROOT object management.
Auxiliary class for multiplexing object iterators.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
std::string getClassname(const std::string &type_name)
Get type name, i.e. part after JEEP::TYPENAME_SEPARATOR.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
set_variable E_E log10(E_{fit}/E_{#mu})"
double getFrameTime()
Get frame time duration.
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
virtual const pointer_type & next() override
Get next element.
virtual bool hasNext() override
Check availability of next element.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
#define DEBUG(A)
Message macros.