63 JLimit_t& numberOfEvents = inputFile.getLimit();
79 JParser<> zap(
"Auxiliary program to estimate PMT and hit multiplicities.");
98 catch(
const exception &error) {
112 NOTICE(
"Get trigger parameters from input." <<
endl);
115 ERROR(
"No trigger parameters from input." <<
endl);
127 if (parameters.writeL1.prescale > 0 && (selector ==
"JDAQTimeslice" || selector ==
"JDAQTimesliceL1") &&
128 parameters.TMaxLocal_ns < TMax_ns) {
129 FATAL(
"TMax_ns (-T) " << TMax_ns <<
" ns is larger than in the trigger " << parameters.TMaxLocal_ns <<
" ns." <<
endl);
132 if (selector ==
"JDAQTimeslice") {
134 prescale = (parameters.writeL1.prescale != 0) ? parameters.writeL1.prescale : parameters.writeL0.prescale;
137 if (selector ==
"JDAQTimesliceL0") {
138 prescale = parameters.writeL0.prescale;
141 if (selector ==
"JDAQTimesliceL1") {
142 prescale = parameters.writeL1.prescale;
145 if (selector ==
"JDAQTimesliceSN") {
146 prescale = parameters.writeSN.prescale;
152 FATAL(
"[R] According to trigger parameters, the " << selector <<
" stream should be empty.");
154 NOTICE(
"[R] Prescale factor is " << prescale <<
endl);
195 NOTICE(
"[R] Timeslice stream " << selector <<
endl);
213 h_livetime->GetYaxis()->SetTitle(
"Livetime (s)");
218 const double xmin = -0.5;
219 const double xmax =
nx - 0.5;
228 TH2D*
CO_proto =
new TH2D(
"%_CO",
NULL, NUMBER_OF_PMTS, 0.5, 0.5 + NUMBER_OF_PMTS, NUMBER_OF_PMTS, -0.5, -0.5 + NUMBER_OF_PMTS);
239 TH1D*
time_distr =
new TH1D(
"T_distr",
"Coincidence (M > 6) distribution in timeslice", 100, 0, 1
e8);
295 NOTICE(
"[R] aanet header found but mupage live time is zero. Likely not a mupage file.");
304 runNumber =
summaryFile.getEntry(0)->getRunNumber();
305 NOTICE(
"[R] Processing run #" << runNumber <<
endl);
313 for ( ; in.hasNext() && counter != inputFile.getLimit(); ++counter) {
315 STATUS(
"Entry: " <<
setw(10) << counter <<
'\r');
324 if (summary !=
NULL) {
327 ERROR(
"[R>T] Frame indices do not match [counter=" << counter <<
", timeslice=" << timeslice->
getFrameIndex() <<
", summaryslice=" << summary->
getFrameIndex() <<
"]" <<
endl);
329 FATAL(
"ROOT TTrees not aligned. Run #" << runNumber <<
endl);
360 if (summary ==
NULL) {
361 WARNING(
"[R>T>F] Missing summary for timeslice." <<
endl);
432 fill(
veto.begin(),
veto.end(),
true);
451 fill(
veto.begin(),
veto.end(),
false);
460 const JModule&
module = detector.getModule(address);
475 for (JSuperFrame2D_t::iterator i = buffer.begin(); i != buffer.end(); ++i) {
480 JSuperFrame1D_t& data = JSuperFrame1D_t::multiplex(buffer);
486 const int pmt = h->getPMT();
516 while (++q !=
filteredData.end() && q->getT() - p->getT() <= TMax_ns ) {}
561 NOTICE(
"[R] " << counter <<
" timeslices processed." <<
endl);
599 NOTICE(
"[R] " <<
H.size() <<
" DOMs were active in the run." <<
endl);
608 return (counter ? 0 : 1);
KM3NeT DAQ constants, bit handling, etc.
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
Dynamic ROOT object management.
Match operator for consecutive hits.
Auxiliary methods for mathematics.
General purpose messaging.
Direct access to module in detector data structure.
int main(int argc, char **argv)
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to define a range between two values.
ROOT TTree parameter settings of various packages.
Basic data structure for time and time over threshold information of hit.
Lookup table for PMT addresses in detector.
Lookup table for PMT addresses in optical module.
Address of module in detector data structure.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
const JModuleAddress & getAddress(const JObjectID &id) const
Get address of module.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Data structure for PMT physical address.
std::string toString() const
Convert PMT physical address to string.
Template definition of a multi-dimensional oscillation probability interpolation table.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
int getFrameIndex() const
Get frame index.
bool testFIFOStatus() const
Test FIFO status.
int countHighRateVeto() const
Count high-rate veto status.
int countFIFOStatus() const
Count FIFO status.
bool testHighRateVeto() const
Test high-rate veto status.
bool testDAQStatus() const
Test DAQ status of packets.
Data storage class for rate measurements of all PMTs in one module.
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.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
void setAxisLabels(TAxis *axis, const JModuleAddressMap &memo)
Set axis with PMT address labels.
long long int factorial(const long long int n)
Determine factorial.
static const double H
Planck constant [eV s].
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
static const JModuleCounter getNumberOfModules
Function object to count unique modules.
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class to select ROOT class based on class name.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.