typedef std::set<ELsetS> edm::service::ELset_string |
Definition at line 47 of file ELrecv.cc.
References python::TagTree::context, diff, edm::ELerror2, edm::ELseverityLevel::ELsev_highestSeverity, edm::ELseverityLevel::ELsev_unspecified, edm::ELseverityLevel::ELsev_zeroSeverity, endmsg(), id, edm::service::ELadministrator::instance(), cmsRelvalreport::logger(), process, edm::service::ELservConSup::setContext(), edm::service::ELservConSup::setFullContext(), edm::service::ErrorLog::setModule(), edm::service::ErrorLog::setSubroutine(), edm::service::ELservConSup::setSummaryContext(), edm::service::ELadministrator::swapContextSupplier(), and edm::service::ELadministrator::swapProcess().
00047 { 00048 00049 static const int MAXITEMCOUNT = 100; 00050 00051 static ErrorLog errlog; 00052 static ELservConSup con; 00053 static ELadministrator * logger = ELadministrator::instance(); 00054 00055 // Pull out the extended id. Carefully look at ELcollected::emitXid to 00056 // make certain we take things out in the proper order. 00057 00058 ELstring process; 00059 ELstring module; 00060 ELstring subroutine; 00061 ELstring id; 00062 ELstring sevString; 00063 int sevLevel; 00064 00065 const char * nextItem = data; 00066 00067 process = nextItem; 00068 nextItem += strlen(nextItem) + 1; 00069 00070 if (localModule == "*ELrecv*") module = nextItem; 00071 else module = localModule + ":" + nextItem; 00072 nextItem += strlen(nextItem) + 1; 00073 00074 subroutine = nextItem; 00075 nextItem += strlen(nextItem) + 1; 00076 00077 id = nextItem; 00078 nextItem += strlen(nextItem) + 1; 00079 00080 sevString = nextItem; 00081 nextItem += strlen(nextItem) + 1; 00082 std::istringstream ist (sevString); 00083 if ( ! (ist >> sevLevel) ) { 00084 // This should not be possible. But if it does, we don't want to 00085 // kill off the probably critical error monitoring job! 00086 errlog ( ELerror2, "Collection Error" ) << 00087 "An error message received has an unreadable value of severity level" 00088 << sevString << endmsg; 00089 sevLevel = ELseverityLevel::ELsev_unspecified; 00090 } 00091 if ( sevLevel < ELseverityLevel::ELsev_zeroSeverity || 00092 sevLevel > ELseverityLevel::ELsev_highestSeverity ) { 00093 // Again, this should not be possible. 00094 errlog ( ELerror2, "Collection Error" ) << 00095 "An error message received has an out-of-range value of severity level" 00096 << sevString << endmsg; 00097 sevLevel = ELseverityLevel::ELsev_unspecified; 00098 } 00099 00100 // Pull out the context strings and set up the special supplier. 00101 00102 ELstring context; 00103 00104 context = nextItem; 00105 nextItem += strlen(nextItem) + 1; 00106 con.setSummaryContext( context ); 00107 00108 context = nextItem; 00109 nextItem += strlen(nextItem) + 1; 00110 con.setContext( context ); 00111 00112 context = nextItem; 00113 nextItem += strlen(nextItem) + 1; 00114 con.setFullContext( context ); 00115 00116 // Remember the context supplier, and substitute the special supplier. 00117 00118 ELcontextSupplier & oldCS = logger->swapContextSupplier(con); 00119 00120 // Set the module, subroutine, and process according to this xid. 00121 00122 ELstring oldProcess = logger->swapProcess(process); 00123 errlog.setModule (module); 00124 errlog.setSubroutine(subroutine); 00125 00126 // Instantiate a message with the appropriate severity level and id. 00127 00128 errlog ( ELseverityLevel( ELseverityLevel::ELsev_(sevLevel)), id ); 00129 00130 // Add the remaining items to this message. 00131 // To avoid any possibility of a completely runaway message, we limit 00132 // the number of items output to 100 by doing a for instead of a while 00133 // loop. 00134 00135 ELstring item; 00136 int itemCount; 00137 for ( itemCount = 0; itemCount < MAXITEMCOUNT; itemCount++ ) { 00138 if (*nextItem == 0) break; 00139 item = nextItem; 00140 nextItem += strlen(nextItem) + 1; 00141 errlog << item; 00142 } 00143 00144 // If the direct ELrecv form was used, end the message, 00145 // thus causing the logging. If the errlog (nbytes, data) form was 00146 // used, the user will supply the endmsg. 00147 00148 if ( localModule == "*ELrecv*" ) { 00149 errlog << endmsg; 00150 } 00151 00152 if ( *nextItem++ != 0 ) { 00153 errlog << endmsg; 00154 errlog ( ELerror2, "Collection Error" ) << 00155 "Apparent runaway error message on the previous message!" << 00156 "Truncated after " << MAXITEMCOUNT << "items." << endmsg; 00157 } 00158 int diff = nextItem - data; 00159 if ( diff != nbytes ) { 00160 errlog << endmsg; 00161 errlog ( ELerror2, "Collection Error" ) << 00162 "Apparent corrupted transmission of error message" 00163 << "on the previous message!" 00164 << "Total length was" << diff << "nbytes transmitted was" << nbytes 00165 << endmsg; 00166 } 00167 00168 // End the message, before we swap back the context and process. 00169 // (This is what makes the endmsg in errlog(nbytes, data) << endmsg 00170 // superfluous.) 00171 00172 errlog << endmsg; 00173 00174 // Reset the context supplier and process to the remembered value. 00175 00176 logger->swapContextSupplier(oldCS); 00177 logger->swapProcess(oldProcess); 00178 00179 } // ELrecv()
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
unsigned short | n | |||
) | [inline] |
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
short | n | |||
) | [inline] |
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
unsigned long | n | |||
) | [inline] |
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
long | n | |||
) | [inline] |
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
const char | s[] | |||
) | [inline] |
void edm::service::ELtsItem | ( | ELtsErrorLog & | e, | |
const T & | t | |||
) | [inline] |
void edm::service::endmsg | ( | ErrorLog & | log | ) |
Definition at line 357 of file ErrorLog.cc.
References edm::service::ErrorLog::endmsg().
Referenced by pool::TrivialFileCatalog::connect(), ELrecv(), and pool::TrivialFileCatalog::TrivialFileCatalog().
00357 { log.endmsg(); }
static char* edm::service::formatTime | ( | const time_t | t | ) | [static] |
Definition at line 89 of file ELoutput.cc.
Referenced by edm::service::ELoutput::changeFile(), edm::service::ELoutput::ELoutput(), and edm::service::ELoutput::log().
00089 { 00090 00091 static char ts[] = "dd-Mon-yyyy hh:mm:ss TZN "; 00092 00093 00094 #ifdef AN_ALTERNATIVE_FOR_TIMEZONE 00095 char * c = ctime( &t ); // 6/14/99 mf Can't be static! 00096 strncpy( ts+ 0, c+ 8, 2 ); // dd 00097 strncpy( ts+ 3, c+ 4, 3 ); // Mon 00098 strncpy( ts+ 7, c+20, 4 ); // yyyy 00099 strncpy( ts+12, c+11, 8 ); // hh:mm:ss 00100 strncpy( ts+21, tzname[localtime(&t)->tm_isdst], 8 ); // CST 00101 #endif 00102 00103 strftime( ts, strlen(ts)+1, "%d-%b-%Y %H:%M:%S %Z", localtime(&t) ); 00104 // mf 4-9-04 00105 00106 #ifdef STRIP_TRAILING_BLANKS_IN_TIMEZONE 00107 // strip trailing blanks that would come when the time zone is not as 00108 // long as the maximum allowed - probably not worth the time 00109 unsigned int b = strlen(ts); 00110 while (ts[--b] == ' ') {ts[b] = 0;} 00111 #endif 00112 00113 return ts; 00114 00115 } // formatTime()
static double edm::service::getTime | ( | ) | [static] |
Definition at line 28 of file PathTimerService.cc.
References Exception.
Referenced by edm::service::PathTimerService::postBeginJob(), edm::service::Timing::postBeginJob(), edm::service::Timing::postEndJob(), edm::service::Timing::postEventProcessing(), edm::service::Timing::postModule(), edm::service::PathTimerService::preEventProcessing(), edm::service::Timing::preEventProcessing(), and edm::service::Timing::preModule().
00028 { 00029 struct timeval t; 00030 if(gettimeofday(&t,0)<0) 00031 throw cms::Exception("SysCallFailed","Failed call to gettimeofday"); 00032 00033 return (double)t.tv_sec + (double(t.tv_usec) * 1E-6); 00034 }
static void edm::service::msgabort | ( | ) | [inline, static] |
Definition at line 289 of file ELadministrator.cc.
References e, and edm::errors::LogicError.
Referenced by edm::service::ELtsErrorLog::dispatch(), possiblyAbOrEx(), and possiblyAbortOrExit().
00289 { 00290 std::ostringstream os; 00291 os << "msgabort - MessageLogger requested to abort"; 00292 edm::Exception e(edm::errors::LogicError, os.str()); 00293 throw e; 00294 }
Definition at line 282 of file ELadministrator.cc.
References e, and edm::errors::LogicError.
Referenced by possiblyAbOrEx(), and possiblyAbortOrExit().
00282 { 00283 std::ostringstream os; 00284 os << "msgexit - MessageLogger requested to exit with status " << s; 00285 edm::Exception e(edm::errors::LogicError, os.str()); 00286 throw e; 00287 }
std::ostream & edm::service::operator<< | ( | std::ostream & | os, | |
SimpleMemoryCheck::SignificantModule const & | sm | |||
) |
Definition at line 666 of file Memory.cc.
References edm::service::SimpleMemoryCheck::SignificantModule::eventMaxDeltaV, edm::service::SimpleMemoryCheck::SignificantModule::maxDeltaVsize, edm::service::SimpleMemoryCheck::SignificantModule::maxEarlyVsize, edm::service::SimpleMemoryCheck::SignificantModule::postEarlyCount, edm::service::SimpleMemoryCheck::SignificantModule::totalDeltaVsize, and edm::service::SimpleMemoryCheck::SignificantModule::totalEarlyVsize.
00667 { 00668 if ( sm.postEarlyCount > 0 ) { 00669 os << "\nPost Early Events: TotalDeltaVsize: " << sm.totalDeltaVsize 00670 << " (avg: " << sm.totalDeltaVsize/sm.postEarlyCount 00671 << "; max: " << sm.maxDeltaVsize 00672 << " during " << sm.eventMaxDeltaV << ")"; 00673 } 00674 if ( sm.totalEarlyVsize > 0 ) { 00675 os << "\n Early Events: TotalDeltaVsize: " << sm.totalEarlyVsize 00676 << " (max: " << sm.maxEarlyVsize << ")"; 00677 } 00678 00679 return os; 00680 }
std::ostream & edm::service::operator<< | ( | std::ostream & | os, | |
SimpleMemoryCheck::SignificantEvent const & | se | |||
) |
Definition at line 656 of file Memory.cc.
References edm::service::SimpleMemoryCheck::SignificantEvent::count, edm::service::SimpleMemoryCheck::SignificantEvent::deltaRss, edm::service::SimpleMemoryCheck::SignificantEvent::deltaVsize, edm::service::SimpleMemoryCheck::SignificantEvent::event, edm::service::SimpleMemoryCheck::SignificantEvent::rss, and edm::service::SimpleMemoryCheck::SignificantEvent::vsize.
00657 { 00658 os << "[" << se.count << "] " 00659 << se.event << " vsize = " << se.vsize 00660 << " deltaVsize = " << se.deltaVsize 00661 << " rss = " << se.rss << " delta " << se.deltaRss; 00662 return os; 00663 }
ThreadSafeErrorLog<Mutex>& edm::service::operator<< | ( | ThreadSafeErrorLog< Mutex > & | e, | |
const T & | t | |||
) | [inline] |
ThreadSafeErrorLog<Mutex>& edm::service::operator<< | ( | ThreadSafeErrorLog< Mutex > & | e, | |
void(*)(ErrorLog &) | f | |||
) | [inline] |
ErrorLog & edm::service::operator<< | ( | ErrorLog & | e, | |
const char | s[] | |||
) |
Definition at line 461 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, and edm::service::ErrorLog::emit().
00461 { 00462 // Exactly equivalent to the general template. 00463 // If this is not provided explicitly, then the template will 00464 // be instantiated once for each length of string ever used. 00465 if (e.discarding) return e; 00466 std::ostringstream ost; 00467 ost << s << ' '; 00468 return e.emit( ost.str() ); 00469 }
ErrorLog & edm::service::operator<< | ( | ErrorLog & | e, | |
unsigned short | n | |||
) |
Definition at line 442 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, and edm::service::ErrorLog::spaceAfterInt.
00442 { 00443 if (e.discarding) return e; 00444 std::ostringstream ost; 00445 ost << n; 00446 if ( (e.hexTrigger >= 0) && (n >= e.hexTrigger) ) { 00447 ost << "[0x" 00448 << std::hex << std::setw(4) << std::setfill('0') 00449 << n << "] "; 00450 } else { 00451 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00452 } 00453 return e.emit( ost.str() ); 00454 }
ErrorLog & edm::service::operator<< | ( | ErrorLog & | e, | |
unsigned long | n | |||
) |
Definition at line 410 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, edm::service::ErrorLog::spaceAfterInt, and width.
00410 { 00411 if (e.discarding) return e; 00412 std::ostringstream ost; 00413 ost << n; 00414 if ( (e.hexTrigger >= 0) && 00415 (n >= static_cast<unsigned long>(e.hexTrigger)) ) { 00416 int width = 8; 00417 if ( n > 0xFFFFFFFFL ) width = 16; 00418 ost << "[0x" 00419 << std::hex << std::setw(width) << std::setfill('0') 00420 << n << "] "; 00421 } else { 00422 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00423 } 00424 return e.emit( ost.str() ); 00425 }
Definition at line 378 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, and edm::service::ErrorLog::spaceAfterInt.
00378 { 00379 if (e.discarding) return e; 00380 std::ostringstream ost; 00381 ost << n; 00382 if ( (e.hexTrigger >= 0) && 00383 (n >= static_cast<unsigned int>(e.hexTrigger)) ) { 00384 ost << "[0x" 00385 << std::hex << std::setw(8) << std::setfill('0') 00386 << n << "] "; 00387 } else { 00388 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00389 } 00390 return e.emit( ost.str() ); 00391 }
ErrorLog & edm::service::operator<< | ( | ErrorLog & | e, | |
short | n | |||
) |
Definition at line 427 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, m, and edm::service::ErrorLog::spaceAfterInt.
00427 { 00428 if (e.discarding) return e; 00429 std::ostringstream ost; 00430 ost << n; 00431 short m = (n<0) ? -n : n; 00432 if ( (e.hexTrigger >= 0) && (m >= e.hexTrigger) ) { 00433 ost << "[0x" 00434 << std::hex << std::setw(4) << std::setfill('0') 00435 << n << "] "; 00436 } else { 00437 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00438 } 00439 return e.emit( ost.str() ); 00440 }
ErrorLog & edm::service::operator<< | ( | ErrorLog & | e, | |
long | n | |||
) |
Definition at line 393 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, L, m, edm::service::ErrorLog::spaceAfterInt, and width.
00393 { 00394 if (e.discarding) return e; 00395 std::ostringstream ost; 00396 ost << n; 00397 long m = (n<0) ? -n : n; 00398 if ( (e.hexTrigger >= 0) && (m >= e.hexTrigger) ) { 00399 int width = 8; 00400 if ( static_cast<unsigned long>(n) > 0xFFFFFFFFL ) width = 16; 00401 ost << "[0x" 00402 << std::hex << std::setw(width) << std::setfill('0') 00403 << n << "] "; 00404 } else { 00405 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00406 } 00407 return e.emit( ost.str() ); 00408 }
Definition at line 363 of file ErrorLog.cc.
References edm::service::ErrorLog::discarding, edm::service::ErrorLog::emit(), edm::service::ErrorLog::hexTrigger, m, and edm::service::ErrorLog::spaceAfterInt.
00363 { 00364 if (e.discarding) return e; 00365 std::ostringstream ost; 00366 ost << n; 00367 int m = (n<0) ? -n : n; 00368 if ( (e.hexTrigger >= 0) && (m >= e.hexTrigger) ) { 00369 ost << " [0x" 00370 << std::hex << std::setw(8) << std::setfill('0') 00371 << n << "] "; 00372 } else { 00373 if (e.spaceAfterInt) ost << " "; // $$mf 3/17/04 00374 } 00375 return e.emit( ost.str() ); 00376 }
ErrorLog& edm::service::operator<< | ( | ErrorLog & | e, | |
const T & | t | |||
) | [inline] |
Definition at line 169 of file ErrorLog.cc.
References msgabort(), and msgexit().
Referenced by edm::service::ErrorLog::operator()().
00169 { 00170 if (s < a && s < e) return; 00171 if (a < e) { 00172 if ( s < e ) msgabort(); 00173 msgexit(s); 00174 } else { 00175 if ( s < a ) msgexit(s); 00176 msgabort(); 00177 } 00178 }
Definition at line 296 of file ELadministrator.cc.
References msgabort(), and msgexit().
Referenced by edm::service::ELadministrator::finishMsg().
00296 { 00297 if (s < a && s < e) return; 00298 if (a < e) { 00299 if ( s < e ) msgabort(); 00300 msgexit(s); 00301 } else { 00302 if ( s < a ) msgexit(s); 00303 msgabort(); 00304 } 00305 }
Definition at line 474 of file ELadministrator.cc.
ELstring edm::service::hereMsg = "available via this destination" [static] |
Definition at line 93 of file ELdestination.cc.
Referenced by edm::service::ELdestination::clearSummary(), edm::service::ELdestination::summarization(), and edm::service::ELdestination::summary().
ELstring edm::service::noClearSummaryMsg = "No clearSummary()" [static] |
Definition at line 92 of file ELdestination.cc.
Referenced by edm::service::ELdestination::clearSummary().
ELstring edm::service::noosMsg = "No ostream" [static] |
Definition at line 94 of file ELdestination.cc.
Referenced by edm::service::ELdestination::changeFile(), and edm::service::ELdestination::flush().
ELstring edm::service::noSummarizationMsg = "No summarization()" [static] |
Definition at line 90 of file ELdestination.cc.
Referenced by edm::service::ELdestination::summarization().
ELstring edm::service::noSummaryMsg = "No summary()" [static] |
Definition at line 91 of file ELdestination.cc.
Referenced by edm::service::ELdestination::summary().
ELstring edm::service::notELoutputMsg = "This destination is not an ELoutput" [static] |
Definition at line 95 of file ELdestination.cc.
Referenced by edm::service::ELdestination::changeFile().