CMS 3D CMS Logo

AlCaEcalHcalReadoutsProducer.cc
Go to the documentation of this file.
3 
5  tok_ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
6  tok_hf_ = consumes<HFRecHitCollection>(iConfig.getParameter<edm::InputTag>("hfInput"));
7  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
8 
9  //register your products
10  put_hbhe_ = produces<HBHERecHitCollection>("HBHERecHitCollection");
11  put_ho_ = produces<HORecHitCollection>("HORecHitCollection");
12  put_hf_ = produces<HFRecHitCollection>("HFRecHitCollection");
13 }
14 
15 // ------------ method called to produce the data ------------
17  using namespace edm;
18  using namespace std;
19 
23 
24  iEvent.getByToken(tok_hbhe_, hbhe);
25  if (!hbhe.isValid()) {
26  LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hbhe product!" << std::endl;
27  return;
28  }
29 
30  iEvent.getByToken(tok_ho_, ho);
31  if (!ho.isValid()) {
32  LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get ho product!" << std::endl;
33  }
34 
35  iEvent.getByToken(tok_hf_, hf);
36  if (!hf.isValid()) {
37  LogDebug("") << "AlCaEcalHcalReadoutProducer: Error! can't get hf product!" << std::endl;
38  }
39 
40  //Put selected information in the event
41  iEvent.emplace(put_hbhe_, *hbhe);
42  iEvent.emplace(put_ho_, *ho);
43  iEvent.emplace(put_hf_, *hf);
44 }
edm::StreamID
Definition: StreamID.h:30
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::Handle
Definition: AssociativeIterator.h:50
AlCaEcalHcalReadoutsProducer.h
AlCaEcalHcalReadoutsProducer::tok_hf_
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
Definition: AlCaEcalHcalReadoutsProducer.h:47
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
AlCaEcalHcalReadoutsProducer::tok_ho_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
Definition: AlCaEcalHcalReadoutsProducer.h:46
AlCaEcalHcalReadoutsProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: AlCaEcalHcalReadoutsProducer.cc:16
AlCaEcalHcalReadoutsProducer::put_hf_
edm::EDPutTokenT< HFRecHitCollection > put_hf_
Definition: AlCaEcalHcalReadoutsProducer.h:51
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
edm::EventSetup
Definition: EventSetup.h:57
AlCaEcalHcalReadoutsProducer::put_ho_
edm::EDPutTokenT< HORecHitCollection > put_ho_
Definition: AlCaEcalHcalReadoutsProducer.h:50
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
std
Definition: JetResolutionObject.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlCaEcalHcalReadoutsProducer::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: AlCaEcalHcalReadoutsProducer.h:45
AlCaEcalHcalReadoutsProducer::put_hbhe_
edm::EDPutTokenT< HBHERecHitCollection > put_hbhe_
Definition: AlCaEcalHcalReadoutsProducer.h:49
AlCaEcalHcalReadoutsProducer::AlCaEcalHcalReadoutsProducer
AlCaEcalHcalReadoutsProducer(const edm::ParameterSet &)
Definition: AlCaEcalHcalReadoutsProducer.cc:4
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15