CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HGCalTriggerNtupleBase.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCalUtilities_HGCalTriggerNtupleBase_h__
2 #define __L1Trigger_L1THGCalUtilities_HGCalTriggerNtupleBase_h__
3 
10 #include "TTree.h"
11 
12 namespace HepPDT {
13  class ParticleDataTable;
14 }
15 class MagneticField;
17 
22 };
23 
25 public:
26  HGCalTriggerNtupleBase(const edm::ParameterSet& conf) : name_(conf.getParameter<std::string>("NtupleName")){};
28  const std::string& name() const { return name_; }
29  virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) = 0;
30  virtual void fill(const edm::Event&, const HGCalTriggerNtupleEventSetup&) {
31  edm::LogWarning("NotImplemented") << "Calling ntuplizer fill(edm::Event, HGCalTriggerNtupleEventSetup), but it is "
32  "not implemented in the concrete class '"
33  << name() << "'. "
34  << "You might want to set 'accessEventSetup_' to true in order to call "
35  "fill(edm::Event, edm::EventSetup) instead.";
36  }
37  // Kept for backward compatibility: used in L1Trigger/L1CaloTrigger/test
38  virtual void fill(const edm::Event&, const edm::EventSetup&) {
39  edm::LogWarning("NotImplemented")
40  << "Calling ntuplizer fill(edm::Event, edm::EventSetup), but it is not implemented in the concrete class '"
41  << name() << "'. "
42  << "You might want to set 'accessEventSetup_' to false in order to call fill(edm::Event, "
43  "HGCalTriggerNtupleEventSetup) instead.";
44  }
45  bool accessEventSetup() const { return accessEventSetup_; }
46 
47 protected:
48  virtual void clear() = 0;
49  bool accessEventSetup_ = true;
51 };
52 
55 
56 #endif
edm::ESHandle< MagneticField > magfield
HepPDT::ParticleDataTable ParticleDataTable
edm::ESHandle< HGCalTriggerGeometryBase > geometry
virtual void fill(const edm::Event &, const HGCalTriggerNtupleEventSetup &)
edm::ESHandle< HepPDT::ParticleDataTable > pdt
virtual void fill(const edm::Event &, const edm::EventSetup &)
edmplugin::PluginFactory< HGCalTriggerNtupleBase *(const edm::ParameterSet &)> HGCalTriggerNtupleFactory
virtual void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&)=0
virtual void clear()=0
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
const std::string & name() const
Log< level::Warning, false > LogWarning