CMS 3D CMS Logo

ELdestination.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELdestination_h
2 #define FWCore_MessageService_ELdestination_h
3 
4 // ----------------------------------------------------------------------
5 //
6 // ELdestination is a virtual class defining the interface to a
7 // destination. Concrete classes derived from this include
8 // ELoutput and ELstatistics. The ELadministrator owns
9 // a list of ELdestination* as well as the objects those
10 // list elements point to.
11 //
12 // 7/5/98 mf Created file.
13 // 6/16/99 jvr Allows suppress/include options on destinations
14 // 7/1/99 mf Forward-declared ELdestControl for strict C++ (thanks cg).
15 // 7/2/99 jvr Added separate/attachTime, Epilogue, and Serial options
16 // 12/20/99 mf Added virtual destructor.
17 // 6/7/00 web Consolidated ELdestination/X; add filterModule()
18 // 6/14/00 web Declare classes before granting friendship.
19 // 10/4/00 mf Add excludeModule
20 // 1/15/01 mf setLineLength()
21 // 2/13/01 mf fix written by pc to accomodate NT problem with
22 // static init { $001$ }. Corresponding fix is in .cc file.
23 // 3/13/01 mf statisticsMap()
24 // 04/04/01 mf add ignoreMOdule and respondToModule
25 // 6/23/03 mf changeFile() and flush()
26 // 1/10/06 mf finish
27 // 6/19/08 mf summaryForJobReport()
28 //
29 // ----------------------------------------------------------------------
30 
32 
35 
36 #include <unordered_set>
37 #include <string>
38 
39 namespace edm {
40  namespace service {
41 
42  // ----------------------------------------------------------------------
43  // prerequisite classes:
44  // ----------------------------------------------------------------------
45 
46  class ELadministrator;
47 
48  // ----------------------------------------------------------------------
49  // ELdestination:
50  // ----------------------------------------------------------------------
51 
52  class ELdestination {
53  friend class ELadministrator;
54 
55  public:
56  ELdestination();
57  ELdestination(const ELdestination& orig) = delete;
58  ELdestination& operator=(const ELdestination& orig) = delete;
59  virtual ~ELdestination();
60 
61  // ----- Methods invoked by the ELadministrator:
62  //
63  public:
64  virtual bool log(const edm::ErrorObj& msg);
65 
66  virtual std::string getNewline() const;
67 
68  virtual void finish();
69 
70  // ----- Behavior control methods invoked by the framework:
71  //
74  void setLimit(const std::string& s, int n);
75  void setLimit(const messagelogger::ELseverityLevel& sv, int n);
76  void setInterval(const std::string& s, int interval);
78  void setTimespan(const std::string& s, int n);
80 
81  // ----- Select output format options:
82  //
83  virtual void suppressText();
84  virtual void includeText(); // $$ jvr
85  virtual void suppressModule();
86  virtual void includeModule();
87  virtual void suppressSubroutine();
88  virtual void includeSubroutine();
89  virtual void suppressTime();
90  virtual void includeTime();
91  virtual void suppressContext();
92  virtual void includeContext();
93  virtual void suppressSerial();
94  virtual void includeSerial();
95  virtual void useFullContext();
96  virtual void useContext();
97  virtual void separateTime();
98  virtual void attachTime();
99  virtual void separateEpilogue();
100  virtual void attachEpilogue();
101  virtual int setLineLength(int len);
102  virtual int getLineLength() const;
103 
104  virtual void wipe();
105  virtual void zero();
106  virtual void filterModule(std::string const& moduleName);
107  virtual void excludeModule(std::string const& moduleName);
108  virtual void ignoreModule(std::string const& moduleName);
109  virtual void respondToModule(std::string const& moduleName);
110  virtual bool thisShouldBeIgnored(std::string const& s) const;
111 
112  virtual void setTableLimit(int n);
113 
114  virtual void changeFile(std::ostream& os);
115  virtual void changeFile(const std::string& filename);
116  virtual void flush();
117 
118  protected:
128  std::unordered_set<std::string> respondToThese;
129  std::unordered_set<std::string> ignoreThese;
130  // Fix $001 2/13/01 mf
131 #ifndef DEFECT_NO_STATIC_CONST_INIT
132  static const int defaultLineLength = 80;
133 #else
134  static const int defaultLineLength;
135 #endif
136 
137  // ----- Verboten methods:
138  //
139  }; // ELdestination
140 
142  void operator()(std::ostream* os) const;
143  };
144 
145  } // end of namespace service
146 } // end of namespace edm
147 
148 #endif // FWCore_MessageService_ELdestination_h
std::unordered_set< std::string > ignoreThese
virtual void includeSubroutine()
void operator()(std::ostream *os) const
virtual int setLineLength(int len)
void setThreshold(const messagelogger::ELseverityLevel &sv)
virtual void filterModule(std::string const &moduleName)
static const int defaultLineLength
virtual void respondToModule(std::string const &moduleName)
virtual void ignoreModule(std::string const &moduleName)
virtual int getLineLength() const
ELdestination & operator=(const ELdestination &orig)=delete
void setInterval(const std::string &s, int interval)
std::unordered_set< std::string > respondToThese
virtual void suppressSubroutine()
virtual void changeFile(std::ostream &os)
tuple msg
Definition: mps_check.py:286
virtual std::string getNewline() const
virtual void excludeModule(std::string const &moduleName)
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
HLT enums.
void setTraceThreshold(const messagelogger::ELseverityLevel &sv)
void setTimespan(const std::string &s, int n)
virtual bool thisShouldBeIgnored(std::string const &s) const
messagelogger::ELseverityLevel traceThreshold
void setLimit(const std::string &s, int n)
virtual bool log(const edm::ErrorObj &msg)
messagelogger::ELseverityLevel threshold
virtual void setTableLimit(int n)