CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
57  edm::InputTag tag(label);
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
void consume(BPHTokenWrapper< Obj > &tw, const edm::InputTag &tag)
edm::one::EDProducer one_producer
edm::EDGetTokenT< Obj > type
void consume(BPHTokenWrapper< Obj > &tw, const std::string &label)
bool ev
char const * label
edm::one::EDAnalyzer one_analyzer
edm::stream::EDProducer stream_producer
edm::stream::EDAnalyzer stream_analyzer
long double T