test
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::one::EDProducer< edm::one::WatchLuminosityBlocks, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EventCountProducer (const edm::ParameterSet &)
 
 ~EventCountProducer ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::WatchLuminosityBlocks, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, const edm::EventSetup &) override
 
virtual void endLuminosityBlockProduce (edm::LuminosityBlock &, const edm::EventSetup &) override
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

unsigned int eventsProcessedInLumi_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 55 of file EventCountProducer.cc.

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

Definition at line 60 of file EventCountProducer.cc.

60 {}

Member Function Documentation

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

Definition at line 71 of file EventCountProducer.cc.

71  {
73  return;
74 }
unsigned int eventsProcessedInLumi_
void EventCountProducer::endLuminosityBlock ( edm::LuminosityBlock const &  theLuminosityBlock,
const edm::EventSetup theSetup 
)
overrideprivatevirtual

Definition at line 77 of file EventCountProducer.cc.

77  {
78 }
void EventCountProducer::endLuminosityBlockProduce ( edm::LuminosityBlock theLuminosityBlock,
const edm::EventSetup theSetup 
)
overrideprivatevirtual

Definition at line 81 of file EventCountProducer.cc.

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

81  {
82  LogTrace("EventCounting") << "endLumi: adding " << eventsProcessedInLumi_ << " events" << endl;
83 
84  auto_ptr<edm::MergeableCounter> numEventsPtr(new edm::MergeableCounter);
85  numEventsPtr->value = eventsProcessedInLumi_;
86  theLuminosityBlock.put(numEventsPtr);
87 
88  return;
89 }
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 
)
overrideprivatevirtual

Member Data Documentation

unsigned int EventCountProducer::eventsProcessedInLumi_
private

Definition at line 44 of file EventCountProducer.cc.