#include <ErrorObj.h>
Public Member Functions | |
virtual void | clear () |
ELstring | context () const |
virtual ErrorObj & | emitToken (const ELstring &txt) |
ErrorObj (const ErrorObj &orig) | |
ErrorObj (const ELseverityLevel &sev, const ELstring &id, bool verbatim=false) | |
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 &)) |
ErrorObj & | operator= (const ErrorObj &other) |
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) |
void | swap (ErrorObj &other) |
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 dtNoiseDBValidation_cfg::cerr, and clear().
edm::ErrorObj::ErrorObj | ( | const ErrorObj & | orig | ) |
Definition at line 93 of file ErrorObj.cc.
References dtNoiseDBValidation_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 dtNoiseDBValidation_cfg::cerr.
{ #ifdef ErrorObjCONSTRUCTOR_TRACE std::cerr << "Destructor for ErrorObj\n"; #endif } // ~ErrorObj()
void edm::ErrorObj::clear | ( | void | ) | [virtual] |
Definition at line 262 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 153 of file ErrorObj.cc.
References myContext.
Referenced by edm::service::MessageLoggerScribe::log(), and edm::ELlog4cplus::log().
{ return myContext; }
Definition at line 220 of file ErrorObj.cc.
References dtNoiseDBValidation_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 157 of file ErrorObj.cc.
References myItems, and query::result.
const ELstring & edm::ErrorObj::idOverflow | ( | ) | const |
Definition at line 147 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 151 of file ErrorObj.cc.
References verbatim.
Referenced by edm::service::ELoutput::log().
{ return verbatim; }
const ELlist_string & edm::ErrorObj::items | ( | ) | const |
Definition at line 149 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::ostream &(*)(std::ostream &) | f | ) | [inline] |
ErrorObj& edm::ErrorObj::operator<< | ( | std::ios_base &(*)(std::ios_base &) | f | ) | [inline] |
Definition at line 120 of file ErrorObj.cc.
References swap(), and groupFilesInBlocks::temp.
Referenced by edm::operator<<().
ErrorObj & edm::ErrorObj::opltlt | ( | const char | s[] | ) |
Definition at line 274 of file ErrorObj.cc.
References emitToken(), emptyString, myOs, alignCSCRings::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; }
bool edm::ErrorObj::reactedTo | ( | ) | const |
Definition at line 150 of file ErrorObj.cc.
References myReactedTo.
Referenced by edm::service::ELstatistics::log().
{ return myReactedTo; }
int edm::ErrorObj::serial | ( | ) | const |
Definition at line 145 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 249 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 190 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 181 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 188 of file ErrorObj.cc.
References edm::ELextendedID::module, python::rootplot::argparse::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 203 of file ErrorObj.cc.
References dtNoiseDBValidation_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 210 of file ErrorObj.cc.
References myReactedTo, and alignCSCRings::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 173 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 193 of file ErrorObj.cc.
References dtNoiseDBValidation_cfg::cerr, myXid, and edm::ELextendedID::subroutine.
Referenced by emitToken(), edm::service::ELtsErrorLog::initiateMsg(), edm::service::ErrorLog::operator()(), and edm::service::ELtsErrorLog::pokeMsg().
void edm::ErrorObj::swap | ( | ErrorObj & | other | ) |
Definition at line 126 of file ErrorObj.cc.
References emptyString, myContext, myIdOverflow, myItems, myOs, myReactedTo, mySerial, myTimestamp, myXid, groupFilesInBlocks::temp, and verbatim.
Referenced by operator=(), edm::swap(), and edm::service::ELtsErrorLog::swap().
{ std::swap(mySerial, other.mySerial); std::swap(myXid, other.myXid); myIdOverflow.swap(other.myIdOverflow); std::swap(myTimestamp, other.myTimestamp); myItems.swap(other.myItems); std::swap(myReactedTo, other.myReactedTo); myContext.swap(other.myContext); std::string temp(other.myOs.str()); other.myOs.str(myOs.str()); myOs.str(temp); emptyString.swap(other.emptyString); std::swap(verbatim, other.verbatim); }
time_t edm::ErrorObj::timestamp | ( | ) | const |
Definition at line 148 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 146 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 118 of file ErrorObj.h.
ELstring edm::ErrorObj::myContext [private] |
Definition at line 116 of file ErrorObj.h.
Referenced by context(), setContext(), and swap().
ELstring edm::ErrorObj::myIdOverflow [private] |
Definition at line 112 of file ErrorObj.h.
Referenced by clear(), idOverflow(), setID(), and swap().
ELlist_string edm::ErrorObj::myItems [private] |
Definition at line 114 of file ErrorObj.h.
Referenced by clear(), emitToken(), fullText(), items(), and swap().
std::ostringstream edm::ErrorObj::myOs [private] |
Definition at line 117 of file ErrorObj.h.
bool edm::ErrorObj::myReactedTo [private] |
Definition at line 115 of file ErrorObj.h.
Referenced by clear(), reactedTo(), setReactedTo(), and swap().
int edm::ErrorObj::mySerial [private] |
time_t edm::ErrorObj::myTimestamp [private] |
Definition at line 113 of file ErrorObj.h.
Referenced by clear(), set(), swap(), and timestamp().
ELextendedID edm::ErrorObj::myXid [private] |
Definition at line 111 of file ErrorObj.h.
Referenced by clear(), setID(), setModule(), setProcess(), setSeverity(), setSubroutine(), swap(), and xid().
int edm::ErrorObj::ourSerial [static, private] |
Definition at line 106 of file ErrorObj.h.
Referenced by set().
bool edm::ErrorObj::verbatim [private] |
Definition at line 119 of file ErrorObj.h.
Referenced by is_verbatim(), opltlt(), and swap().