58 , updatedStats (
false )
59 , termStream ( std::
cerr )
60 , printAtTermination(
true )
63 #ifdef ELstatisticsCONSTRUCTOR_TRACE
64 std::cerr <<
"Constructor for ELstatistics()\n";
74 , updatedStats (
false )
76 , printAtTermination(
true )
79 #ifdef ELstatisticsCONSTRUCTOR_TRACE
80 std::cerr <<
"Constructor for ELstatistics(osp)\n";
88 , tableLimit ( spaceLimit )
90 , updatedStats (
false )
91 , termStream ( std::
cerr )
92 , printAtTermination(
true )
95 #ifdef ELstatisticsCONSTRUCTOR_TRACE
96 std::cerr <<
"Constructor for ELstatistics(spaceLimit)\n";
104 , tableLimit ( spaceLimit )
106 , updatedStats (
false )
108 , printAtTermination(
true )
111 #ifdef ELstatisticsCONSTRUCTOR_TRACE
112 std::cerr <<
"Constructor for ELstatistics(spaceLimit,osp)\n";
120 , tableLimit ( orig.tableLimit )
121 , stats ( orig.stats )
122 , updatedStats ( orig.updatedStats )
123 , termStream ( orig.termStream )
124 , printAtTermination( orig.printAtTermination )
127 #ifdef ELstatisticsCONSTRUCTOR_TRACE
128 std::cerr <<
"Copy constructor for ELstatistics()\n";
141 #ifdef ELstatisticsCONSTRUCTOR_TRACE
142 std::cerr <<
"Destructor for ELstatistics\n";
164 if ( c.substr (0,4) !=
"Run:" )
return c;
165 std::istringstream is (c);
168 is >> runWord >>
run;
170 if (runWord !=
"Run:")
return c;
173 is >> eventWord >>
event;
175 if (eventWord !=
"Event:")
return c;
176 std::ostringstream os;
177 os << run <<
"/" <<
event;
184 #ifdef ELstatsLOG_TRACE
185 std::cerr <<
" =:=:=: Log to an ELstatistics\n";
195 ELmap_stats::iterator
s =
stats.find( msg.
xid() );
196 if ( s ==
stats.end() ) {
202 #ifdef ELstatsLOG_TRACE
203 std::cerr <<
" =:=:=: Message accounted for in stats \n";
205 if ( s !=
stats.end() ) {
209 #ifdef ELstatsLOG_TRACE
219 #ifdef ELstatsLOG_TRACE
220 std::cerr <<
" =:=:=: log(msg) done (stats) \n";
236 ELmap_stats::iterator
s;
239 (*s).second.context1 = (*s).second.context2 = (*s).second.contextLast =
"";
269 std::ostringstream
s;
274 bool ftnote(
false );
278 part3() :
n(0
L),
t(0
L) { ; }
283 for ( ELmap_stats::const_iterator
i = stats.begin();
i != stats.end(); ++
i ) {
296 s <<
" type category sev module "
297 "subroutine count total\n"
298 <<
" ---- -------------------- -- ---------------- "
299 "---------------- ----- -----\n"
304 s << right << std::setw( 5) << ++n <<
' '
305 << left << std::setw(20) << (*i).first.id.substr(0,20) <<
' '
306 << left << std::setw( 2) << (*i).first.severity.getSymbol() <<
' '
307 << left << std::setw(16) << (*i).first.module.substr(0,16) <<
' '
308 << left << std::setw(16) << (*i).first.subroutine.substr(0,16)
309 << right << std::setw( 7) << (*i).second.n
310 << left << std::setw( 1) << ( (*i).second.ignoredFlag ?
'*' :
' ' )
311 << right << std::setw( 8) << (*i).second.aggregateN <<
'\n'
313 ftnote = ftnote || (*i).second.ignoredFlag;
325 int groupAggregateN = 0;
327 bool groupIgnored =
true;
328 for ( ELmap_stats::const_iterator
i = stats.begin();
i != stats.end(); ++
i ) {
329 if ( (*i).first.id == *
g ) {
330 if (groupTotal==0) severityLevel = (*i).first.severity;
331 groupIgnored &= (*i).second.ignoredFlag;
332 groupAggregateN += (*i).second.aggregateN;
336 if (groupTotal > 0) {
339 s << right << std::setw( 5) << ++n <<
' '
340 << left << std::setw(20) << (*g).substr(0,20) <<
' '
341 << left << std::setw( 2) << severityLevel.
getSymbol() <<
' '
342 << left << std::setw(16) <<
" <Any Module> " <<
' '
343 << left << std::setw(16) <<
"<Any Function>"
344 << right << std::setw( 7) << groupTotal
345 << left << std::setw( 1) << ( groupIgnored ?
'*' :
' ' )
346 << right << std::setw( 8) << groupAggregateN <<
'\n'
348 ftnote = ftnote || groupIgnored;
353 p3[lev].n += groupTotal;
354 p3[lev].t += groupAggregateN;
361 s <<
"\n* Some occurrences of this message"
362 " were suppressed in all logs, due to limits.\n"
368 for ( ELmap_stats::const_iterator
i = stats.begin();
i != stats.end(); ++
i ) {
376 <<
" type category Examples: "
377 "run/evt run/evt run/evt\n"
378 <<
" ---- -------------------- ----"
379 "------------ ---------------- ----------------\n"
382 s << right << std::setw( 5) << ++n <<
' '
383 << left << std::setw(20) << (*i).first.id.c_str() <<
' '
384 << left << std::setw(16) << (*i).second.context1.c_str() <<
' '
385 << left << std::setw(16) << (*i).second.context2.c_str() <<
' '
386 << (*i).second.contextLast.c_str() <<
'\n'
392 s <<
"\nSeverity # Occurrences Total Occurrences\n"
393 <<
"-------- ------------- -----------------\n";
395 if (
p3[
k].n != 0 ||
p3[
k].
t != 0 ) {
397 << right << std::setw(17) <<
p3[
k].n
398 << right << std::setw(20) <<
p3[
k].t
426 termStream <<
"\n=============================================\n\n"
445 return std::map<ELextendedID , StatsCount> (
stats );
454 part3() :
n(0
L),
t(0
L) { ; }
461 for ( ELmap_stats::const_iterator
i =
stats.begin();
i !=
stats.end(); ++
i ) {
472 std::ostringstream
s;
474 std::string sevSymbol = (*i).first.severity.getSymbol();
475 if ( sevSymbol[0] ==
'-' ) sevSymbol = sevSymbol.substr(1);
476 s << sevSymbol <<
"_" << (*i).first.id;
477 int n = (*i).second.aggregateN;
479 if (sm.find(catstr) != sm.end()) {
494 int groupAggregateN = 0;
496 for ( ELmap_stats::const_iterator
i =
stats.begin();
i !=
stats.end(); ++
i ) {
497 if ( (*i).first.id == *
g ) {
498 if (groupTotal==0) severityLevel = (*i).first.severity;
499 groupAggregateN += (*i).second.aggregateN;
503 if (groupTotal > 0) {
506 std::ostringstream
s;
509 if ( sevSymbol[0] ==
'-' ) sevSymbol = sevSymbol.substr(1);
510 s << sevSymbol <<
"_" << *
g;
511 int n = groupAggregateN;
513 if (sm.find(catstr) != sm.end()) {
522 p3[lev].n += groupTotal;
523 p3[lev].t += groupAggregateN;
536 if (sevName ==
"Severe") sevName =
"System";
537 if (sevName ==
"Success") sevName =
"Debug";
540 if (sevName !=
"UnusedSeverity") {
541 sm[sevName] =
p3[
k].t;
550 if (s==
"LogDebug")
return "LogDebug_LogTrace";
551 if (s==
"LogInfo")
return "LogInfo_LogVerbatim";
552 if (s==
"LogWarning")
return "LogWarnng_LogPrint";
553 if (s==
"LogError")
return "LogError_LogProblem";
554 if (s==
"LogSystem")
return "LogSystem_LogAbsolute";
555 return "UnusedSeverity";
static std::set< std::string > groupedCategories
static std::string summarizeContext(const std::string &c)
virtual ELstatistics * clone() const
virtual std::map< ELextendedID, StatsCount > statisticsMap() const
std::string dualLogName(std::string const &s)
virtual bool thisShouldBeIgnored(const ELstring &s) const
ELseverityLevel threshold
std::ostream & termStream
void noTerminationSummary()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
static ELstring formSummary(ELmap_stats &stats)
const ELstring getSymbol() const
const ELextendedID & xid() const
virtual void clearSummary()
const ELstring getName() const
ELset_string respondToThese
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
static void noteGroupedCategory(std::string const &cat)
std::map< ELextendedID, StatsCount > ELmap_stats
bool respondToMostModules
virtual void summaryForJobReport(std::map< std::string, double > &sm)
volatile std::atomic< bool > shutdown_flag false
void summarization(const ELstring &title, const ELstring &sumLines)
virtual bool log(const edm::ErrorObj &msg)