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 
36 
37 #include <unordered_set>
38 #include <string>
39 
40 namespace edm {
41  namespace service {
42 
43  // ----------------------------------------------------------------------
44  // prerequisite classes:
45  // ----------------------------------------------------------------------
46 
47  class ELadministrator;
48 
49  // ----------------------------------------------------------------------
50  // ELdestination:
51  // ----------------------------------------------------------------------
52 
53  class ELdestination {
54  friend class ELadministrator;
55 
56  public:
57  ELdestination();
58  virtual ~ELdestination();
59 
60  // ----- Methods invoked by the ELadministrator:
61  //
62  public:
63  virtual bool log(const edm::ErrorObj& msg);
64 
65  virtual ELstring getNewline() const;
66 
67  virtual void finish();
68 
69  // ----- Behavior control methods invoked by the framework:
70  //
71  void setThreshold(const ELseverityLevel& sv);
73  void setLimit(const ELstring& s, int n);
74  void setLimit(const ELseverityLevel& sv, int n);
75  void setInterval(const ELstring& s, int interval);
76  void setInterval(const ELseverityLevel& sv, int interval);
77  void setTimespan(const ELstring& s, int n);
78  void setTimespan(const ELseverityLevel& sv, int n);
79 
80  // ----- Select output format options:
81  //
82  virtual void suppressText();
83  virtual void includeText(); // $$ jvr
84  virtual void suppressModule();
85  virtual void includeModule();
86  virtual void suppressSubroutine();
87  virtual void includeSubroutine();
88  virtual void suppressTime();
89  virtual void includeTime();
90  virtual void suppressContext();
91  virtual void includeContext();
92  virtual void suppressSerial();
93  virtual void includeSerial();
94  virtual void useFullContext();
95  virtual void useContext();
96  virtual void separateTime();
97  virtual void attachTime();
98  virtual void separateEpilogue();
99  virtual void attachEpilogue();
100  virtual int setLineLength(int len);
101  virtual int getLineLength() const;
102 
103  virtual void wipe();
104  virtual void zero();
105  virtual void filterModule(ELstring const& moduleName);
106  virtual void excludeModule(ELstring const& moduleName);
107  virtual void ignoreModule(ELstring const& moduleName);
108  virtual void respondToModule(ELstring const& moduleName);
109  virtual bool thisShouldBeIgnored(const ELstring& s) const;
110 
111  virtual void setTableLimit(int n);
112 
113  virtual void changeFile(std::ostream& os);
114  virtual void changeFile(const ELstring& filename);
115  virtual void flush();
116 
117  protected:
126  std::unordered_set<std::string> respondToThese;
128  std::unordered_set<std::string> ignoreThese;
129  // Fix $001 2/13/01 mf
130 #ifndef DEFECT_NO_STATIC_CONST_INIT
131  static const int defaultLineLength = 80;
132 #else
133  static const int defaultLineLength;
134 #endif
135 
136  // ----- Verboten methods:
137  //
138  private:
139  ELdestination(const ELdestination& orig) = delete;
140  ELdestination& operator=(const ELdestination& orig) = delete;
141 
142  }; // ELdestination
143 
145  void operator()(std::ostream* os) const;
146  };
147 
148  } // end of namespace service
149 } // end of namespace edm
150 
151 #endif // FWCore_MessageService_ELdestination_h
edm::service::ELdestination::getNewline
virtual ELstring getNewline() const
Definition: ELdestination.cc:197
service
Definition: service.py:1
edm::service::ELdestination::ignoreModule
virtual void ignoreModule(ELstring const &moduleName)
Definition: ELdestination.cc:122
edm::service::ELdestination::setInterval
void setInterval(const ELstring &s, int interval)
Definition: ELdestination.cc:98
edm::service::ELdestination::suppressContext
virtual void suppressContext()
Definition: ELdestination.cc:182
edm::service::ELdestination::flush
virtual void flush()
Definition: ELdestination.cc:160
edm::service::ELdestination::suppressModule
virtual void suppressModule()
Definition: ELdestination.cc:173
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::service::ELdestination::suppressText
virtual void suppressText()
Definition: ELdestination.cc:170
edm::service::ELdestination
Definition: ELdestination.h:53
edm::service::ELdestination::respondToModule
virtual void respondToModule(ELstring const &moduleName)
Definition: ELdestination.cc:110
ELextendedID.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::ELdestination::respondToThese
std::unordered_set< std::string > respondToThese
Definition: ELdestination.h:126
edm::service::ELdestination::traceThreshold
ELseverityLevel traceThreshold
Definition: ELdestination.h:119
edm::ErrorObj
Definition: ErrorObj.h:44
edm::service::ELdestination::suppressSubroutine
virtual void suppressSubroutine()
Definition: ELdestination.cc:176
edm::service::ELdestination::setThreshold
void setThreshold(const ELseverityLevel &sv)
Definition: ELdestination.cc:90
edm::service::ELdestination::changeFile
virtual void changeFile(std::ostream &os)
Definition: ELdestination.cc:148
ErrorObj.h
edm::service::ELdestination::zero
virtual void zero()
Definition: ELdestination.cc:108
mps_check.msg
tuple msg
Definition: mps_check.py:285
edm::service::ELdestination::lineLength
int lineLength
Definition: ELdestination.h:124
edm::service::ELdestination::filterModule
virtual void filterModule(ELstring const &moduleName)
Definition: ELdestination.cc:134
edm::service::ELdestination::useContext
virtual void useContext()
Definition: ELdestination.cc:189
edm::service::ELdestination::useFullContext
virtual void useFullContext()
Definition: ELdestination.cc:188
edm::service::ELdestination::includeSerial
virtual void includeSerial()
Definition: ELdestination.cc:186
edm::service::ELdestination::newline
ELstring newline
Definition: ELdestination.h:122
edm::service::ELdestination::separateTime
virtual void separateTime()
Definition: ELdestination.cc:191
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::ELstring
std::string ELstring
Definition: ELstring.h:21
edm::service::ELdestination::thisShouldBeIgnored
virtual bool thisShouldBeIgnored(const ELstring &s) const
Definition: ELdestination.cc:211
edm::service::ELdestination::suppressTime
virtual void suppressTime()
Definition: ELdestination.cc:179
edm::service::ELadministrator
Definition: ELadministrator.h:75
edm::service::ELdestination::suppressSerial
virtual void suppressSerial()
Definition: ELdestination.cc:185
edm::service::ELlimitsTable
Definition: ELlimitsTable.h:56
edm::service::ELdestination::includeSubroutine
virtual void includeSubroutine()
Definition: ELdestination.cc:177
edm::service::ELdestination::setTableLimit
virtual void setTableLimit(int n)
Definition: ELdestination.cc:146
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
ELlimitsTable.h
edm::service::ELdestination::respondToMostModules
bool respondToMostModules
Definition: ELdestination.h:127
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
edm::service::ELdestination::setLimit
void setLimit(const ELstring &s, int n)
Definition: ELdestination.cc:94
edm::service::ELdestination::finish
virtual void finish()
Definition: ELdestination.cc:144
edm::service::ELdestination::ELdestination
ELdestination()
Definition: ELdestination.cc:42
edm::service::ELdestination::setLineLength
virtual int setLineLength(int len)
Definition: ELdestination.cc:199
edm::service::ELdestination::ignoreMostModules
bool ignoreMostModules
Definition: ELdestination.h:125
edm::service::ELdestination::setTimespan
void setTimespan(const ELstring &s, int n)
Definition: ELdestination.cc:102
edm::service::ELdestination::includeContext
virtual void includeContext()
Definition: ELdestination.cc:183
edm::service::ELdestination::separateEpilogue
virtual void separateEpilogue()
Definition: ELdestination.cc:194
edm::service::ELdestination::includeTime
virtual void includeTime()
Definition: ELdestination.cc:180
readEcalDQMStatus.interval
interval
Definition: readEcalDQMStatus.py:18
edm::service::close_and_delete
Definition: ELdestination.h:144
edm::service::ELdestination::operator=
ELdestination & operator=(const ELdestination &orig)=delete
edm::service::ELdestination::includeModule
virtual void includeModule()
Definition: ELdestination.cc:174
edm::service::ELdestination::~ELdestination
virtual ~ELdestination()
Definition: ELdestination.cc:60
edm::service::ELdestination::limits
ELlimitsTable limits
Definition: ELdestination.h:120
edm::service::ELdestination::includeText
virtual void includeText()
Definition: ELdestination.cc:171
edm::service::ELdestination::threshold
ELseverityLevel threshold
Definition: ELdestination.h:118
edm::service::ELdestination::attachEpilogue
virtual void attachEpilogue()
Definition: ELdestination.cc:195
edm::ELseverityLevel
Definition: ELseverityLevel.h:96
edm::service::ELdestination::indent
ELstring indent
Definition: ELdestination.h:123
edm::service::ELdestination::defaultLineLength
static const int defaultLineLength
Definition: ELdestination.h:131
edm::service::close_and_delete::operator()
void operator()(std::ostream *os) const
Definition: ELdestination.cc:221
edm::service::ELdestination::wipe
virtual void wipe()
Definition: ELdestination.cc:106
ELstring.h
edm::service::ELdestination::getLineLength
virtual int getLineLength() const
Definition: ELdestination.cc:205
edm::service::ELdestination::preamble
ELstring preamble
Definition: ELdestination.h:121
edm::moduleName
std::string moduleName(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
edm::service::ELdestination::excludeModule
virtual void excludeModule(ELstring const &moduleName)
Definition: ELdestination.cc:139
edm::service::ELdestination::log
virtual bool log(const edm::ErrorObj &msg)
Definition: ELdestination.cc:71
edm::service::ELdestination::setTraceThreshold
void setTraceThreshold(const ELseverityLevel &sv)
Definition: ELdestination.cc:92
edm::service::ELdestination::attachTime
virtual void attachTime()
Definition: ELdestination.cc:192
edm::service::ELdestination::ignoreThese
std::unordered_set< std::string > ignoreThese
Definition: ELdestination.h:128