|
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 | process (Event &event) final |
| Processing an event for a Producer is calling produce. | |
Public Member Functions inherited from framework::EventProcessor | |
| DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &) | |
| declare that we have a factory for this class | |
| EventProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~EventProcessor ()=default |
| Class destructor. | |
| virtual void | beforeNewRun (ldmx::RunHeader &run_header) |
| Callback for Producers to add parameters to the run header before conditions are initialized. | |
| virtual void | onNewRun (const ldmx::RunHeader &run_header) |
| Callback for the EventProcessor to take any necessary action when the run being processed changes. | |
| virtual void | onFileOpen (EventFile &event_file) |
| Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened. | |
| virtual void | onFileClose (EventFile &event_file) |
| 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 | |
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 | conditions_intf_ |
| Conditions interface. | |
| G4UImanager * | ui_manager_ {nullptr} |
| User interface handle. | |
| std::unique_ptr< RunManager > | run_manager_ |
| Manager controlling G4 simulation run. | |
| std::unique_ptr< LoggedSession > | session_handle_ |
| Handle to the G4Session -> how to deal with G4cout and G4cerr. | |
| framework::config::Parameters | parameters_ |
| The parameters used to configure the simulation. | |
| std::vector< std::string > | pre_init_commands_ |
| std::vector< std::string > | post_init_commands_ |
Protected Attributes inherited from framework::EventProcessor | |
| HistogramPool | histograms_ |
| helper object for making and filling histograms | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Static Protected Attributes inherited from simcore::SimulatorBase | |
| static const std::vector< std::string > | INVALID_COMMANDS |
| 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::get(), 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 27 of file ReSimulator.cxx.
References framework::EventProcessor::abortEvent(), simcore::SimulatorBase::run_manager_, and skip().
|
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 67 of file ReSimulator.cxx.
References care_about_run_, events_to_resimulate_, 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().