LDMX Software
ReSimulator.h
1
2#ifndef SIMCORE_RESIMULATOR_H_
3#define SIMCORE_RESIMULATOR_H_
4#include "Framework/EventFile.h"
5#include "Framework/Process.h"
6#include "SimCore/SensitiveDetector.h"
7#include "SimCore/SimulatorBase.h"
8namespace simcore {
9class ReSimulator : public SimulatorBase {
10 public:
11 ReSimulator(const std::string& name, framework::Process& process)
12 : SimulatorBase{name, process} {}
19 void configure(framework::config::Parameters& parameters) override;
26 void produce(framework::Event& event) override;
27
28 private:
34 bool skip(framework::Event& event) const;
35
45 std::vector<std::pair<int, int>> events_to_resimulate_;
46
51
57
58 /*
59 * How many events have already been resimulated. This determines the event
60 * number in the output file, since more than one input file can be used.
61 *
62 */
63 int events_resimulated_ = 0;
64};
65} // namespace simcore
66
67#endif /* SIMCORE_RESIMULATOR_H_ */
Class which represents the process under execution.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
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:45
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:56
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:50