70 JLimit_t& numberOfEvents = inputFile.getLimit();
86 JParser<> zap(
"Example program to examine rates as a function of time on ms-level timescales.");
93 zap[
'T'] =
make_field(TMax_ns,
"Time window for local coincidences (if 0 run in L0 mode)") = 0.0;
96 zap[
'D'] =
make_field(
mode2D,
"L1 mode: create 2D histogram with time differences of coincidences (heavy memory usage, ignored if TMax_ns = 0)");
105 catch(
const exception &error) {
111 FATAL(
"Frame time must be an integer multiple of bin width");
131 pts->configure(inputFile);
133 int fEnd =
pts->rbegin()->getFrameIndex();
134 int fStart =
pts->begin( )->getFrameIndex();
136 if (
fEnd > inputFile.getUpperLimit()) {
143 int runNumber =
pts->begin()->getRunNumber();
189 FATAL(
"2D histogram size not supported by ROOT file output; limit input size (-n) below " << floor(
max_size / 100.0) <<
endl);
209 if (
pts->hasNext()) {
213 FATAL(
"Input file is too short.");
218 for ( ;
pts->hasNext() && counter != inputFile.getLimit(); ++counter) {
224 const int ic =
curr.getFrameIndex();
241 for (JDAQTimeslice::const_iterator frame =
curr.begin(); frame !=
curr.end(); ++frame) {
243 const int moduleID = frame->getModuleID();
244 const JModule&
module = moduleRouter.getModule(moduleID);
253 if (frame->testHighRateVeto() || frame->testFIFOStatus()) {
255 veto[pmt] = ( frame->testHighRateVeto(pmt) || frame->testFIFOStatus(pmt) );
281 for (JSuperFrame2D_t::iterator i =
buffer2D.begin(); i !=
buffer2D.end(); ++i) {
282 if (
veto[i->getPMTAddress()]) {
289 JSuperFrame1D_t& data = JSuperFrame1D_t::multiplex(
buffer2D);
294 if (data.size() > 1) {
299 sort(data.begin(), data.end());
308 if (TMax_ns == 0.0) {
316 while (++q != data.end() && q->getT() - p->getT() <= TMax_ns) {}
376 for (
int b = 1; b <= rt->GetXaxis()->
GetNbins(); b++) {
378 double r = rt->GetBinContent(b);
379 double t = rt->GetBinCenter( b);
381 RT_DET[
"SUM"]->Fill(t, r);
386 for (
int b = 1; b <= nc->GetXaxis()->
GetNbins(); b++) {
388 double n = nc->GetBinContent(b);
389 double t = nc->GetBinCenter( b);
424 NOTICE(
"Writing individual modules histograms" <<
endl);
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.
#define DEBUG(A)
Message macros.
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
I/O formatting auxiliaries.
int main(int argc, char **argv)
ROOT TTree parameter settings of various packages.
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
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...
Reduced data structure for L0 hit.
int getFrameIndex() const
Get frame index.
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.
long long int factorial(const long long int n)
Determine factorial.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const unsigned int h2d_limit
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Transmission with position.
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.
Auxiliary class to select DAQ hits based on time-over-treshold value.
@ join_t
join consecutive hits according match criterion