LDMX Software
ReSimulator.h
1
2#ifndef SIMCORE_RESIMULATOR_H_
3#define SIMCORE_RESIMULATOR_H_
4#include "Framework/Process.h"
5#include "SimCore/SimulatorBase.h"
6
7namespace simcore {
8class ReSimulator : public SimulatorBase {
9 public:
10 ReSimulator(const std::string& name, framework::Process& process)
11 : SimulatorBase{name, process} {}
18 void configure(framework::config::Parameters& parameters) override;
25 void produce(framework::Event& event) override;
26
27 private:
33 bool skip(framework::Event& event) const;
34
44 std::vector<std::pair<int, int>> events_to_resimulate_;
45
50
56
57 /*
58 * How many events have already been resimulated. This determines the event
59 * number in the output file, since more than one input file can be used.
60 *
61 */
62 int events_resimulated_ = 0;
63};
64} // namespace simcore
65
66#endif /* SIMCORE_RESIMULATOR_H_ */
Class which represents the process under execution.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void produce(framework::Event &event) override
Run resimulation if the event is part of the requested sets of events to resimulate.
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.
Definition ReSimulator.h:44
void configure(framework::config::Parameters &parameters) override
Callback for the processor to configure itself from the given set of parameters.
bool care_about_run_
Whether or not we should check the run number when seeing if a specific event should be resimulated.
Definition ReSimulator.h:55
bool skip(framework::Event &event) const
Check if an event should be skipped during resimulation.
bool resimulate_all_events_
Whether to resimulate all events in the input files.
Definition ReSimulator.h:49
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...