CMS 3D CMS Logo

HGCalTriggerNtupleEvent.cc
Go to the documentation of this file.
2 
4 {
5  public:
7 
8  void initialize(TTree&,const edm::ParameterSet&, edm::ConsumesCollector &&) final;
9  void fill(const edm::Event&,const edm::EventSetup&) final;
10 
11  private:
12  void clear() final;
13 
14  int run_;
15  int event_;
16  int lumi_;
17 };
18 
21  "HGCalTriggerNtupleEvent" );
22 
23 
26 {
27 }
28 
29 void
32 {
33  clear();
34  tree.Branch("run", &run_, "run/I" );
35  tree.Branch("event", &event_, "event/I");
36  tree.Branch("lumi", &lumi_, "lumi/I");
37 }
38 
39 void
41 fill(const edm::Event& e,const edm::EventSetup& es)
42 {
43  run_ = e.id().run();
44  lumi_ = e.luminosityBlock();
45  event_ = e.id().event();
46 }
47 
48 void
51 {
52  run_ = 0;
53  lumi_ = 0;
54  event_ = 0;
55 }
56 
57 
58 
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
void fill(const edm::Event &, const edm::EventSetup &) final
HGCalTriggerNtupleEvent(const edm::ParameterSet &)
edm::EventID id() const
Definition: EventBase.h:60
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: tree.py:1