CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFGSFixLinker.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFProducer_PFGSFixLinker_h
2 #define RecoParticleFlow_PFProducer_PFGSFixLinker_h
3 
13 
19 
20 #include <string>
21 
23  public:
24  explicit PFGSFixLinker(const edm::ParameterSet&);
26 
27  void produce(edm::Event&, const edm::EventSetup&) override;
28 
29  template<typename T>
30  void
32  {
33  token = consumes<T>(pset.getParameter<edm::InputTag>(label));
34  }
35  template<typename T>
38  {
40  if (!_event.getByToken(token, handle))
41  throw cms::Exception("ProductNotFound") << name;
42 
43  return handle;
44  }
45 
46  private:
50 
54  // new -> old map
57 
60 };
61 
62 #endif
T getParameter(std::string const &) const
edm::Handle< T > getHandle(edm::Event const &_event, edm::EDGetTokenT< T > const &token, std::string const &name)
Definition: PFGSFixLinker.h:37
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void produce(edm::Event &, const edm::EventSetup &) override
std::string electronsMapName_
Definition: PFGSFixLinker.h:58
PFGSFixLinker(const edm::ParameterSet &)
edm::ValueMap< reco::GsfElectronRef > ElectronRefMap
Definition: PFGSFixLinker.h:48
edm::EDGetTokenT< reco::PhotonCollection > inputPhotonsToken_
Definition: PFGSFixLinker.h:53
tuple handle
Definition: patZpeak.py:22
edm::EDGetTokenT< PFCandidateView > inputCandidatesToken_
Definition: PFGSFixLinker.h:51
edm::EDGetTokenT< ElectronRefMap > electronMapToken_
Definition: PFGSFixLinker.h:55
edm::EDGetTokenT< reco::GsfElectronCollection > inputElectronsToken_
Definition: PFGSFixLinker.h:52
void getToken(edm::EDGetTokenT< T > &token, edm::ParameterSet const &pset, std::string const &label)
Definition: PFGSFixLinker.h:31
edm::View< reco::PFCandidate > PFCandidateView
Definition: PFGSFixLinker.h:47
std::string photonsMapName_
Definition: PFGSFixLinker.h:59
edm::ValueMap< reco::PhotonRef > PhotonRefMap
Definition: PFGSFixLinker.h:49
edm::EDGetTokenT< PhotonRefMap > photonMapToken_
Definition: PFGSFixLinker.h:56