CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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< 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)
 
ConstProductListconstProductList ()
 
void copyProduct (BranchDescription const &productdesc)
 
bool frozen () const
 
ProductHolderIndex const & getNextIndexValue (BranchType branchType) const
 
ProductHolderIndex indexFrom (BranchID const &iID) const
 
void initializeTransients ()
 
std::string merge (ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive)
 
std::vector< std::string > const & missingDictionaries () const
 
std::vector< std::string > & missingDictionariesForUpdate ()
 
void print (std::ostream &os) const
 
ProductList const & productList () const
 
ProductListproductListUpdator ()
 
boost::shared_ptr
< ProductHolderIndexHelper >
const & 
productLookup (BranchType branchType) const
 
bool productProduced (BranchType branchType) const
 
 ProductRegistry ()
 
 ProductRegistry (ProductList const &productList, bool toBeFrozen=true)
 
void setFrozen (bool initializeLookupInfo=true)
 
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

virtual void addCalled (BranchDescription const &, bool)
 

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,
BranchDescription
ProductList
 

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_
preg
Definition: Schedule.cc:362
std::map< std::string, unsigned int > typeAddedStack_
edm::SignallingProductRegistry::SignallingProductRegistry ( SignallingProductRegistry const &  )
delete

Member Function Documentation

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

Reimplemented from edm::ProductRegistry.

Definition at line 43 of file SignallingProductRegistry.cc.

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

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_
std::map<std::string, unsigned int> edm::SignallingProductRegistry::typeAddedStack_
private

Definition at line 45 of file SignallingProductRegistry.h.

Referenced by addCalled().