9#include <generators/modules/HepevtInputModule.h>
11#include <framework/logging/Logger.h>
12#include <framework/datastore/DataStore.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/dataobjects/EventMetaData.h>
15#include <framework/datastore/StoreObjPtr.h>
25 setDescription(
"HepEvt file input. This module loads an event record from HEPEVT format and store the content into the MCParticle collection. HEPEVT format is a standard event record format to contain an event record in a Monte Carlo-independent format.");
31 "Boolean to indicate whether the event numbers from input file should be used.",
false);
35 addParam(
"useWeights",
m_useWeights,
"Set to 'true' to if generator weights should be propagated.",
false);
36 addParam(
"nVirtualParticles",
m_nVirtual,
"Number of particles at the beginning of the events that should be made virtual.", 0);
37 addParam(
"wrongSignPz",
m_wrongSignPz,
"Boolean to signal that directions of HER and LER were switched",
false);
44 B2FATAL(
"The exp. and run numbers are not properly initialized: please set the 'expNum' and 'runNum' parameters of the HepevtInput module.");
47 B2INFO(
"HepevtInput acts as input module for this process. This means the exp., run and event numbers will be set by this module.");
53 B2FATAL(
"Invalid list of input files, no entries found.");
62 }
catch (runtime_error& e) {
95 }
catch (HepevtReader::HepEvtEmptyEventError&) {
96 B2DEBUG(100,
"Reached end of HepEvt file.");
104 }
catch (runtime_error& e) {
109 B2DEBUG(100,
"Reached end of all HepEvt files.");
111 }
catch (runtime_error& e) {
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
@ c_checkCyclic
Check for cyclic dependencies.
@ c_setDecayInfo
Set decay time and vertex.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_Input
This module is an input module (reads data).
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.