#include <EcalCompactTrigPrimProducer.h>
Public Member Functions | |
EcalCompactTrigPrimProducer (const edm::ParameterSet &ps) | |
virtual void | produce (edm::Event &evt, const edm::EventSetup &es) |
virtual | ~EcalCompactTrigPrimProducer () |
Private Attributes | |
edm::InputTag | inCollection_ |
std::string | outCollection_ |
$Id: $Date: $Revision:
Definition at line 16 of file EcalCompactTrigPrimProducer.h.
EcalCompactTrigPrimProducer::EcalCompactTrigPrimProducer | ( | const edm::ParameterSet & | ps | ) |
Definition at line 14 of file EcalCompactTrigPrimProducer.cc.
References outCollection_.
: inCollection_(ps.getParameter<edm::InputTag>("inColl")), outCollection_(ps.getParameter<std::string>("outColl")) { produces<EcalTrigPrimCompactColl>(outCollection_); }
virtual EcalCompactTrigPrimProducer::~EcalCompactTrigPrimProducer | ( | ) | [inline, virtual] |
Definition at line 20 of file EcalCompactTrigPrimProducer.h.
{}
void EcalCompactTrigPrimProducer::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 22 of file EcalCompactTrigPrimProducer.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), inCollection_, ExpressReco_HICollisions_FallBack::outColl, outCollection_, and edm::Handle< T >::product().
{ std::auto_ptr<EcalTrigPrimCompactColl> outColl(new EcalTrigPrimCompactColl); edm::Handle<EcalTrigPrimDigiCollection> hTPDigis; event.getByLabel(inCollection_, hTPDigis); const EcalTrigPrimDigiCollection* trigPrims = hTPDigis.product(); for(EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims->begin(); trigPrim != trigPrims->end(); ++trigPrim){ outColl->setValue(trigPrim->id().ieta(), trigPrim->id().iphi(), trigPrim->sample(trigPrim->sampleOfInterest()).raw()); } event.put(outColl, outCollection_); }
Definition at line 26 of file EcalCompactTrigPrimProducer.h.
Referenced by produce().
std::string EcalCompactTrigPrimProducer::outCollection_ [private] |
Definition at line 31 of file EcalCompactTrigPrimProducer.h.
Referenced by EcalCompactTrigPrimProducer(), and produce().