#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 Member Functions | |
template<typename P > | |
void | commit_ (P &iPrincipal) |
template<typename P , typename L , typename I > | |
void | commit_ (P &iPrincipal, L *iList, I *iID) |
Private Attributes | |
std::function< void(BranchDescription const &)> | callWhenNewProductsRegistered_ |
Friends | |
class | EDFilter |
class | EDProducer |
class | one::EDFilterBase |
class | one::EDProducerBase |
Definition at line 27 of file ProducerBase.h.
Reimplemented from edm::ProductRegistryHelper.
Definition at line 29 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 44 of file ProducerBase.h.
References callWhenNewProductsRegistered_.
Referenced by edm::HadronizerFilter< HAD, DEC >::HadronizerFilter(), TriggerSummaryProducerAOD::TriggerSummaryProducerAOD(), and TriggerSummaryProducerRAW::TriggerSummaryProducerRAW().
{ callWhenNewProductsRegistered_ = func; }
void edm::ProducerBase::commit_ | ( | P & | iPrincipal, |
L * | iList, | ||
I * | iID | ||
) | [inline, private] |
Definition at line 60 of file ProducerBase.h.
{ iPrincipal.commit_(iList,iID); }
void edm::ProducerBase::commit_ | ( | P & | iPrincipal | ) | [inline, private] |
Definition at line 55 of file ProducerBase.h.
Referenced by edm::one::EDProducerBase::doBeginLuminosityBlock(), edm::EDFilter::doBeginLuminosityBlock(), edm::one::EDFilterBase::doBeginLuminosityBlock(), edm::EDProducer::doBeginLuminosityBlock(), edm::one::EDFilterBase::doBeginRun(), edm::one::EDProducerBase::doBeginRun(), edm::EDProducer::doBeginRun(), edm::EDFilter::doBeginRun(), edm::one::EDFilterBase::doEndLuminosityBlock(), edm::EDFilter::doEndLuminosityBlock(), edm::one::EDProducerBase::doEndLuminosityBlock(), edm::EDProducer::doEndLuminosityBlock(), edm::EDProducer::doEndRun(), edm::EDFilter::doEndRun(), edm::one::EDFilterBase::doEndRun(), edm::one::EDProducerBase::doEndRun(), edm::EDFilter::doEvent(), edm::one::EDProducerBase::doEvent(), edm::EDProducer::doEvent(), and edm::one::EDFilterBase::doEvent().
{ iPrincipal.commit_(); }
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::one::EDFilterBase::registerProductsAndCallbacks(), edm::EDFilter::registerProductsAndCallbacks(), edm::one::EDProducerBase::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)); } }
friend class EDFilter [friend] |
Definition at line 50 of file ProducerBase.h.
friend class EDProducer [friend] |
Definition at line 49 of file ProducerBase.h.
friend class one::EDFilterBase [friend] |
Definition at line 52 of file ProducerBase.h.
friend class one::EDProducerBase [friend] |
Definition at line 51 of file ProducerBase.h.
std::function<void(BranchDescription const&)> edm::ProducerBase::callWhenNewProductsRegistered_ [private] |
Definition at line 64 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 34 of file ProducerBase.h.
Referenced by registerProducts().