CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
std::vector< T >::const_iterator const_iterator
def move
Definition: eostools.py:511
const_iterator end() const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const_iterator begin() const
EcalCompactTrigPrimProducer(const edm::ParameterSet &ps)