Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-10 05:44:04

0001 #include "L1Trigger/L1THGCalUtilities/interface/HGCalTriggerNtupleBase.h"
0002 
0003 class HGCalTriggerNtupleEvent : public HGCalTriggerNtupleBase {
0004 public:
0005   HGCalTriggerNtupleEvent(const edm::ParameterSet&);
0006 
0007   void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final;
0008   void fill(const edm::Event&, const HGCalTriggerNtupleEventSetup&) final;
0009 
0010 private:
0011   void clear() final;
0012 
0013   int run_;
0014   int event_;
0015   int lumi_;
0016 };
0017 
0018 DEFINE_EDM_PLUGIN(HGCalTriggerNtupleFactory, HGCalTriggerNtupleEvent, "HGCalTriggerNtupleEvent");
0019 
0020 HGCalTriggerNtupleEvent::HGCalTriggerNtupleEvent(const edm::ParameterSet& conf) : HGCalTriggerNtupleBase(conf) {
0021   accessEventSetup_ = false;
0022 }
0023 
0024 void HGCalTriggerNtupleEvent::initialize(TTree& tree, const edm::ParameterSet&, edm::ConsumesCollector&&) {
0025   clear();
0026   tree.Branch("run", &run_, "run/I");
0027   tree.Branch("event", &event_, "event/I");
0028   tree.Branch("lumi", &lumi_, "lumi/I");
0029 }
0030 
0031 void HGCalTriggerNtupleEvent::fill(const edm::Event& e, const HGCalTriggerNtupleEventSetup& es) {
0032   run_ = e.id().run();
0033   lumi_ = e.luminosityBlock();
0034   event_ = e.id().event();
0035 }
0036 
0037 void HGCalTriggerNtupleEvent::clear() {
0038   run_ = 0;
0039   lumi_ = 0;
0040   event_ = 0;
0041 }