CMS 3D CMS Logo

BPHAnalyzerTokenWrapper.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHAnalyzerTokenWrapper_h
2 #define HeavyFlavorAnalysis_RecoDecay_BPHAnalyzerTokenWrapper_h
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
26 
27 //---------------
28 // C++ Headers --
29 //---------------
30 #include <string>
31 
32 // ---------------------
33 // -- Class Interface --
34 // ---------------------
35 
37 public:
42 };
43 
44 template <class Obj>
46 public:
47  typedef typename edm::EDGetTokenT<Obj> type;
48  bool get(const edm::Event& ev, edm::Handle<Obj>& obj) { return ev.getByToken(token, obj); }
50 };
51 
52 template <class T>
53 class BPHAnalyzerWrapper : public T {
54 protected:
55  template <class Obj>
58  tw.token = this->template consumes<Obj>(tag);
59  return;
60  }
61  template <class Obj>
63  tw.token = this->template consumes<Obj>(tag);
64  return;
65  }
66 };
67 
68 #endif
EDAnalyzer.h
EDProducer.h
EDAnalyzer.h
BPHModuleWrapper::one_analyzer
edm::one::EDAnalyzer one_analyzer
Definition: BPHAnalyzerTokenWrapper.h:38
BPHModuleWrapper
Definition: BPHAnalyzerTokenWrapper.h:36
edm::EDGetTokenT< Obj >
BPHModuleWrapper::stream_producer
edm::stream::EDProducer stream_producer
Definition: BPHAnalyzerTokenWrapper.h:41
EDProducer.h
BPHTokenWrapper
Definition: BPHAnalyzerTokenWrapper.h:45
edm::one::EDProducer<>
BPHTokenWrapper::get
bool get(const edm::Event &ev, edm::Handle< Obj > &obj)
Definition: BPHAnalyzerTokenWrapper.h:48
edm::one::EDAnalyzer<>
edm::Handle
Definition: AssociativeIterator.h:50
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
BPHAnalyzerWrapper::consume
void consume(BPHTokenWrapper< Obj > &tw, const edm::InputTag &tag)
Definition: BPHAnalyzerTokenWrapper.h:62
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
BPHModuleWrapper::one_producer
edm::one::EDProducer one_producer
Definition: BPHAnalyzerTokenWrapper.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BPHAnalyzerWrapper::consume
void consume(BPHTokenWrapper< Obj > &tw, const std::string &label)
Definition: BPHAnalyzerTokenWrapper.h:56
EDConsumerBase.h
edm::stream::EDAnalyzer<>
Event.h
edm::stream::EDProducer<>
BPHTokenWrapper::type
edm::EDGetTokenT< Obj > type
Definition: BPHAnalyzerTokenWrapper.h:47
BPHTokenWrapper::token
type token
Definition: BPHAnalyzerTokenWrapper.h:49
T
long double T
Definition: Basic3DVectorLD.h:48
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
BPHAnalyzerWrapper
Definition: BPHAnalyzerTokenWrapper.h:53
BPHModuleWrapper::stream_analyzer
edm::stream::EDAnalyzer stream_analyzer
Definition: BPHAnalyzerTokenWrapper.h:40
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11