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