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

SignallingProductRegistryoperator= (SignallingProductRegistry const &)
 SignallingProductRegistry (ProductRegistry const &preg)
 SignallingProductRegistry (SignallingProductRegistry const &)
 SignallingProductRegistry ()

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_

Detailed Description

Definition at line 32 of file SignallingProductRegistry.h.


Constructor & Destructor Documentation

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

Definition at line 36 of file SignallingProductRegistry.h.

: ProductRegistry(preg.productList(), false), productAddedSignal_(), typeAddedStack_() {}
edm::SignallingProductRegistry::SignallingProductRegistry ( SignallingProductRegistry const &  )

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);
}
SignallingProductRegistry& edm::SignallingProductRegistry::operator= ( SignallingProductRegistry const &  )

Member Data Documentation

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

Definition at line 45 of file SignallingProductRegistry.h.

Referenced by addCalled().