CMS 3D CMS Logo

LoggedErrorsSummary.h
Go to the documentation of this file.
1 #ifndef MessageLogger_LoggedErrorsSummary_h
2 #define MessageLogger_LoggedErrorsSummary_h
3 
4 // ----------------------------------------------------------------------
5 //
6 // LoggedErrorsSummary.h - Methods to obtain summary of warning and error
7 // messages issued in an event.
8 //
9 // Usage:
10 // EnableLoggedErrorsSummary();
11 // then per event:
12 // some_code_that_might_issue_messages();
13 // if (edm::FreshErrorsExist()) {
14 // std::vector<edm::ErrorSummaryEntry> es = edm::LoggedErrorsSummary();
15 // package_as_product_in_the_event (es);
16 // }
17 //
18 // The above gives warnings and errors; use LoggedErrorsOnlySummary() for
19 // just errors.
20 //
21 // Note: This goes by severity level. Thus a LogImportant message, though
22 // not intended to convey a problematic error, will appear in the
23 // summary. Also, Absolute and System messages are logged.
24 
25 //
26 // void
27 // package_as_product_in_the_event(std::vector<edm::ErrorSummaryEntry> const& es)
28 // {
29 // // This example shows how to save just errors and not warnings
30 // std::vector<edm::ErrorSummaryEntry> errs;
31 // std::vector<edm::ErrorSummaryEntry>::const_iterator end = es.end();
32 // for (std::vector<edm::ErrorSummaryEntry>::const_iterator i = es.begin();
33 // i != end; ++i) {
34 // if ( i->severity >= edm:ELerror ) errs.push_back(*i);
35 // }
36 // place_into_event(errs);
37 // }
38 //
39 // 25-Aug-2008 mf Created file.
40 //
41 // 22-Jun-2009 mf Added LoggedErrorsOnlySummary()
42 //
43 // ----------------------------------------------------------------------
44 
46 
47 #include <vector>
48 
49 namespace edm {
50 
53  bool FreshErrorsExist(unsigned int iStreamID);
54  std::vector<messagelogger::ErrorSummaryEntry> LoggedErrorsSummary(unsigned int iStreamID); // Errors and Warnings
55  std::vector<messagelogger::ErrorSummaryEntry> LoggedErrorsOnlySummary(unsigned int iStreamID); // Errors only
56 
57 } // end of namespace edm
58 
59 #endif // MessageLogger_LoggedErrorsSummary_h
bool EnableLoggedErrorsSummary()
bool FreshErrorsExist(unsigned int iStreamID)
bool DisableLoggedErrorsSummary()
std::vector< messagelogger::ErrorSummaryEntry > LoggedErrorsOnlySummary(unsigned int iStreamID)
HLT enums.
std::vector< messagelogger::ErrorSummaryEntry > LoggedErrorsSummary(unsigned int iStreamID)