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 Member Functions | Private Attributes
CentralityBinProducer Class Reference

#include <RecoHI/CentralityBinProducer/src/CentralityBinProducer.cc>

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

Public Member Functions

 CentralityBinProducer (const edm::ParameterSet &)
 
 ~CentralityBinProducer ()
 
- 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 Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

CentralityProvidercentrality_
 

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 42 of file CentralityBinProducer.cc.

Constructor & Destructor Documentation

CentralityBinProducer::CentralityBinProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 70 of file CentralityBinProducer.cc.

70  :
71  centrality_(0)
72 {
73  produces<int>();
74 }
CentralityProvider * centrality_
CentralityBinProducer::~CentralityBinProducer ( )

Definition at line 77 of file CentralityBinProducer.cc.

78 {
79 
80  // do anything here that needs to be done at desctruction time
81  // (e.g. close files, deallocate resources etc.)
82 
83 }

Member Function Documentation

void CentralityBinProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 107 of file CentralityBinProducer.cc.

108 {
109 }
void CentralityBinProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 113 of file CentralityBinProducer.cc.

113  {
114 }
void CentralityBinProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 92 of file CentralityBinProducer.cc.

References newFWLiteAna::bin, centrality_, CentralityProvider::getBin(), CentralityProvider::newEvent(), and edm::Event::put().

93 {
94  using namespace edm;
95  if(!centrality_) centrality_ = new CentralityProvider(iSetup);
96  centrality_->newEvent(iEvent,iSetup);
97 
98  int bin = centrality_->getBin();
99  std::auto_ptr<int> binp(new int(bin));
100 
101  iEvent.put(binp);
102 
103 }
CentralityProvider * centrality_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
void newEvent(const edm::Event &ev, const edm::EventSetup &iSetup)

Member Data Documentation

CentralityProvider* CentralityBinProducer::centrality_
private

Definition at line 54 of file CentralityBinProducer.cc.

Referenced by produce().