#include <CommonTools/UtilAlgos/plugins/EventCountProducer.cc>
Public Member Functions | |
EventCountProducer (const edm::ParameterSet &) | |
~EventCountProducer () | |
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_ |
Description: An event counter that can store the number of events in the lumi block
Definition at line 30 of file EventCountProducer.cc.
EventCountProducer::EventCountProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 53 of file EventCountProducer.cc.
{ produces<edm::MergeableCounter, edm::InLumi>(); }
EventCountProducer::~EventCountProducer | ( | ) |
Definition at line 58 of file EventCountProducer.cc.
{}
void EventCountProducer::beginLuminosityBlock | ( | edm::LuminosityBlock & | theLuminosityBlock, |
const edm::EventSetup & | theSetup | ||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 69 of file EventCountProducer.cc.
{ eventsProcessedInLumi_ = 0; return; }
void EventCountProducer::endLuminosityBlock | ( | edm::LuminosityBlock & | theLuminosityBlock, |
const edm::EventSetup & | theSetup | ||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 76 of file EventCountProducer.cc.
References LogTrace, and edm::LuminosityBlock::put().
{ LogTrace("EventCounting") << "endLumi: adding " << eventsProcessedInLumi_ << " events" << endl; auto_ptr<edm::MergeableCounter> numEventsPtr(new edm::MergeableCounter); numEventsPtr->value = eventsProcessedInLumi_; theLuminosityBlock.put(numEventsPtr); return; }
void EventCountProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 62 of file EventCountProducer.cc.
{ eventsProcessedInLumi_++; return; }
unsigned int EventCountProducer::eventsProcessedInLumi_ [private] |
Definition at line 42 of file EventCountProducer.cc.