#include <ProducerBase.h>
Public Types | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Member Functions | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
virtual | ~ProducerBase () |
Public Attributes | |
boost::function< void(const BranchDescription &)> | registrationCallback () const |
used by the fwk to register list of products | |
Protected Member Functions | |
template<class TProducer , class TMethod > | |
void | callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod) |
Private Attributes | |
boost::function< void(const BranchDescription &)> | callWhenNewProductsRegistered_ |
Definition at line 18 of file ProducerBase.h.
Reimplemented from edm::ProductRegistryHelper.
Definition at line 20 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 | ( | TProducer * | iProd, |
TMethod | iMethod | ||
) | [inline, protected] |
Definition at line 36 of file ProducerBase.h.
References callWhenNewProductsRegistered_.
{ callWhenNewProductsRegistered_ = boost::bind(iMethod,iProd,_1); }
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::EDProducer::registerAnyProducts(), and edm::EDFilter::registerAnyProducts().
{ if (typeLabelList().empty() && registrationCallback().empty()) { 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().empty())) { isListener=true; iReg->callForEachBranch(registrationCallback()); } TypeLabelList const& plist = typeLabelList(); ProductRegistryHelper::addToRegistry(plist.begin(), plist.end(), md, *(iReg), isListener); if(!(registrationCallback().empty())) { Service<ConstProductRegistry> regService; regService->watchProductAdditions(CallbackWrapper(producer, registrationCallback(), iReg, md)); } }
boost::function<void(const BranchDescription&)> edm::ProducerBase::callWhenNewProductsRegistered_ [private] |
Definition at line 41 of file ProducerBase.h.
Referenced by callWhenNewProductsRegistered().
boost::function< void(const BranchDescription &)> edm::ProducerBase::registrationCallback |
used by the fwk to register list of products
Definition at line 25 of file ProducerBase.h.
Referenced by registerProducts().