LDMX Software
NtupleWriter.h
1#ifndef TRIGGER_NTUPLEWRITER_H_
2#define TRIGGER_NTUPLEWRITER_H_
3
5#include "TFile.h"
6// #include "TTree.h"
7using std::vector;
8
9namespace trigger {
10
16 public:
17 NtupleWriter(const std::string& name, framework::Process& process);
19 virtual void produce(framework::Event& event);
20 virtual void onProcessStart();
21 virtual void onProcessEnd();
22
23 private:
24 TFile* out_file_{nullptr};
25 std::string tag_{"Events"};
26 std::string out_path_{"./ntuple.root"};
27
28 std::string target_sp_hits_event_passname_;
29 std::string target_sp_passname_;
30
31 std::string ecal_sp_hits_events_passname_;
32 std::string ecal_sp_passname_;
33
34 std::string ecal_trig_sums_event_passname_;
35 std::string ecal_trig_sums_passname_;
36
37 std::string hcal_trig_quads_events_passname_;
38 std::string hcal_trig_quads_passname_;
39
40 std::string trig_electrons_event_passname_;
41 std::string trig_electrons_passname_;
42
43 bool write_truth_{true};
44 bool write_ele_{true};
45 bool write_ecal_sums_{true};
46 bool write_hcal_sums_{true};
47 bool write_ecal_trig_mi_ps_{true};
48 bool write_hcal_trig_mi_ps_{true};
49};
50} // namespace trigger
51
52#endif // TRIGGER_NTUPLEWRITER_H_
Base classes for all user event processing components to extend.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
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
Null algorithm test.
virtual void onProcessStart()
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
virtual void configure(framework::config::Parameters &)
Callback for the EventProcessor to configure itself from the given set of parameters.
virtual void produce(framework::Event &event)
Process the event and put new data products into it.
virtual void onProcessEnd()
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...