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

#include <CommonTools/UtilAlgos/plugins/EventCountProducer.cc>

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

Public Member Functions

 EventCountProducer (const edm::ParameterSet &)
 
 ~EventCountProducer ()
 
- 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 beginLuminosityBlock (edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

unsigned int eventsProcessedInLumi_
 

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: An event counter that can store the number of events in the lumi block

Definition at line 30 of file EventCountProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 53 of file EventCountProducer.cc.

53  {
54  produces<edm::MergeableCounter, edm::InLumi>();
55 }
EventCountProducer::~EventCountProducer ( )

Definition at line 58 of file EventCountProducer.cc.

58 {}

Member Function Documentation

void EventCountProducer::beginLuminosityBlock ( edm::LuminosityBlock theLuminosityBlock,
const edm::EventSetup theSetup 
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 69 of file EventCountProducer.cc.

69  {
71  return;
72 }
unsigned int eventsProcessedInLumi_
void EventCountProducer::endLuminosityBlock ( edm::LuminosityBlock theLuminosityBlock,
const edm::EventSetup theSetup 
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 76 of file EventCountProducer.cc.

References LogTrace, and edm::LuminosityBlock::put().

76  {
77  LogTrace("EventCounting") << "endLumi: adding " << eventsProcessedInLumi_ << " events" << endl;
78 
79  auto_ptr<edm::MergeableCounter> numEventsPtr(new edm::MergeableCounter);
80  numEventsPtr->value = eventsProcessedInLumi_;
81  theLuminosityBlock.put(numEventsPtr);
82 
83  return;
84 }
unsigned int eventsProcessedInLumi_
#define LogTrace(id)
void put(std::auto_ptr< PROD > product)
Put a new product.
void EventCountProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 62 of file EventCountProducer.cc.

Referenced by python.JSONExport.JsonExport::export(), and python.HTMLExport.HTMLExport::export().

62  {
64  return;
65 }
unsigned int eventsProcessedInLumi_

Member Data Documentation

unsigned int EventCountProducer::eventsProcessedInLumi_
private

Definition at line 42 of file EventCountProducer.cc.