LDMX Software
|
Public Member Functions | |
ReSimulator (const std::string &name, framework::Process &process) | |
void | configure (framework::config::Parameters ¶meters) override |
Callback for the processor to configure itself from the given set of parameters. | |
void | produce (framework::Event &event) override |
Run resimulation if the event is part of the requested sets of events to resimulate. | |
Public Member Functions inherited from simcore::SimulatorBase | |
SimulatorBase (const std::string &name, framework::Process &process) | |
void | configure (framework::config::Parameters ¶meters) override |
Callback for the EventProcessor to configure itself from the given set of parameters. | |
Public Member Functions inherited from framework::Producer | |
Producer (const std::string &name, Process &process) | |
Class constructor. | |
virtual void | beforeNewRun (ldmx::RunHeader &header) |
Handle allowing producers to modify run headers before the run begins. | |
Public Member Functions inherited from framework::EventProcessor | |
EventProcessor (const std::string &name, Process &process) | |
Class constructor. | |
virtual | ~EventProcessor () |
Class destructor. | |
virtual void | onNewRun (const ldmx::RunHeader &runHeader) |
Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
virtual void | onFileOpen (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
virtual void | onFileClose (EventFile &eventFile) |
Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed. | |
template<class T > | |
const T & | getCondition (const std::string &condition_name) |
Access a conditions object for the current event. | |
TDirectory * | getHistoDirectory () |
Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples. | |
void | setStorageHint (framework::StorageControl::Hint hint) |
Mark the current event as having the given storage control hint from this module. | |
void | setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString) |
Mark the current event as having the given storage control hint from this module and the given purpose string. | |
int | getLogFrequency () const |
Get the current logging frequency from the process. | |
int | getRunNumber () const |
Get the run number from the process. | |
std::string | getName () const |
Get the processor name. | |
void | createHistograms (const std::vector< framework::config::Parameters > &histos) |
Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create. | |
Private Member Functions | |
bool | skip (framework::Event &event) const |
Check if an event should be skipped during resimulation. | |
Private Attributes | |
std::vector< std::pair< int, int > > | events_to_resimulate_ |
List of events in the input files that should be resimulated if resimulate_all_events is false. | |
bool | resimulate_all_events_ |
Whether to resimulate all events in the input files. | |
bool | care_about_run_ |
Whether or not we should check the run number when seeing if a specific event should be resimulated. | |
int | events_resimulated_ = 0 |
Additional Inherited Members | |
Static Public Member Functions inherited from framework::EventProcessor | |
static void | declare (const std::string &classname, int classtype, EventProcessorMaker *) |
Internal function which is part of the PluginFactory machinery. | |
Static Public Attributes inherited from framework::Producer | |
static const int | CLASSTYPE {1} |
Constant used to track EventProcessor types by the PluginFactory. | |
Protected Member Functions inherited from simcore::SimulatorBase | |
void | onProcessEnd () override |
Callback called once processing is complete. | |
void | onProcessStart () override |
Initialization of simulation. | |
virtual void | updateEventHeader (ldmx::EventHeader &eventHeader) const |
virtual void | saveTracks (framework::Event &event) |
virtual void | saveSDHits (framework::Event &event) |
Protected Member Functions inherited from framework::EventProcessor | |
void | abortEvent () |
Abort the event immediately. | |
Protected Attributes inherited from simcore::SimulatorBase | |
ConditionsInterface | conditionsIntf_ |
Conditions interface. | |
G4UImanager * | uiManager_ {nullptr} |
User interface handle. | |
std::unique_ptr< RunManager > | runManager_ |
Manager controlling G4 simulation run. | |
std::unique_ptr< G4UIsession > | sessionHandle_ |
Handle to the G4Session -> how to deal with G4cout and G4cerr. | |
int | verbosity_ {1} |
Vebosity for the simulation. | |
framework::config::Parameters | parameters_ |
The parameters used to configure the simulation. | |
std::vector< std::string > | preInitCommands_ |
std::vector< std::string > | postInitCommands_ |
Protected Attributes inherited from framework::EventProcessor | |
HistogramHelper | histograms_ |
Interface class for making and filling histograms. | |
NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
Manager for any ntuples. | |
logging::logger | theLog_ |
The logger for this EventProcessor. | |
Static Protected Attributes inherited from simcore::SimulatorBase | |
static const std::vector< std::string > | invalidCommands_ |
Commands not allowed to be passed from python config file This is because Simulator already runs them. | |
Definition at line 9 of file ReSimulator.h.
|
inline |
Definition at line 11 of file ReSimulator.h.
|
overridevirtual |
Callback for the processor to configure itself from the given set of parameters.
parameters | ParameterSet for configuration. |
Reimplemented from framework::EventProcessor.
Definition at line 5 of file ReSimulator.cxx.
References care_about_run_, simcore::SimulatorBase::configure(), events_to_resimulate_, framework::config::Parameters::getParameter(), and resimulate_all_events_.
|
overridevirtual |
Run resimulation if the event is part of the requested sets of events to resimulate.
event | The event to process. |
Implements simcore::SimulatorBase.
Definition at line 28 of file ReSimulator.cxx.
References framework::EventProcessor::abortEvent(), simcore::Factory< Prototype, PrototypePtr, PrototypeConstructorArgs >::apply(), simcore::Factory< Prototype, PrototypePtr, PrototypeConstructorArgs >::get(), simcore::SimulatorBase::runManager_, skip(), and simcore::SimulatorBase::verbosity_.
|
private |
Check if an event should be skipped during resimulation.
[in] | event | handle to the current event being processed |
If we are configured to simply resimulate all events, this function always returns false.
Otherwise, we check the event number (and also its run number if we care_about_run_) against the list of run/event pairs that we are interested in re-simulating.
Definition at line 71 of file ReSimulator.cxx.
References care_about_run_, events_to_resimulate_, framework::Event::getEventHeader(), ldmx::EventHeader::getRun(), and resimulate_all_events_.
Referenced by produce().
|
private |
Whether or not we should check the run number when seeing if a specific event should be resimulated.
Definition at line 56 of file ReSimulator.h.
Referenced by configure(), and skip().
|
private |
Definition at line 63 of file ReSimulator.h.
|
private |
List of events in the input files that should be resimulated if resimulate_all_events
is false.
Each event is identified uniquely by its run number and event number.
events_to_resimulate_
is not part of the input file, it will be ignored. Definition at line 45 of file ReSimulator.h.
Referenced by configure(), and skip().
|
private |
Whether to resimulate all events in the input files.
Definition at line 50 of file ReSimulator.h.
Referenced by configure(), and skip().