33 int main(
int argc,
char **argv)
37 using namespace KM3NETDAQ;
47 JParser<> zap(
"Example program to histogram various data profiles.");
51 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
57 catch(
const exception& error) {
58 FATAL(error.what() << endl);
62 NOTICE(
"Determine frame index range... " << flush);
64 const JFrameIndexRange frame_index = getFrameIndexRange<JDAQSummaryslice>(inputFile);
66 NOTICE(
"= (" << frame_index.first <<
"," << frame_index.second <<
")" << endl);
68 const Long64_t NX = frame_index.second - frame_index.first + 1;
69 const Long64_t nx = (NX + prescale - 1) / prescale;
70 const Double_t
xmin = frame_index.first;
71 const Double_t
xmax = frame_index.first + nx * prescale;
78 JManager_t m_summary(
new TH1D(
"Summary[%]", NULL, nx,
xmin,
xmax));
79 JManager_t m_trigger(
new TH1D(
"Trigger[%]", NULL, nx,
xmin,
xmax));
82 TH1D hu(
"#N [all]", NULL, nx,
xmin,
xmax);
83 TH1D hv(
"#M [UDP]", NULL, nx,
xmin,
xmax);
84 TH1D hw(
"#L [HRV]", NULL, nx,
xmin,
xmax);
85 TH1D ha(
"L0 [all]", NULL, nx,
xmin,
xmax);
86 TH1D hb(
"L0 [HRV]", NULL, nx,
xmin,
xmax);
88 TH1D h2(
"trigger", NULL, nx,
xmin,
xmax);
89 TH1D h3(
"PMT", NULL, nx,
xmin,
xmax);
95 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
101 Double_t U = summary->size();
104 Double_t
Y[] = { 0.0, 0.0 };
107 for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
111 if (frame->testDAQStatus()) {
117 if (frame->testHighRateVeto(pmt) || frame->testFIFOStatus(pmt))
118 m_status[frame->getModuleID()]->Fill((Double_t) pmt);
122 y += frame->getRate(pmt) * 1e-3;
126 m_summary[frame->getModuleID()]->Fill(x, y);
130 Y[0] += frame->getRate(pmt) * 1e-3;
132 if (!frame->testHighRateVeto(pmt) && !frame->testFIFOStatus(pmt)) {
133 Y[1] += frame->getRate(pmt) * 1e-3;
137 if (frame->testWhiteRabbitStatus()) {
144 Z /= summary->size();
146 hu.Fill(x, U / prescale);
147 hv.Fill(x, V / prescale);
148 hw.Fill(x, W / prescale);
149 ha.Fill(x, Y[0] / prescale);
150 hb.Fill(x, Y[1] / prescale);
151 h1.Fill(x, Z / prescale);
157 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
161 const Double_t
x =
event->getFrameIndex();
170 m_trigger[hit->getModuleID()]->Fill(x);
175 m_summary.Write(out);
176 m_trigger.Write(out);
177 m_status .Write(out);
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Dynamic ROOT object management.
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
int getFrameIndex() const
Get frame index.
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...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getFrameTime()
Get frame time duration.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
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
Utility class to parse command line options.
Auxiliary class to set-up Hit.
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
#define DEBUG(A)
Message macros.