25 StackGuard(
std::string const& iTypeName, std::map<std::string, unsigned int>& ioStack,
bool iFromListener) :
26 numType_(++ioStack[iTypeName]), itr_(ioStack.
find(iTypeName)), fromListener_(iFromListener) {
27 if(iFromListener) {++(itr_->second);}
37 unsigned int numType_;
38 std::map<std::string, unsigned int>::iterator itr_;
44 StackGuard guard(iProd.
className(), typeAddedStack_, iFromListener);
45 if(guard.numType_ > 2) {
47 <<
"Attempted to register the production of " 51 <<
" with product instance \"" 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.";
59 productAddedSignal_(iProd);
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::string const & className() const
std::string const & moduleLabel() const
std::string const & productInstanceName() const
void addCalled(BranchDescription const &, bool) override