CMS 3D CMS Logo

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