CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

edm::SignallingProductRegistry Class Reference

#include <SignallingProductRegistry.h>

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

List of all members.

Public Member Functions

 SignallingProductRegistry ()
 SignallingProductRegistry (ProductRegistry const &preg)

Public Attributes

sigc::signal< void,
BranchDescription const & > 
productAddedSignal_

Private Member Functions

virtual void addCalled (BranchDescription const &, bool)

Private Attributes

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

Detailed Description

Definition at line 33 of file SignallingProductRegistry.h.


Constructor & Destructor Documentation

edm::SignallingProductRegistry::SignallingProductRegistry ( ) [inline]
edm::SignallingProductRegistry::SignallingProductRegistry ( ProductRegistry const &  preg) [inline, explicit]

Definition at line 37 of file SignallingProductRegistry.h.

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

Member Function Documentation

void SignallingProductRegistry::addCalled ( BranchDescription const &  iProd,
bool  iFromListener 
) [private, virtual]

Reimplemented from edm::ProductRegistry.

Definition at line 43 of file SignallingProductRegistry.cc.

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

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

Member Data Documentation

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

Definition at line 43 of file SignallingProductRegistry.h.

Referenced by addCalled().