51int main(
int argc,
char **argv)
78 catch(
const exception& error) {
79 FATAL(error.what() << endl);
87 FATAL(
"No weight factors could be set." << endl);
92 JHead commonHeader = scanners.begin()->getHeader();
106 commonHeader = commonHeader.
getMatch(header);
108 eventHeaders.
merge(header);
112 Evt*
event = in.next();
115 WARNING(
"Event " << in.getCounter() <<
" is empty; skip.");
119 const double weight = scanner->getWeight(*event);
124 if (!isfinite(weight)) {
126 WARNING(
"Non-finite reweighting factor " << weight <<
127 " for event " << in.getCounter() <<
"!");
134 const JUUID headerUUID = (uuid_is_null(event->header_uuid) == 0 ?
140 uuid_copy(event->header_uuid, headerUUID.
uuid);
147 copy(commonHeader, newHead);
int main(int argc, char **argv)
Recording of objects on file according a format that follows from the file name extension.
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition of particle types.
I/O formatting auxiliaries.
ROOT TTree parameter settings of various packages.
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.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
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.
size_t setEvtWeightFactor(const JEvtCategoryHelper &category, const JEvtWeightFactorHelper &factor)
Set event-weighting factor for all MC-files corresponding to a given PDG code.
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.