#include <ErrorObj.h>
Public Member Functions | |
virtual void | clear () |
ELstring | context () const |
virtual ErrorObj & | emitToken (const ELstring &txt) |
ErrorObj (const ELseverityLevel &sev, const ELstring &id, bool verbatim=false) | |
ErrorObj (const ErrorObj &orig) | |
ELstring | fullText () const |
const ELstring & | idOverflow () const |
bool | is_verbatim () const |
const ELlist_string & | items () const |
ErrorObj & | operator<< (std::ostream &(*f)(std::ostream &)) |
ErrorObj & | operator<< (std::ios_base &(*f)(std::ios_base &)) |
template<class T > | |
ErrorObj & | opltlt (const T &t) |
ErrorObj & | opltlt (const char s[]) |
bool | reactedTo () const |
int | serial () const |
virtual void | set (const ELseverityLevel &sev, const ELstring &id) |
virtual void | setContext (const ELstring &context) |
virtual void | setID (const ELstring &ID) |
virtual void | setModule (const ELstring &module) |
virtual void | setProcess (const ELstring &proc) |
virtual void | setReactedTo (bool r) |
virtual void | setSeverity (const ELseverityLevel &sev) |
virtual void | setSubroutine (const ELstring &subroutine) |
time_t | timestamp () const |
const ELextendedID & | xid () const |
virtual | ~ErrorObj () |
Private Attributes | |
std::string | emptyString |
ELstring | myContext |
ELstring | myIdOverflow |
ELlist_string | myItems |
std::ostringstream | myOs |
bool | myReactedTo |
int | mySerial |
time_t | myTimestamp |
ELextendedID | myXid |
bool | verbatim |
Static Private Attributes | |
static int | ourSerial |
Definition at line 51 of file ErrorObj.h.
edm::ErrorObj::ErrorObj | ( | const ELseverityLevel & | sev, |
const ELstring & | id, | ||
bool | verbatim = false |
||
) |
Definition at line 79 of file ErrorObj.cc.
References benchmark_cfg::cerr, and clear().
edm::ErrorObj::ErrorObj | ( | const ErrorObj & | orig | ) |
Definition at line 93 of file ErrorObj.cc.
References benchmark_cfg::cerr.
: mySerial ( orig.mySerial ) , myXid ( orig.myXid ) , myIdOverflow ( orig.myIdOverflow ) , myTimestamp ( orig.myTimestamp ) , myItems ( orig.myItems ) , myReactedTo ( orig.myReactedTo ) , myOs ( ) , emptyString ( ) , verbatim ( orig.verbatim ) { #ifdef ErrorObjCONSTRUCTOR_TRACE std::cerr << "Copy Constructor for ErrorObj\n"; #endif } // ErrorObj(ErrorObj)
edm::ErrorObj::~ErrorObj | ( | ) | [virtual] |
Definition at line 112 of file ErrorObj.cc.
References benchmark_cfg::cerr.
{ #ifdef ErrorObjCONSTRUCTOR_TRACE std::cerr << "Destructor for ErrorObj\n"; #endif } // ~ErrorObj()
void edm::ErrorObj::clear | ( | void | ) | [virtual] |
Definition at line 242 of file ErrorObj.cc.
References edm::ELextendedID::clear(), myIdOverflow, myItems, myReactedTo, mySerial, myTimestamp, and myXid.
Referenced by edm::service::ELadministrator::clearMsg(), ErrorObj(), edm::service::ELtsErrorLog::initiateMsg(), and set().
{ mySerial = 0; myXid.clear(); myIdOverflow = ""; myTimestamp = 0; myItems.erase( myItems.begin(), myItems.end() ); // myItems.clear(); myReactedTo = false; } // clear()
ELstring edm::ErrorObj::context | ( | ) | const |
Definition at line 133 of file ErrorObj.cc.
References myContext.
Referenced by edm::service::MessageLoggerScribe::log(), and edm::ELlog4cplus::log().
{ return myContext; }
Definition at line 200 of file ErrorObj.cc.
References benchmark_cfg::cerr, edm::eq_nocase(), myItems, and setSubroutine().
Referenced by edm::service::ErrorLog::emitToken(), edm::service::ELtsErrorLog::item(), edm::service::ELerrorList::log(), and opltlt().
{ #ifdef ErrorObj_EMIT_TRACE std::cerr << "=:=:=: ErrorObj::emitToken( " << s << " )\n"; #endif #ifdef ErrorObj_SUB_TRACE if ( subN > 0 ) { std::cerr << "=:=:=: subN ErrorObj::emitToken( " << s << " )\n"; subN--; } #endif if ( eq_nocase(s.substr(0,5), "@SUB=" ) ) { #ifdef ErrorObj_SUB_TRACE std::cerr << "=:=:=: ErrorObj::@SUB s.substr(5) is: " << s.substr(5) << '\n'; #endif setSubroutine(s.substr(5)); } else { myItems.push_back( s ); } return * this; } // emitToken()
ELstring edm::ErrorObj::fullText | ( | ) | const |
Definition at line 137 of file ErrorObj.cc.
References myItems, and query::result.
const ELstring & edm::ErrorObj::idOverflow | ( | ) | const |
Definition at line 127 of file ErrorObj.cc.
References myIdOverflow.
Referenced by edm::service::ELoutput::log(), and edm::ELlog4cplus::log().
{ return myIdOverflow; }
bool edm::ErrorObj::is_verbatim | ( | ) | const |
Definition at line 131 of file ErrorObj.cc.
References verbatim.
Referenced by edm::service::ELoutput::log().
{ return verbatim; }
const ELlist_string & edm::ErrorObj::items | ( | ) | const |
Definition at line 129 of file ErrorObj.cc.
References myItems.
Referenced by edm::service::ELfwkJobReport::log(), edm::service::ELoutput::log(), edm::service::ELcollected::log(), and edm::ELlog4cplus::log().
{ return myItems; }
ErrorObj& edm::ErrorObj::operator<< | ( | std::ios_base &(*)(std::ios_base &) | f | ) | [inline] |
ErrorObj& edm::ErrorObj::operator<< | ( | std::ostream &(*)(std::ostream &) | f | ) | [inline] |
ErrorObj & edm::ErrorObj::opltlt | ( | const char | s[] | ) |
Definition at line 254 of file ErrorObj.cc.
References emitToken(), emptyString, myOs, asciidump::s, and verbatim.
{ // Exactly equivalent to the general template. // If this is not provided explicitly, then the template will // be instantiated once for each length of string ever used. myOs.str(emptyString); myOs << s; #ifdef OLD_STYLE_AUTOMATIC_SPACES if ( ! myOs.str().empty() ) { if ( !verbatim ) { emitToken( myOs.str() + ' ' ); } else { emitToken( myOs.str() ); } } #else if ( ! myOs.str().empty() ) emitToken( myOs.str() ); #endif return *this; }
Referenced by edm::operator<<().
bool edm::ErrorObj::reactedTo | ( | ) | const |
Definition at line 130 of file ErrorObj.cc.
References myReactedTo.
Referenced by edm::service::ELstatistics::log().
{ return myReactedTo; }
int edm::ErrorObj::serial | ( | ) | const |
Definition at line 125 of file ErrorObj.cc.
References mySerial.
Referenced by edm::service::ELoutput::log(), and edm::ELlog4cplus::log().
{ return mySerial; }
void edm::ErrorObj::set | ( | const ELseverityLevel & | sev, |
const ELstring & | id | ||
) | [virtual] |
Definition at line 229 of file ErrorObj.cc.
References clear(), mySerial, myTimestamp, ourSerial, setID(), setSeverity(), and cond::rpcobgas::time.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), and edm::service::ErrorLog::operator()().
{ clear(); myTimestamp = time( 0 ); mySerial = ++ ourSerial; setID( id ); setSeverity( sev ); } // set()
void edm::ErrorObj::setContext | ( | const ELstring & | context | ) | [virtual] |
Definition at line 170 of file ErrorObj.cc.
References trackerHits::c, and myContext.
Referenced by edm::MessageSender::ErrorObjDeleter::operator()().
void edm::ErrorObj::setID | ( | const ELstring & | ID | ) | [virtual] |
Definition at line 161 of file ErrorObj.cc.
References edm::ELextendedID::id, edm::maxIDlength(), myIdOverflow, and myXid.
Referenced by edm::service::MessageLoggerScribe::log(), and set().
{ myXid.id = ELstring( id, 0, maxIDlength ); if ( id.length() > maxIDlength ) myIdOverflow = ELstring( id, maxIDlength, id.length()-maxIDlength ); }
void edm::ErrorObj::setModule | ( | const ELstring & | module | ) | [virtual] |
Definition at line 168 of file ErrorObj.cc.
References edm::ELextendedID::module, module(), and myXid.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), edm::MessageSender::ErrorObjDeleter::operator()(), edm::service::ErrorLog::operator()(), and edm::service::ELtsErrorLog::pokeMsg().
void edm::ErrorObj::setProcess | ( | const ELstring & | proc | ) | [virtual] |
Definition at line 183 of file ErrorObj.cc.
References benchmark_cfg::cerr, myXid, proc, and edm::ELextendedID::process.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), edm::service::ErrorLog::operator()(), and edm::service::ELtsErrorLog::pokeMsg().
void edm::ErrorObj::setReactedTo | ( | bool | r | ) | [virtual] |
Definition at line 190 of file ErrorObj.cc.
References myReactedTo, and csvReporter::r.
Referenced by edm::service::ELtsErrorLog::dispatch(), edm::service::ELadministrator::finishMsg(), edm::service::ELtsErrorLog::initiateMsg(), and edm::service::ErrorLog::operator()().
{ myReactedTo = r; }
void edm::ErrorObj::setSeverity | ( | const ELseverityLevel & | sev | ) | [virtual] |
Definition at line 153 of file ErrorObj.cc.
References edm::ELfatal, edm::ELhighestSeverity, edm::ELincidental, edm::ELzeroSeverity, myXid, and edm::ELextendedID::severity.
Referenced by set().
{ myXid.severity = (sev <= ELzeroSeverity ) ? (ELseverityLevel)ELincidental : (sev >= ELhighestSeverity) ? (ELseverityLevel)ELfatal : sev ; }
void edm::ErrorObj::setSubroutine | ( | const ELstring & | subroutine | ) | [virtual] |
Definition at line 173 of file ErrorObj.cc.
References benchmark_cfg::cerr, myXid, and edm::ELextendedID::subroutine.
Referenced by emitToken(), edm::service::ELtsErrorLog::initiateMsg(), edm::service::ErrorLog::operator()(), and edm::service::ELtsErrorLog::pokeMsg().
time_t edm::ErrorObj::timestamp | ( | ) | const |
Definition at line 128 of file ErrorObj.cc.
References myTimestamp.
Referenced by edm::service::ELoutput::log(), and edm::ELlog4cplus::log().
{ return myTimestamp; }
const ELextendedID & edm::ErrorObj::xid | ( | ) | const |
Definition at line 126 of file ErrorObj.cc.
References myXid.
Referenced by edm::service::ELtsErrorLog::dispatch(), edm::service::ELadministrator::finishMsg(), edm::service::ELfwkJobReport::log(), edm::service::ELoutput::log(), edm::service::ELerrorList::log(), edm::service::MessageLoggerScribe::log(), edm::service::ELcollected::log(), edm::service::ELstatistics::log(), edm::ELlog4cplus::log(), edm::MessageSender::ErrorObjDeleter::operator()(), edm::service::ErrorLog::operator()(), and edm::service::ELtsErrorLog::pokeMsg().
{ return myXid; }
std::string edm::ErrorObj::emptyString [private] |
Definition at line 116 of file ErrorObj.h.
Referenced by opltlt().
ELstring edm::ErrorObj::myContext [private] |
Definition at line 114 of file ErrorObj.h.
Referenced by context(), and setContext().
ELstring edm::ErrorObj::myIdOverflow [private] |
Definition at line 110 of file ErrorObj.h.
Referenced by clear(), idOverflow(), and setID().
ELlist_string edm::ErrorObj::myItems [private] |
Definition at line 112 of file ErrorObj.h.
Referenced by clear(), emitToken(), fullText(), and items().
std::ostringstream edm::ErrorObj::myOs [private] |
Definition at line 115 of file ErrorObj.h.
Referenced by opltlt().
bool edm::ErrorObj::myReactedTo [private] |
Definition at line 113 of file ErrorObj.h.
Referenced by clear(), reactedTo(), and setReactedTo().
int edm::ErrorObj::mySerial [private] |
Definition at line 108 of file ErrorObj.h.
time_t edm::ErrorObj::myTimestamp [private] |
Definition at line 111 of file ErrorObj.h.
Referenced by clear(), set(), and timestamp().
ELextendedID edm::ErrorObj::myXid [private] |
Definition at line 109 of file ErrorObj.h.
Referenced by clear(), setID(), setModule(), setProcess(), setSeverity(), setSubroutine(), and xid().
int edm::ErrorObj::ourSerial [static, private] |
Definition at line 104 of file ErrorObj.h.
Referenced by set().
bool edm::ErrorObj::verbatim [private] |
Definition at line 117 of file ErrorObj.h.
Referenced by is_verbatim(), and opltlt().