CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
edm::SignallingProductRegistry Class Reference

#include <SignallingProductRegistry.h>

Inheritance diagram for edm::SignallingProductRegistry:
edm::ProductRegistry

Public Member Functions

SignallingProductRegistryoperator= (SignallingProductRegistry const &)=delete
 
 SignallingProductRegistry ()
 
 SignallingProductRegistry (ProductRegistry const &preg)
 
 SignallingProductRegistry (SignallingProductRegistry const &)=delete
 
- Public Member Functions inherited from edm::ProductRegistry
void addLabelAlias (BranchDescription const &productdesc, std::string const &labelAlias, std::string const &instanceAlias)
 
void addProduct (BranchDescription const &productdesc, bool iFromListener=false)
 
std::vector< std::pair< std::string, std::string > > const & aliasToOriginal () const
 
std::vector< BranchDescription const * > allBranchDescriptions () const
 
std::vector< std::string > allBranchNames () const
 
bool anyProductProduced () const
 
bool anyProducts (BranchType const brType) const
 
template<typename T >
void callForEachBranch (T const &iFunc)
 
void copyProduct (BranchDescription const &productdesc)
 
bool frozen () const
 
ProductResolverIndex const & getNextIndexValue (BranchType branchType) const
 
ProductResolverIndex indexFrom (BranchID const &iID) const
 
void initializeTransients ()
 
std::string merge (ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive)
 
void print (std::ostream &os) const
 
ProductList const & productList () const
 
ProductListproductListUpdator ()
 
std::shared_ptr< ProductResolverIndexHelper const > productLookup (BranchType branchType) const
 
std::shared_ptr< ProductResolverIndexHelperproductLookup (BranchType branchType)
 
bool productProduced (BranchType branchType) const
 
 ProductRegistry ()
 
 ProductRegistry (ProductList const &productList, bool toBeFrozen=true)
 
void setFrozen (bool initializeLookupInfo=true)
 
void setFrozen (std::set< TypeID > const &productTypesConsumed, std::set< TypeID > const &elementTypesConsumed, std::string const &processName)
 
ProductList::size_type size () const
 
void updateFromInput (ProductList const &other)
 
void updateFromInput (std::vector< BranchDescription > const &other)
 
virtual ~ProductRegistry ()
 

Public Attributes

signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
 

Private Member Functions

void addCalled (BranchDescription const &, bool) override
 

Private Attributes

std::map< std::string, unsigned int > typeAddedStack_
 

Additional Inherited Members

- Public Types inherited from edm::ProductRegistry
typedef std::map< BranchKey, BranchDescription const > ConstProductList
 
typedef std::map< BranchKey, BranchDescriptionProductList
 

Detailed Description

Definition at line 32 of file SignallingProductRegistry.h.

Constructor & Destructor Documentation

edm::SignallingProductRegistry::SignallingProductRegistry ( )
inline

Definition at line 35 of file SignallingProductRegistry.h.

signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
std::map< std::string, unsigned int > typeAddedStack_
edm::SignallingProductRegistry::SignallingProductRegistry ( ProductRegistry const &  preg)
inlineexplicit

Definition at line 36 of file SignallingProductRegistry.h.

36 : ProductRegistry(preg.productList(), false), productAddedSignal_(), typeAddedStack_() {}
signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
std::map< std::string, unsigned int > typeAddedStack_
edm::SignallingProductRegistry::SignallingProductRegistry ( SignallingProductRegistry const &  )
delete

Member Function Documentation

void SignallingProductRegistry::addCalled ( BranchDescription const &  iProd,
bool  iFromListener 
)
overrideprivatevirtual

Reimplemented from edm::ProductRegistry.

Definition at line 43 of file SignallingProductRegistry.cc.

References edm::BranchDescription::className(), Exception, edm::BranchDescription::moduleLabel(), and edm::BranchDescription::productInstanceName().

43  {
44  StackGuard guard(iProd.className(), typeAddedStack_, iFromListener);
45  if(guard.numType_ > 2) {
46  throw cms::Exception("CircularReference")
47  << "Attempted to register the production of "
48  << iProd.className()
49  << " from module "
50  << iProd.moduleLabel()
51  << " with product instance \""
52  << iProd.productInstanceName()
53  << "\"\n"
54  << "However, this was in reaction to a registration of a production for the same type \n"
55  << "from another module who was also listening to product registrations.\n"
56  << "This can lead to circular Event::get* calls.\n"
57  << "Please reconfigure job so it does not contain both of the modules.";
58  }
59  productAddedSignal_(iProd);
60 }
signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
std::map< std::string, unsigned int > typeAddedStack_
SignallingProductRegistry& edm::SignallingProductRegistry::operator= ( SignallingProductRegistry const &  )
delete

Member Data Documentation

signalslot::Signal<void(BranchDescription const&)> edm::SignallingProductRegistry::productAddedSignal_

Definition at line 37 of file SignallingProductRegistry.h.

std::map<std::string, unsigned int> edm::SignallingProductRegistry::typeAddedStack_
private

Definition at line 45 of file SignallingProductRegistry.h.