![]() |
![]() |
#include <ELadministrator.h>
Definition at line 81 of file ELadministrator.h.
edm::service::ELadministrator::ELadministrator | ( | ) | [protected] |
Definition at line 501 of file ELadministrator.cc.
References benchmark_cfg::cerr, edm::ELseverityLevel::nLevels, and severityCounts_.
Referenced by instance().
: process_ ( "" ) , context_ ( emptyContext.clone() ) , abortThreshold_( ELseverityLevel (ELseverityLevel::ELsev_abort) ) , exitThreshold_ ( ELseverityLevel (ELseverityLevel::ELsev_highestSeverity ) ) , sinks_ ( ) , highSeverity_ ( ELseverityLevel (ELseverityLevel::ELsev_zeroSeverity) ) , msg ( ELseverityLevel (ELseverityLevel::ELsev_unspecified), "" ) , msgIsActive ( false ) { #ifdef ELadministratorCONSTRUCTOR_TRACE std::cerr << "ELadminstrator constructor\n"; #endif for ( int lev = 0; lev < ELseverityLevel::nLevels; ++lev ) severityCounts_[lev] = 0; } // ELadministrator()
edm::service::ELadministrator::~ELadministrator | ( | ) | [protected, virtual] |
Definition at line 543 of file ELadministrator.cc.
References benchmark_cfg::cerr, finishMsg(), and sinks().
const ELseverityLevel & edm::service::ELadministrator::abortThreshold | ( | ) | const [protected] |
Definition at line 256 of file ELadministrator.cc.
References abortThreshold_.
Referenced by edm::service::ELtsErrorLog::dispatch(), finishMsg(), and edm::service::ErrorLog::operator()().
{ return abortThreshold_; }
ELdestControl edm::service::ELadministrator::attach | ( | const ELdestination & | sink, |
const ELstring & | name | ||
) |
Definition at line 170 of file ELadministrator.cc.
References attachedDestinations, edm::service::ELdestination::clone(), alignmentValidation::dest, mergeVDriftHistosByStation::name, and sinks().
ELdestControl edm::service::ELadministrator::attach | ( | const ELdestination & | sink | ) |
Definition at line 162 of file ELadministrator.cc.
References edm::service::ELdestination::clone(), alignmentValidation::dest, and sinks().
Referenced by edm::service::MessageLoggerScribe::configure_external_dests(), edm::service::MessageLoggerScribe::configure_fwkJobReports(), edm::service::MessageLoggerScribe::configure_ordinary_destinations(), edm::service::MessageLoggerScribe::configure_statistics(), edm::service::ELtsErrorLog::dispatch(), and edm::service::ErrorLog::operator()().
ELseverityLevel edm::service::ELadministrator::checkSeverity | ( | ) |
Definition at line 191 of file ELadministrator.cc.
References edm::ELzeroSeverity, and highSeverity_.
{ const ELseverityLevel retval( highSeverity_ ); highSeverity_ = ELzeroSeverity; return retval; } // checkSeverity()
void edm::service::ELadministrator::clearMsg | ( | ) | [protected] |
Definition at line 359 of file ELadministrator.cc.
References edm::ErrorObj::clear(), msg, and msgIsActive.
Referenced by edm::service::ErrorLog::endmsg().
{ msgIsActive = false; msg.clear(); } // clearMsg()
ELcontextSupplier & edm::service::ELadministrator::context | ( | ) | const [protected] |
const ELseverityLevel & edm::service::ELadministrator::exitThreshold | ( | ) | const [protected] |
Definition at line 260 of file ELadministrator.cc.
References exitThreshold_.
Referenced by finishMsg(), and edm::service::ErrorLog::operator()().
{ return exitThreshold_; }
void edm::service::ELadministrator::finish | ( | ) |
Definition at line 442 of file ELadministrator.cc.
References begin, and sinks().
Referenced by edm::service::MessageLoggerScribe::~MessageLoggerScribe().
void edm::service::ELadministrator::finishMsg | ( | ) | [protected] |
Definition at line 306 of file ELadministrator.cc.
References abortThreshold(), begin, benchmark_cfg::cerr, context_, alignmentValidation::dest, end, exitThreshold(), edm::ELseverityLevel::getLevel(), highSeverity_, msg, msgIsActive, edm::service::possiblyAbortOrExit(), edm::ErrorObj::setReactedTo(), edm::ELextendedID::severity, severityCounts_, sinks(), and edm::ErrorObj::xid().
Referenced by edm::service::ErrorLog::endmsg(), and ~ELadministrator().
{ if ( ! msgIsActive ) return; int lev = msg.xid().severity.getLevel(); ++ severityCounts_[lev]; if ( lev > highSeverity_.getLevel() ) highSeverity_ = msg.xid().severity; #ifdef ELadTRACE_FINISH std::cerr << "=:=:=: finshMsg() - lev = " << lev << "\n"; #endif context_->editErrorObj( msg ); #ifdef ELadTRACE_FINISH std::cerr << "=:=:=: finshMsg() returns from editErrorObj( msg ) \n"; #endif std::list<boost::shared_ptr<ELdestination> >::iterator d; bool mrt; #ifdef ELadTRACE_FINISH int destCounter = 0; #endif if ( sinks().begin() == sinks().end() ) { // $$ JV:1 std::cerr << "\nERROR LOGGED WITHOUT DESTINATION!\n"; std::cerr << "Attaching destination \"cerr\" to ELadministrator by default\n\n"; boost::shared_ptr<ELdestination> dest(new ELoutput(cerr)); this->sinks().push_back(dest); } for ( d = sinks().begin(); d != sinks().end(); ++d ) { #ifdef ELadTRACE_FINISH std::cerr << " =:=:=: log(msg) for a destination number " << ++destCounter << " called ... \n"; #endif mrt = (*d)->log( msg ); #ifdef ELadTRACE_FINISH std::cerr << " =:=:=: log(msg) for a destination returned " << mrt << "\n"; #endif if ( mrt ) msg.setReactedTo(true); } msgIsActive = false; possiblyAbortOrExit ( lev, abortThreshold().getLevel(), exitThreshold().getLevel() ); // $$ mf 3/17/04 } // finishMsg()
const ELcontextSupplier & edm::service::ELadministrator::getContextSupplier | ( | ) | const |
Definition at line 136 of file ELadministrator.cc.
References context_.
Referenced by edm::service::ELoutput::log(), edm::service::MessageLoggerScribe::log(), and edm::service::ELstatistics::log().
{ return *(context_); } // getContextSupplier()
bool edm::service::ELadministrator::getELdestControl | ( | const ELstring & | name, |
ELdestControl & | theControl | ||
) |
Definition at line 179 of file ELadministrator.cc.
References attachedDestinations.
Referenced by edm::service::ErrorLog::getELdestControl(), and edm::service::ELtsErrorLog::getELdestControl().
{ if ( attachedDestinations.find(name) != attachedDestinations.end() ) { theDestControl = ELdestControl ( attachedDestinations[name] ); return true; } else { return false; } } // getDestControl
const ELseverityLevel & edm::service::ELadministrator::highSeverity | ( | ) | const [protected] |
Definition at line 267 of file ELadministrator.cc.
References highSeverity_.
{ return highSeverity_; }
ELadministrator * edm::service::ELadministrator::instance | ( | ) | [static] |
Definition at line 485 of file ELadministrator.cc.
References ELadministrator(), instance_, and edm::service::ELadminDestroyer::setELadmin().
Referenced by edm::service::ELrecv(), edm::service::ELerrorList::log(), edm::service::ELoutput::log(), edm::service::ELcollected::log(), edm::service::ELstatistics::log(), and edm::ELlog4cplus::log().
{ static ELadminDestroyer destroyer_; // This deviates from Vlissides' pattern where destroyer_ was a static // instance in the ELadministrator class. This construct should be // equivalent, but the original did not call the destructor under KCC. if ( !instance_ ) { instance_ = new ELadministrator; destroyer_.setELadmin( instance_ ); } return instance_; } // instance()
const ELstring & edm::service::ELadministrator::process | ( | ) | const [protected] |
Definition at line 250 of file ELadministrator.cc.
References process_.
Referenced by edm::service::ErrorLog::operator()(), setProcess(), and swapProcess().
{ return process_; }
void edm::service::ELadministrator::resetSeverityCount | ( | const ELseverityLevel & | from, |
const ELseverityLevel & | to | ||
) |
Definition at line 230 of file ELadministrator.cc.
References edm::ELseverityLevel::getLevel(), gen::k, and severityCounts_.
void edm::service::ELadministrator::resetSeverityCount | ( | ) |
Definition at line 239 of file ELadministrator.cc.
References edm::ELhighestSeverity, and edm::ELzeroSeverity.
{ resetSeverityCount( ELzeroSeverity, ELhighestSeverity ); } // resetSeverityCount()
void edm::service::ELadministrator::resetSeverityCount | ( | const ELseverityLevel & | sev | ) |
Definition at line 223 of file ELadministrator.cc.
References edm::ELseverityLevel::getLevel(), and severityCounts_.
{ severityCounts_[sev.getLevel()] = 0; } // resetSeverityCount()
void edm::service::ELadministrator::setAbortThreshold | ( | const ELseverityLevel & | sev | ) |
Definition at line 150 of file ELadministrator.cc.
References abortThreshold_.
{ abortThreshold_ = sev; } // setAbortThreshold()
void edm::service::ELadministrator::setContextSupplier | ( | const ELcontextSupplier & | supplier | ) |
Definition at line 129 of file ELadministrator.cc.
References edm::service::ELcontextSupplier::clone(), and context_.
Referenced by edm::service::MessageLoggerScribe::MessageLoggerScribe().
{ context_.reset(supplier.clone()); } // setContextSupplier()
void edm::service::ELadministrator::setExitThreshold | ( | const ELseverityLevel & | sev | ) |
Definition at line 156 of file ELadministrator.cc.
References exitThreshold_.
{ exitThreshold_ = sev; } // setExitThreshold()
void edm::service::ELadministrator::setIntervals | ( | const ELstring & | id, |
int | interval | ||
) |
void edm::service::ELadministrator::setIntervals | ( | const ELseverityLevel & | sev, |
int | interval | ||
) |
void edm::service::ELadministrator::setLimits | ( | const ELstring & | id, |
int | limit | ||
) |
void edm::service::ELadministrator::setLimits | ( | const ELseverityLevel & | sev, |
int | limit | ||
) |
void edm::service::ELadministrator::setProcess | ( | const ELstring & | process | ) |
Definition at line 110 of file ELadministrator.cc.
References benchmark_cfg::cerr, process(), and process_.
void edm::service::ELadministrator::setThresholds | ( | const ELseverityLevel & | sev | ) |
void edm::service::ELadministrator::setTimespans | ( | const ELseverityLevel & | sev, |
int | seconds | ||
) |
void edm::service::ELadministrator::setTimespans | ( | const ELstring & | id, |
int | seconds | ||
) |
int edm::service::ELadministrator::severityCount | ( | const ELseverityLevel & | from, |
const ELseverityLevel & | to | ||
) | const |
Definition at line 207 of file ELadministrator.cc.
References edm::ELseverityLevel::getLevel(), gen::k, and severityCounts_.
{ int k = from.getLevel(); int sum = severityCounts_[k]; while ( ++k <= to.getLevel() ) sum += severityCounts_[k]; return sum; } // severityCount()
int edm::service::ELadministrator::severityCount | ( | const ELseverityLevel & | sev | ) | const |
Definition at line 200 of file ELadministrator.cc.
References edm::ELseverityLevel::getLevel(), and severityCounts_.
{ return severityCounts_[sev.getLevel()]; } // severityCount()
int edm::service::ELadministrator::severityCounts | ( | int | lev | ) | const [protected] |
Definition at line 272 of file ELadministrator.cc.
References severityCounts_.
{ return severityCounts_[lev]; }
std::list< boost::shared_ptr< ELdestination > > & edm::service::ELadministrator::sinks | ( | ) | [protected] |
Definition at line 264 of file ELadministrator.cc.
References sinks_.
Referenced by attach(), edm::service::ELtsErrorLog::dispatch(), finish(), finishMsg(), edm::service::ErrorLog::operator()(), setIntervals(), setLimits(), setThresholds(), setTimespans(), wipe(), and ~ELadministrator().
{ return sinks_; }
ELcontextSupplier & edm::service::ELadministrator::swapContextSupplier | ( | ELcontextSupplier & | cs | ) |
Definition at line 143 of file ELadministrator.cc.
Referenced by edm::service::ELrecv().
Definition at line 120 of file ELadministrator.cc.
References process(), process_, and cond::rpcobtemp::temp.
Referenced by edm::service::ELrecv().
void edm::service::ELadministrator::wipe | ( | ) |
friend class ELadminDestroyer [friend] |
Definition at line 83 of file ELadministrator.h.
friend class ELcout [friend] |
Definition at line 85 of file ELadministrator.h.
friend class ELtsErrorLog [friend] |
Definition at line 86 of file ELadministrator.h.
friend class ErrorLog [friend] |
Definition at line 84 of file ELadministrator.h.
Definition at line 167 of file ELadministrator.h.
Referenced by abortThreshold(), and setAbortThreshold().
std::map< ELstring, boost::shared_ptr<ELdestination> > edm::service::ELadministrator::attachedDestinations [private] |
Definition at line 175 of file ELadministrator.h.
Referenced by attach(), and getELdestControl().
boost::shared_ptr<ELcontextSupplier> edm::service::ELadministrator::context_ [private] |
Definition at line 166 of file ELadministrator.h.
Referenced by context(), edm::service::ELtsErrorLog::dispatch(), finishMsg(), getContextSupplier(), edm::service::ErrorLog::operator()(), and setContextSupplier().
Definition at line 168 of file ELadministrator.h.
Referenced by exitThreshold(), and setExitThreshold().
Definition at line 170 of file ELadministrator.h.
Referenced by checkSeverity(), edm::service::ELtsErrorLog::dispatch(), finishMsg(), highSeverity(), and edm::service::ErrorLog::operator()().
ELadministrator * edm::service::ELadministrator::instance_ = 0 [static, private] |
Definition at line 161 of file ELadministrator.h.
Referenced by instance().
Definition at line 172 of file ELadministrator.h.
Referenced by clearMsg(), edm::service::ErrorLog::emitToken(), finishMsg(), and edm::service::ErrorLog::operator()().
bool edm::service::ELadministrator::msgIsActive [private] |
Definition at line 173 of file ELadministrator.h.
Referenced by clearMsg(), edm::service::ErrorLog::emitToken(), edm::service::ErrorLog::endmsg(), finishMsg(), and edm::service::ErrorLog::operator()().
Definition at line 165 of file ELadministrator.h.
Referenced by process(), setProcess(), and swapProcess().
int edm::service::ELadministrator::severityCounts_[ELseverityLevel::nLevels] [private] |
Definition at line 171 of file ELadministrator.h.
Referenced by edm::service::ELtsErrorLog::dispatch(), ELadministrator(), finishMsg(), edm::service::ErrorLog::operator()(), resetSeverityCount(), severityCount(), and severityCounts().
std::list<boost::shared_ptr<ELdestination> > edm::service::ELadministrator::sinks_ [private] |
Definition at line 169 of file ELadministrator.h.
Referenced by sinks().