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
FixedGridRhoProducer Class Reference

#include <FixedGridRhoProducer.h>

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

Public Member Functions

 FixedGridRhoProducer (const edm::ParameterSet &iConfig)
 
virtual ~FixedGridRhoProducer ()
 
- 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 beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run &, edm::EventSetup const &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void endRun (edm::Run &, edm::EventSetup const &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

FixedGridEnergyDensityalgo
 
FixedGridEnergyDensity::EtaRegion myEtaRegion
 
edm::InputTag pfCandidatesTag_
 

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)
 
static void prevalidate (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

Definition at line 9 of file FixedGridRhoProducer.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file FixedGridRhoProducer.cc.

References FixedGridEnergyDensity::All, FixedGridEnergyDensity::Central, FixedGridEnergyDensity::Forward, and edm::ParameterSet::getParameter().

7  {
8  pfCandidatesTag_ = iConfig.getParameter<edm::InputTag>("pfCandidatesTag");
9  string etaRegion = iConfig.getParameter<string>("EtaRegion");
10  if (etaRegion=="Central") myEtaRegion = FixedGridEnergyDensity::Central;
11  else if (etaRegion=="Forward") myEtaRegion = FixedGridEnergyDensity::Forward;
12  else if (etaRegion=="All") myEtaRegion = FixedGridEnergyDensity::All;
13  else {
14  edm::LogWarning("FixedGridRhoProducer") << "Wrong EtaRegion parameter: " << etaRegion << ". Using EtaRegion = Central";
16  }
17  produces<double>();
18 }
T getParameter(std::string const &) const
edm::InputTag pfCandidatesTag_
FixedGridEnergyDensity::EtaRegion myEtaRegion
FixedGridRhoProducer::~FixedGridRhoProducer ( )
virtual

Definition at line 20 of file FixedGridRhoProducer.cc.

20 {}

Member Function Documentation

virtual void FixedGridRhoProducer::beginJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 17 of file FixedGridRhoProducer.h.

17 {};
virtual void FixedGridRhoProducer::beginLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 21 of file FixedGridRhoProducer.h.

21 {};
virtual void FixedGridRhoProducer::beginRun ( edm::Run ,
edm::EventSetup const &   
)
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 19 of file FixedGridRhoProducer.h.

19 {};
virtual void FixedGridRhoProducer::endJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 18 of file FixedGridRhoProducer.h.

18 {};
virtual void FixedGridRhoProducer::endLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 22 of file FixedGridRhoProducer.h.

22 {};
virtual void FixedGridRhoProducer::endRun ( edm::Run ,
edm::EventSetup const &   
)
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 20 of file FixedGridRhoProducer.h.

20 {};
void FixedGridRhoProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 22 of file FixedGridRhoProducer.cc.

References algo, edm::Event::getByLabel(), convertSQLitetoXML_cfg::output, edm::Handle< T >::product(), edm::Event::put(), and query::result.

22  {
23 
25  iEvent.getByLabel(pfCandidatesTag_,pfColl);
26 
27  algo = new FixedGridEnergyDensity(pfColl.product());
28 
30  std::auto_ptr<double> output(new double(result));
31  iEvent.put(output);
32 
33  delete algo;
34 
35 }
edm::InputTag pfCandidatesTag_
FixedGridEnergyDensity * algo
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
float fixedGridRho(EtaRegion etaRegion=Central)
T const * product() const
Definition: Handle.h:74
FixedGridEnergyDensity::EtaRegion myEtaRegion

Member Data Documentation

FixedGridEnergyDensity* FixedGridRhoProducer::algo
private

Definition at line 26 of file FixedGridRhoProducer.h.

FixedGridEnergyDensity::EtaRegion FixedGridRhoProducer::myEtaRegion
private

Definition at line 25 of file FixedGridRhoProducer.h.

edm::InputTag FixedGridRhoProducer::pfCandidatesTag_
private

Definition at line 22 of file FixedGridRhoProducer.h.