CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EcalCompactTrigPrimProducer Class Reference

#include <EcalCompactTrigPrimProducer.h>

Inheritance diagram for EcalCompactTrigPrimProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EcalCompactTrigPrimProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es)
 
virtual ~EcalCompactTrigPrimProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag inCollection_
 
std::string outCollection_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

$Id: $Date: $Revision:

Author
Ph. Gras CEA/IRFU Saclay

Definition at line 16 of file EcalCompactTrigPrimProducer.h.

Constructor & Destructor Documentation

EcalCompactTrigPrimProducer::EcalCompactTrigPrimProducer ( const edm::ParameterSet ps)

Definition at line 14 of file EcalCompactTrigPrimProducer.cc.

References outCollection_.

14  :
16  outCollection_(ps.getParameter<std::string>("outColl"))
17 {
18 
19  produces<EcalTrigPrimCompactColl>(outCollection_);
20 }
T getParameter(std::string const &) const
virtual EcalCompactTrigPrimProducer::~EcalCompactTrigPrimProducer ( )
inlinevirtual

Definition at line 20 of file EcalCompactTrigPrimProducer.h.

20 {}

Member Function Documentation

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().

23 {
24  std::auto_ptr<EcalTrigPrimCompactColl> outColl(new EcalTrigPrimCompactColl);
26  event.getByLabel(inCollection_, 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(outColl, outCollection_);
35 }
std::vector< T >::const_iterator const_iterator
const_iterator end() const
T const * product() const
Definition: Handle.h:74
const_iterator begin() const

Member Data Documentation

edm::InputTag EcalCompactTrigPrimProducer::inCollection_
private

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().