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);
118 NOTICE(
"Disabling high-rate veto of all PMTs." << endl);
127 if (
parameters.writeSummary()) {
WARNING(
"Discard writeSummary option during reprocesing of data." << endl); }
158 for ( ; in.
hasNext() && counter != inputFile.getLimit(); ++counter) {
160 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
164 DEBUG(*timeslice << endl);
173 for (JDAQTimeslice::const_iterator super_frame = timeslice->begin(); super_frame != timeslice->end(); ++super_frame) {
175 if (moduleRouter.
hasModule(super_frame->getModuleID())) {
180 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*super_frame, module);
184 buffer.applyHighRateVeto(
parameters.highRateVeto_Hz);
188 timesliceL0.push_back(JSuperFrame1D_t(buffer));
192 timesliceL1.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
193 super_frame->getModuleIdentifier(),
196 buildL1(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
200 timesliceL2.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
201 super_frame->getModuleIdentifier(),
204 buildL2(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
208 timesliceSN.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
209 super_frame->getModuleIdentifier(),
212 buildSN(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceSN.rbegin()));
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
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.
static const int HIGH_RATE_VETO_DISABLE
Enable (disable) use of high-rate veto test if this status bit is 0 (1);.
*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
double getFrameTime()
Get frame time duration.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
virtual const pointer_type & next() override
Get next element.
virtual bool hasNext() override
Check availability of next element.
const JPosition3D & getPosition() const
Get position.
General purpose messaging.
Direct access to module in detector data structure.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
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.
2-dimensional frame with time calibrated data from one optical module.
Object reading from a list of files.
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
KM3NeT DAQ constants, bit handling, etc.
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
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
Time slice with calibrated data.
#define DEBUG(A)
Message macros.