CMS 3D CMS Logo

EcalCompactTrigPrimProducer.cc
Go to the documentation of this file.
1 
11 
12 
13 
15  outCollection_(ps.getParameter<std::string>("outColl"))
16 {
17 
18  inCollectionToken_=consumes<EcalTrigPrimDigiCollection>((ps.getParameter<edm::InputTag>("inColl")));
19  produces<EcalTrigPrimCompactColl>(outCollection_);
20 }
21 
23 {
24  auto outColl = std::make_unique<EcalTrigPrimCompactColl>();
26  event.getByToken(inCollectionToken_, hTPDigis);
27 
28  const EcalTrigPrimDigiCollection* trigPrims = hTPDigis.product();
29 
30  for(EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims->begin();
31  trigPrim != trigPrims->end(); ++trigPrim){
32  outColl->setValue(trigPrim->id().ieta(), trigPrim->id().iphi(), trigPrim->sample(trigPrim->sampleOfInterest()).raw());
33  }
34  event.put(std::move(outColl), outCollection_);
35 }
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
virtual void produce(edm::Event &evt, const edm::EventSetup &es)
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
const_iterator end() const
def move(src, dest)
Definition: eostools.py:510
const_iterator begin() const
Definition: event.py:1
EcalCompactTrigPrimProducer(const edm::ParameterSet &ps)