42{
46
49
52 JLimit_t& numberOfEvents = inputFile.getLimit();
53 string detectorFile;
54 JCalibration_t calibrationFile;
55 double Tmax_s;
57 size_t threads;
59
60 try {
61
62 JParser<> zap(
"Program to perform position pre-fit of shower to data.");
63
69 zap[
'T'] =
make_field(Tmax_s,
"dynamical update time [s]") = 100.0;
71 zap[
'N'] =
make_field(threads,
"number of threads") = 0;
73
74 zap(argc, argv);
75 }
76 catch(const exception& error) {
77 FATAL(error.what() << endl);
78 }
79
80
82
84
85 try {
87 }
90 }
91
92 unique_ptr<JDynamics> dynamics;
93
94 if (!calibrationFile.empty()) {
95 try {
96
98
99 dynamics->load(calibrationFile);
100 }
101 catch(const exception& error) {
103 }
104 }
105
107
109
112
114
115 {
116
118
119 while (in.hasNext()) {
120
121 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
122
124
125 if (dynamics) {
126
127 dynamics->update(*tev);
128
129 }
130
131 auto input = fit.getInput(router, *tev, dynamics ? dynamics->getCoverage() :
coverage_type());
132
133 if (threads > 0)
134 fits.enqueue(input);
135 else
137
139 }
141 }
142
144
146
148}
#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.
class to handle first step of the shower reconstruction in ORCA: it reconstructs the shower vertex,...
void setSplitLevel(int value)
Set split level.
General purpose class for object reading from a list of file names.
Object reading from a list of files.
Template definition for direct access of elements in ROOT TChain.
JTriggerCounter_t next()
Increment trigger counter.
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)...
Data structure for fit parameters.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.