23 int main(
int argc,
char **argv)
28 JMultipleFileScanner<JAAnetTypes_t> inputFile;
37 JParser<> zap(
"Auxiliary program to preprocess aanet files.");
41 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
43 zap[
'H'] =
make_field(filterEmptyMCH,
"Filter events without hits.");
44 zap[
'T'] =
make_field(timeOffset_ms,
"Add time offset [ms] to events.") = 0;
48 catch(
const exception& error) {
49 FATAL(error.what() << endl);
55 Head header = inputFile.getHeader();
57 JMultipleFileScanner<Evt> in = inputFile;
61 while (in.hasNext()) {
65 if (filterEmptyMCH and cur->mc_hits.empty()) {
continue; }
67 if (timeOffset_ms != 0) {
add_time_offset (*cur, 1.0e6 * timeOffset_ms); }
Utility class to parse command line options.
void add_time_offset(Evt &evt, const double tOff)
Add time offset to mc event; according to current definition, the absolute time of the event is defin...
Recording of objects on file according a format that follows from the file name extension.
JLimit JLimit_t
Type definition of limit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
ROOT TTree parameter settings.
const JLimit & getLimit() const
Get limit.
int main(int argc, char *argv[])