#include <ProducerBase.h>
Public Types | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Member Functions | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
virtual | ~ProducerBase () |
Public Attributes | |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products | |
Protected Member Functions | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
Private Attributes | |
std::function< void(BranchDescription const &)> | callWhenNewProductsRegistered_ |
Definition at line 19 of file ProducerBase.h.
Reimplemented from edm::ProductRegistryHelper.
Definition at line 21 of file ProducerBase.h.
edm::ProducerBase::ProducerBase | ( | ) |
Definition at line 15 of file ProducerBase.cc.
edm::ProducerBase::~ProducerBase | ( | ) | [virtual] |
Definition at line 16 of file ProducerBase.cc.
{ }
void edm::ProducerBase::callWhenNewProductsRegistered | ( | std::function< void(BranchDescription const &)> const & | func | ) | [inline, protected] |
Definition at line 36 of file ProducerBase.h.
References callWhenNewProductsRegistered_.
Referenced by TriggerSummaryProducerAOD::TriggerSummaryProducerAOD(), and TriggerSummaryProducerRAW::TriggerSummaryProducerRAW().
{ callWhenNewProductsRegistered_ = func; }
void edm::ProducerBase::registerProducts | ( | ProducerBase * | producer, |
ProductRegistry * | iReg, | ||
ModuleDescription const & | md | ||
) |
Definition at line 60 of file ProducerBase.cc.
References edm::ProductRegistryHelper::addToRegistry(), edm::ProductRegistry::callForEachBranch(), relativeConstraints::empty, registrationCallback, and edm::ProductRegistryHelper::typeLabelList().
Referenced by edm::EDFilter::registerProductsAndCallbacks(), and edm::EDProducer::registerProductsAndCallbacks().
{ if (typeLabelList().empty() && !registrationCallback()) { return; } //If we have a callback, first tell the callback about all the entries already in the // product registry, then add any items this producer wants to add to the registry // and only after that do we register the callback. This is done so the callback does not // get called for items registered by this producer (avoids circular reference problems) bool isListener = false; if(registrationCallback()) { isListener=true; iReg->callForEachBranch(registrationCallback()); } TypeLabelList const& plist = typeLabelList(); ProductRegistryHelper::addToRegistry(plist.begin(), plist.end(), md, *(iReg), isListener); if(registrationCallback()) { Service<ConstProductRegistry> regService; regService->watchProductAdditions(CallbackWrapper(producer, registrationCallback(), iReg, md)); } }
std::function<void(BranchDescription const&)> edm::ProducerBase::callWhenNewProductsRegistered_ [private] |
Definition at line 41 of file ProducerBase.h.
Referenced by callWhenNewProductsRegistered().
std::function< void(BranchDescription const &)> edm::ProducerBase::registrationCallback |
used by the fwk to register list of products
Definition at line 26 of file ProducerBase.h.
Referenced by registerProducts().