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::string > aliasToModules (KindOfType kindOfType, TypeID const &type, std::string_view moduleLabel, std::string_view productInstanceName) 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< ProductResolverIndexHelperproductLookup (BranchType branchType)
 
std::shared_ptr< ProductResolverIndexHelper const > productLookup (BranchType branchType) const
 
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)
 
void setUnscheduledProducts (std::set< std::string > const &unscheduledLabels)
 
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

◆ SignallingProductRegistry() [1/3]

edm::SignallingProductRegistry::SignallingProductRegistry ( )
inline

◆ SignallingProductRegistry() [2/3]

edm::SignallingProductRegistry::SignallingProductRegistry ( ProductRegistry const &  preg)
inlineexplicit

Definition at line 35 of file SignallingProductRegistry.h.

36  : ProductRegistry(preg.productList(), false), productAddedSignal_(), typeAddedStack_() {}

◆ SignallingProductRegistry() [3/3]

edm::SignallingProductRegistry::SignallingProductRegistry ( SignallingProductRegistry const &  )
delete

Member Function Documentation

◆ addCalled()

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

Reimplemented from edm::ProductRegistry.

Definition at line 45 of file SignallingProductRegistry.cc.

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

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

◆ operator=()

SignallingProductRegistry& edm::SignallingProductRegistry::operator= ( SignallingProductRegistry const &  )
delete

Member Data Documentation

◆ productAddedSignal_

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

Definition at line 37 of file SignallingProductRegistry.h.

Referenced by addCalled().

◆ typeAddedStack_

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

Definition at line 45 of file SignallingProductRegistry.h.

Referenced by addCalled().

edm::SignallingProductRegistry::typeAddedStack_
std::map< std::string, unsigned int > typeAddedStack_
Definition: SignallingProductRegistry.h:45
edm::SignallingProductRegistry::productAddedSignal_
signalslot::Signal< void(BranchDescription const &)> productAddedSignal_
Definition: SignallingProductRegistry.h:37
edm::ProductRegistry::ProductRegistry
ProductRegistry()
Definition: ProductRegistry.cc:32
Exception
Definition: hltDiff.cc:245