54{
58
60
61
64
65 string oscProbTable;
67
69
71
72 try {
73
75
82
83 zap(argc, argv);
84 }
85 catch(const exception& error) {
86 FATAL(error.what() << endl);
87 }
88
89
90
91
92 if (!oscProbTable.empty()) {
93
95
96 interpolator.
load(oscProbTable.c_str());
97 interpolator.set (oscParameters);
98 }
99
100
101
102
104
105 if (scanners.setEvtWeightFactor(factors) == 0) {
106 FATAL(
"No weight factors could be set." << endl);
107 }
108
110
112
114
116
118
120
123
124 commonHeader = commonHeader.
getMatch(header);
125
126 eventHeaders.
merge(header);
127
128 while (scanner->hasNext()) {
129
130 Evt*
event = scanner->next();
131
132 if (event == NULL) {
133 WARNING(
"Event " << scanner->getCounter() <<
" is empty; skip.");
134 continue;
135 }
136
137 const double weight = scanner->getWeight(*event);
138
141
142 if (!isfinite(weight)) {
143
144 WARNING(
"Non-finite reweighting factor " << weight <<
145 " for event " << scanner->getCounter() << "!");
146 }
147
150 }
151
152 const JUUID headerUUID = (uuid_is_null(event->header_uuid) == 0 ?
154
157
158 uuid_copy(event->header_uuid, headerUUID.
uuid);
159
161 }
162 }
163
165 copy(commonHeader, newHead);
166
168
170
172
174
176
177 return 0;
178}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template specialisation for a map between event categories and event-weight factor products.
void createUUID()
Create UUID if not already set.
const JHead & getHeader() const
Get header.
JHead getMatch(const JHead &header) const
Get matching fields.
Data structure for set of track fit results.
Data structure for single set of oscillation parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load(const char *const fileName)
Load oscillation probability table from file.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
void copy(const Head &from, JHead &to)
Copy header from from to to.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JMultiHead getMultiHeader(const JMultipleFileScanner_t &file_list)
Get multi-header corresponding to a given file list.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Auxiliary data structure to store multiple headers and bookkeep event-weight normalisations.
void merge(const JHead &header)
Merge the given header into this object.
double getNormalisation(const JUUID &UUID) const
Get normalisation for given header UUID.
JUUID getHeaderUUID(const Evt &event) const
Get the header UUID corresponding to the given event.
Auxiliary class for recursive type list generation.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
std::vector< filescanner_type >::iterator iterator
Auxiliary base class for list of file names.
Auxiliary data structure for alignment of data.
Auxiliary data structure for floating point format specification.
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
static const int WEIGHTLIST_NORMALISATION
Event rate normalisation.