#include <FWCore/MessageLogger/interface/MessageSender.h>
Public Member Functions | |
MessageSender (ELseverityLevel const &sev, ELstring const &id) | |
MessageSender (ELseverityLevel const &sev, ELstring const &id, bool verbatim) | |
template<class T> | |
MessageSender & | operator<< (T const &t) |
~MessageSender () | |
Static Public Attributes | |
static bool | errorSummaryIsBeingKept = false |
static std::map < ErrorSummaryMapKey, unsigned int > | errorSummaryMap |
static bool | freshError = false |
Private Member Functions | |
MessageSender (MessageSender const &) | |
void | operator= (MessageSender const &) |
Private Attributes | |
ErrorObj * | errorobj_p |
Definition at line 23 of file MessageSender.h.
MessageSender::MessageSender | ( | ELseverityLevel const & | sev, | |
ELstring const & | id, | |||
bool | verbatim | |||
) |
Definition at line 23 of file MessageSender.cc.
00026 : errorobj_p( new ErrorObj(sev,id,verbatim) ) 00027 { 00028 //std::cout << "MessageSender ctor; new ErrorObj at: " << errorobj_p << '\n'; 00029 }
MessageSender::MessageSender | ( | ELseverityLevel const & | sev, | |
ELstring const & | id | |||
) |
Definition at line 31 of file MessageSender.cc.
00033 : errorobj_p( new ErrorObj(sev,id,false) ) 00034 { 00035 //std::cout << "MessageSender ctor; new ErrorObj at: " << errorobj_p << '\n'; 00036 }
MessageSender::~MessageSender | ( | ) |
Definition at line 42 of file MessageSender.cc.
References TestMuL1L2Filter_cff::cerr, drop, edm::ELwarning, errorobj_p, errorSummaryIsBeingKept, errorSummaryMap, freshError, i, edm::ELextendedID::id, edm::MessageDrop::instance(), getDQMSummary::key, edm::MessageLoggerQ::MLqLOG(), edm::ELextendedID::module, edm::MessageDrop::moduleName, edm::MessageDrop::runEvent, edm::ErrorObj::setContext(), edm::ErrorObj::setModule(), edm::ELextendedID::severity, and edm::ErrorObj::xid().
00043 { 00044 try 00045 { 00046 //std::cout << "MessageSender dtor; ErrorObj at: " << errorobj_p << '\n'; 00047 00048 // surrender ownership of our ErrorObj, transferring ownership 00049 // (via the intermediate MessageLoggerQ) to the MessageLoggerScribe 00050 // that will (a) route the message text to its destination(s) 00051 // and will then (b) dispose of the ErrorObj 00052 00053 MessageDrop * drop = MessageDrop::instance(); 00054 if (drop) { 00055 errorobj_p->setModule(drop->moduleName); 00056 errorobj_p->setContext(drop->runEvent); 00057 } 00058 #ifdef TRACE_DROP 00059 if (!drop) std::cerr << "MessageSender::~MessageSender() - Null drop pointer \n"; 00060 #endif 00061 // change log 1 00062 if ( errorSummaryIsBeingKept && 00063 errorobj_p->xid().severity >= ELwarning ) 00064 { 00065 ELextendedID const & xid = errorobj_p->xid(); 00066 ErrorSummaryMapKey key (xid.id, xid.module); 00067 ErrorSummaryMapIterator i = errorSummaryMap.find(key); 00068 if (i != errorSummaryMap.end()) { 00069 ++(i->second); // same as ++errorSummaryMap[key] 00070 } else { 00071 errorSummaryMap[key] = 1; 00072 } 00073 freshError = true; 00074 } 00075 00076 MessageLoggerQ::MLqLOG(errorobj_p); 00077 } 00078 catch ( ... ) 00079 { 00080 // nothing to do 00081 00082 // for test that removal of thread-involved static works, 00083 // simply throw here, then run in trivial_main in totalview 00084 // and Next or Step so that the exception would be detected. 00085 // That test has been done 12/14/07. 00086 } 00087 }
edm::MessageSender::MessageSender | ( | MessageSender const & | ) | [private] |
MessageSender& edm::MessageSender::operator<< | ( | T const & | t | ) | [inline] |
Definition at line 37 of file MessageSender.h.
00038 { 00039 (*errorobj_p) << t; 00040 return *this; 00041 }
void edm::MessageSender::operator= | ( | MessageSender const & | ) | [private] |
ErrorObj* edm::MessageSender::errorobj_p [private] |
bool MessageSender::errorSummaryIsBeingKept = false [static] |
Definition at line 44 of file MessageSender.h.
Referenced by edm::DisableLoggedErrorsSummary(), edm::EnableLoggedErrorsSummary(), and ~MessageSender().
std::map< ErrorSummaryMapKey, unsigned int > MessageSender::errorSummaryMap [static] |
Definition at line 46 of file MessageSender.h.
Referenced by edm::LoggedErrorsSummary(), and ~MessageSender().
bool MessageSender::freshError = false [static] |
Definition at line 45 of file MessageSender.h.
Referenced by edm::FreshErrorsExist(), edm::LoggedErrorsSummary(), and ~MessageSender().