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  virtual ~ELdestination();
58 
59  // ----- Methods invoked by the ELadministrator:
60  //
61  public:
62  virtual bool log(const edm::ErrorObj& msg);
63 
64  virtual std::string getNewline() const;
65 
66  virtual void finish();
67 
68  // ----- Behavior control methods invoked by the framework:
69  //
70  void setThreshold(const ELseverityLevel& sv);
72  void setLimit(const std::string& s, int n);
73  void setLimit(const ELseverityLevel& sv, int n);
74  void setInterval(const std::string& s, int interval);
75  void setInterval(const ELseverityLevel& sv, int interval);
76  void setTimespan(const std::string& s, int n);
77  void setTimespan(const ELseverityLevel& sv, int n);
78 
79  // ----- Select output format options:
80  //
81  virtual void suppressText();
82  virtual void includeText(); // $$ jvr
83  virtual void suppressModule();
84  virtual void includeModule();
85  virtual void suppressSubroutine();
86  virtual void includeSubroutine();
87  virtual void suppressTime();
88  virtual void includeTime();
89  virtual void suppressContext();
90  virtual void includeContext();
91  virtual void suppressSerial();
92  virtual void includeSerial();
93  virtual void useFullContext();
94  virtual void useContext();
95  virtual void separateTime();
96  virtual void attachTime();
97  virtual void separateEpilogue();
98  virtual void attachEpilogue();
99  virtual int setLineLength(int len);
100  virtual int getLineLength() const;
101 
102  virtual void wipe();
103  virtual void zero();
104  virtual void filterModule(std::string const& moduleName);
105  virtual void excludeModule(std::string const& moduleName);
106  virtual void ignoreModule(std::string const& moduleName);
107  virtual void respondToModule(std::string const& moduleName);
108  virtual bool thisShouldBeIgnored(std::string const& s) const;
109 
110  virtual void setTableLimit(int n);
111 
112  virtual void changeFile(std::ostream& os);
113  virtual void changeFile(const std::string& filename);
114  virtual void flush();
115 
116  protected:
126  std::unordered_set<std::string> respondToThese;
127  std::unordered_set<std::string> ignoreThese;
128  // Fix $001 2/13/01 mf
129 #ifndef DEFECT_NO_STATIC_CONST_INIT
130  static const int defaultLineLength = 80;
131 #else
132  static const int defaultLineLength;
133 #endif
134 
135  // ----- Verboten methods:
136  //
137  private:
138  ELdestination(const ELdestination& orig) = delete;
139  ELdestination& operator=(const ELdestination& orig) = delete;
140 
141  }; // ELdestination
142 
144  void operator()(std::ostream* os) const;
145  };
146 
147  } // end of namespace service
148 } // end of namespace edm
149 
150 #endif // FWCore_MessageService_ELdestination_h
service
Definition: service.py:1
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::setInterval
void setInterval(const std::string &s, int interval)
Definition: ELdestination.cc:98
edm::service::ELdestination::suppressText
virtual void suppressText()
Definition: ELdestination.cc:170
edm::service::ELdestination
Definition: ELdestination.h:52
edm::service::ELdestination::getNewline
virtual std::string getNewline() const
Definition: ELdestination.cc:197
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:118
edm::ErrorObj
Definition: ErrorObj.h:43
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:123
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::separateTime
virtual void separateTime()
Definition: ELdestination.cc:191
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::service::ELdestination::setLimit
void setLimit(const std::string &s, int n)
Definition: ELdestination.cc:94
edm::service::ELdestination::suppressTime
virtual void suppressTime()
Definition: ELdestination.cc:179
edm::service::ELadministrator
Definition: ELadministrator.h:66
edm::service::ELdestination::suppressSerial
virtual void suppressSerial()
Definition: ELdestination.cc:185
edm::service::ELdestination::filterModule
virtual void filterModule(std::string const &moduleName)
Definition: ELdestination.cc:134
edm::service::ELlimitsTable
Definition: ELlimitsTable.h:57
edm::service::ELdestination::ignoreModule
virtual void ignoreModule(std::string const &moduleName)
Definition: ELdestination.cc:122
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:352
ELlimitsTable.h
edm::service::ELdestination::indent
std::string indent
Definition: ELdestination.h:122
edm::service::ELdestination::respondToMostModules
bool respondToMostModules
Definition: ELdestination.h:124
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
edm::service::ELdestination::finish
virtual void finish()
Definition: ELdestination.cc:144
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::service::ELdestination::setTimespan
void setTimespan(const std::string &s, int n)
Definition: ELdestination.cc:102
edm::service::ELdestination::thisShouldBeIgnored
virtual bool thisShouldBeIgnored(std::string const &s) const
Definition: ELdestination.cc:211
edm::service::ELdestination::newline
std::string newline
Definition: ELdestination.h:121
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::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:143
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:119
edm::service::ELdestination::includeText
virtual void includeText()
Definition: ELdestination.cc:171
edm::service::ELdestination::excludeModule
virtual void excludeModule(std::string const &moduleName)
Definition: ELdestination.cc:139
edm::service::ELdestination::threshold
ELseverityLevel threshold
Definition: ELdestination.h:117
edm::service::ELdestination::attachEpilogue
virtual void attachEpilogue()
Definition: ELdestination.cc:195
edm::ELseverityLevel
Definition: ELseverityLevel.h:26
edm::service::ELdestination::defaultLineLength
static const int defaultLineLength
Definition: ELdestination.h:130
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
edm::service::ELdestination::getLineLength
virtual int getLineLength() const
Definition: ELdestination.cc:205
edm::service::ELdestination::preamble
std::string preamble
Definition: ELdestination.h:120
edm::moduleName
std::string moduleName(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
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:127
edm::service::ELdestination::respondToModule
virtual void respondToModule(std::string const &moduleName)
Definition: ELdestination.cc:110