48 int main(
int argc,
char **argv)
52 using namespace KM3NETDAQ;
61 bool reuse_parameters;
67 JParser<> zap(
"Auxiliary program to re-process time slice data.");
71 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
75 zap[
'C'] =
make_field(selector,
"timeslice selector, e.g. JDAQTimesliceL1.") = getROOTClassSelection<JDAQTimesliceTypes_t>();
80 catch(
const exception &error) {
81 FATAL(error.what() << endl);
90 DEBUG(
"Reset time [ms] " <<
getRTS() * 1e-6 << endl);
102 if (reuse_parameters) {
108 NOTICE(
"Set trigger parameters from input." << endl);
111 FATAL(
"No trigger parameters from input." << endl);
119 if (
parameters.writeSummary()) {
WARNING(
"Discard writeSummary option during reprocesing of data." << endl); }
123 typedef double hit_type;
150 for ( ; in.
hasNext() && counter != inputFile.getLimit(); ++counter) {
152 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
156 DEBUG(*timeslice << endl);
165 for (JDAQTimeslice::const_iterator super_frame = timeslice->begin(); super_frame != timeslice->end(); ++super_frame) {
167 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
172 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*super_frame, module);
176 buffer.applyHighRateVeto(
parameters.highRateVeto_Hz);
180 timesliceL0.push_back(JSuperFrame1D_t(buffer));
184 timesliceL1.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
185 super_frame->getModuleIdentifier(),
188 buildL1(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
192 timesliceL2.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
193 super_frame->getModuleIdentifier(),
196 buildL2(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
200 timesliceSN.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
201 super_frame->getModuleIdentifier(),
204 buildSN(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceSN.rbegin()));
Utility class to parse command line options.
ROOT TTree parameter settings.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
void configure(const JDAQTimeslice ×lice)
Configure.
Auxiliary class to select ROOT class based on class name.
Recording of objects on file according a format that follows from the file name extension.
Router for direct addressing of module data in detector data structure.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Long64_t counter_type
Type definition for counter.
Auxiliary class for multiplexing object iterators.
Basic data structure for time and time over threshold information of hit.
Data structure for detector geometry and calibration.
1-dimensional frame with time calibrated data from one optical module.
void setDAQLongprint(const bool option)
Set DAQ print option.
Scanning of objects from a single file according a format that follows from the extension of each fil...
Auxiliary class for defining the range of iterations of objects.
double getMaximalDistance(const JDetector &detector)
Get maximal distance between modules in detector.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
double getFrameTime()
Get frame time duration.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
virtual const pointer_type & next()
Get next element.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
const JPosition3D & getPosition() const
Get position.
General purpose messaging.
Direct access to module in detector data structure.
Auxiliary class to build JDAQTimeslice for L1 timeslice.
double getRTS()
Get TDC dynamic range.
Utility class to parse command line options.
bool hasModule(const JObjectID &id) const
Has module.
virtual bool hasNext()
Check availability of next element.
2-dimensional frame with time calibrated data from one optical module.
Object reading from a list of files.
const JLimit & getLimit() const
Get limit.
KM3NeT DAQ constants, bit handling, etc.
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
Time slice with calibrated data.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])