Auxiliary program to convert data to Dusj format.
45{
49
52 JLimit_t& numberOfEvents = inputFile.getLimit();
55
56 try {
57
58 JParser<> zap(
"Auxiliary program to convert data to Dusj format.");
59
65
67 }
68 catch(const exception& error) {
70 }
71
72
74
75 try {
77 }
80 }
81
83
84
86
88
89 int mc_run_id = 0;
90
92
93 try {
94
96
98
100 mc_run_id = buffer.start_run.run_id;
101
102 } catch(const exception& error) {
103
104 JHead buffer(header);
105
108
109 copy(buffer, header);
110 }
111 {
112 JHead buffer(header);
113
116
117 copy(buffer, header);
118 }
119
122
124
126
128
130
131 if (
mc.getEntries() != 0) {
132
133 Evt*
event =
mc.getEntry(
tev->getCounter());
134
136
137 out = *event;
138
141 }
142
144 i->pos += offset;
145 }
146 }
147
148 } else {
149
150 out.
mc_id = inputFile.getCounter();
152 }
153
155
157
159
160 const JModule&
module = router.getModule(i->getModuleID());
161 const JPMT& pmt =
module.getPMT (i->getPMT());
162
164
166 hit.dom_id = i->getModuleID();
167
168
169
170 hit.pmt_id = pmt.getID();
173
174
175
177 }
178
179
180
182
184 if (t0 > i->t) {
185 t0 = i->t;
186 }
187 }
188
190 i->t -= t0;
191 }
192
195 }
196
197 out.
id = inputFile.getCounter();
198
200 }
201
203
204
205
206
207
209}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JAANET::start_run start_run
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
Data structure for PMT geometry, calibration and status.
Template definition of a multi-dimensional oscillation probability interpolation table.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Vec getOffset(const JHead &header)
Get offset.
std::istream & read(std::istream &in, JTestSummary &summary)
Read test summary.
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).
double getLivetime(const std::string &file_name)
Get data taking live time.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
int mc_id
identifier of the MC event (as found in ascii or antcc file).
double mc_t
MC: time where the mc-event was put in the timeslice, since start of run (offset+frameidx*timeslice_d...
std::vector< Hit > hits
list of hits
int mc_run_id
MC run identifier.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
int id
offline event identifier
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Vec class is a straightforward 3-d vector, which also works in pyroot.