46{
50
53 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
57
58 JParallelFileScanner_t inputFile;
61 string detectorFile;
62 JCalibration_t calibrationFile;
63 double Tmax_s;
64 string pdfFile;
66 size_t threads;
68
69 try {
70
71 JParser<> zap(
"Program to add data to muon tracks.");
72
81 zap[
'N'] =
make_field(threads,
"number of threads") = 0;
83
84 zap(argc, argv);
85 }
86 catch(const exception& error) {
87 FATAL(error.what() << endl);
88 }
89
90
92
94
95 try {
97 }
100 }
101
102 unique_ptr<JDynamics> dynamics;
103
104 if (!calibrationFile.empty()) {
105
106 try {
107
109
110 dynamics->load(calibrationFile);
111 }
112 catch(const exception& error) {
114 }
115 }
116
119
120 {
121
123
125
127
129
131
132 while (inputFile.hasNext()) {
133
134 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
135
136 multi_pointer_type ps = inputFile.next();
137
140
141 summary.update(*tev);
142
143 if (dynamics) {
144 dynamics->update(*tev);
145 }
146
147 auto input = fit.getInput(router, summary, *tev, *in, dynamics ? dynamics->getCoverage() :
coverage_type());
148
149 if (threads > 0)
150 fits.enqueue(input);
151 else
153 }
155 }
156
158
160
162}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Data structure for set of track fit results.
Utility class to parse command line options.
Thread pool for event-by-event reconstruction.
void setSplitLevel(int value)
Set split level.
General purpose class for object reading from a list of file names.
General purpose class for parallel reading of objects from a single file or multiple files.
Object reading from a list of files.
File router for fast addressing of summary data.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JTreeParameters & getTreeParameters()
Template definition for method returning TTree parameters.
KM3NeT DAQ data structures and auxiliaries.
Dynamic detector calibration.
Data structure for coverage of detector by dynamical calibrations.
Auxiliary class for recursive type list generation.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Wrapper class to add features after the final fit of muon trajectory.
Data structure for fit parameters.
double TTS_ns
transition-time spread [ns]
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
Auxiliary class for defining the range of iterations of objects.
const JLimit & getLimit() const
Get limit.
static counter_type max()
Get maximum counter value.