CMS 3D CMS Logo

HGCalTriggerNtupleEvent.cc
Go to the documentation of this file.
2 
4 {
5  public:
7 
8  virtual void initialize(TTree&,const edm::ParameterSet&, edm::ConsumesCollector &&) override final;
9  virtual void fill(const edm::Event&,const edm::EventSetup&) override final;
10 
11  private:
12  virtual void clear() override 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
virtual void clear() override final
HGCalTriggerNtupleEvent(const edm::ParameterSet &)
edm::EventID id() const
Definition: EventBase.h:60
#define DEFINE_EDM_PLUGIN(factory, type, name)
virtual void fill(const edm::Event &, const edm::EventSetup &) override final
virtual void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) override final
Definition: tree.py:1