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
service
Definition: service.py:1
edm::service::ELdestination::suppressContext
virtual void suppressContext()
Definition: ELdestination.cc:183
edm::service::ELdestination::flush
virtual void flush()
Definition: ELdestination.cc:161
edm::service::ELdestination::suppressModule
virtual void suppressModule()
Definition: ELdestination.cc:174
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::service::ELdestination::setInterval
void setInterval(const std::string &s, int interval)
Definition: ELdestination.cc:99
edm::service::ELdestination::suppressText
virtual void suppressText()
Definition: ELdestination.cc:171
edm::service::ELdestination
Definition: ELdestination.h:52
edm::service::ELdestination::getNewline
virtual std::string getNewline() const
Definition: ELdestination.cc:198
ELextendedID.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::ELdestination::respondToThese
std::unordered_set< std::string > respondToThese
Definition: ELdestination.h:128
edm::ErrorObj
Definition: ErrorObj.h:43
edm::service::ELdestination::suppressSubroutine
virtual void suppressSubroutine()
Definition: ELdestination.cc:177
edm::moduleName
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
edm::service::ELdestination::threshold
messagelogger::ELseverityLevel threshold
Definition: ELdestination.h:119
edm::service::ELdestination::changeFile
virtual void changeFile(std::ostream &os)
Definition: ELdestination.cc:149
ErrorObj.h
edm::service::ELdestination::zero
virtual void zero()
Definition: ELdestination.cc:109
mps_check.msg
tuple msg
Definition: mps_check.py:285
edm::service::ELdestination::lineLength
int lineLength
Definition: ELdestination.h:125
edm::service::ELdestination::useContext
virtual void useContext()
Definition: ELdestination.cc:190
edm::service::ELdestination::useFullContext
virtual void useFullContext()
Definition: ELdestination.cc:189
edm::service::ELdestination::includeSerial
virtual void includeSerial()
Definition: ELdestination.cc:187
edm::service::ELdestination::setTraceThreshold
void setTraceThreshold(const messagelogger::ELseverityLevel &sv)
Definition: ELdestination.cc:93
edm::service::ELdestination::separateTime
virtual void separateTime()
Definition: ELdestination.cc:192
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::service::ELdestination::setLimit
void setLimit(const std::string &s, int n)
Definition: ELdestination.cc:95
edm::service::ELdestination::suppressTime
virtual void suppressTime()
Definition: ELdestination.cc:180
edm::service::ELadministrator
Definition: ELadministrator.h:66
edm::service::ELdestination::suppressSerial
virtual void suppressSerial()
Definition: ELdestination.cc:186
edm::service::ELdestination::filterModule
virtual void filterModule(std::string const &moduleName)
Definition: ELdestination.cc:135
edm::service::ELlimitsTable
Definition: ELlimitsTable.h:57
edm::service::ELdestination::ignoreModule
virtual void ignoreModule(std::string const &moduleName)
Definition: ELdestination.cc:123
edm::service::ELdestination::includeSubroutine
virtual void includeSubroutine()
Definition: ELdestination.cc:178
edm::service::ELdestination::setTableLimit
virtual void setTableLimit(int n)
Definition: ELdestination.cc:147
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
ELlimitsTable.h
edm::service::ELdestination::indent
std::string indent
Definition: ELdestination.h:124
edm::service::ELdestination::respondToMostModules
bool respondToMostModules
Definition: ELdestination.h:126
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
edm::service::ELdestination::finish
virtual void finish()
Definition: ELdestination.cc:145
edm::service::ELdestination::setTimespan
void setTimespan(const std::string &s, int n)
Definition: ELdestination.cc:103
edm::service::ELdestination::thisShouldBeIgnored
virtual bool thisShouldBeIgnored(std::string const &s) const
Definition: ELdestination.cc:212
edm::service::ELdestination::newline
std::string newline
Definition: ELdestination.h:123
edm::service::ELdestination::ELdestination
ELdestination()
Definition: ELdestination.cc:43
edm::service::ELdestination::setLineLength
virtual int setLineLength(int len)
Definition: ELdestination.cc:200
edm::service::ELdestination::ignoreMostModules
bool ignoreMostModules
Definition: ELdestination.h:127
edm::service::ELdestination::includeContext
virtual void includeContext()
Definition: ELdestination.cc:184
edm::service::ELdestination::separateEpilogue
virtual void separateEpilogue()
Definition: ELdestination.cc:195
edm::service::ELdestination::includeTime
virtual void includeTime()
Definition: ELdestination.cc:181
readEcalDQMStatus.interval
interval
Definition: readEcalDQMStatus.py:18
edm::service::close_and_delete
Definition: ELdestination.h:141
edm::service::ELdestination::operator=
ELdestination & operator=(const ELdestination &orig)=delete
edm::service::ELdestination::includeModule
virtual void includeModule()
Definition: ELdestination.cc:175
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::service::ELdestination::~ELdestination
virtual ~ELdestination()
Definition: ELdestination.cc:61
edm::service::ELdestination::limits
ELlimitsTable limits
Definition: ELdestination.h:121
edm::service::ELdestination::includeText
virtual void includeText()
Definition: ELdestination.cc:172
edm::service::ELdestination::excludeModule
virtual void excludeModule(std::string const &moduleName)
Definition: ELdestination.cc:140
edm::service::ELdestination::attachEpilogue
virtual void attachEpilogue()
Definition: ELdestination.cc:196
edm::service::ELdestination::traceThreshold
messagelogger::ELseverityLevel traceThreshold
Definition: ELdestination.h:120
edm::service::ELdestination::defaultLineLength
static const int defaultLineLength
Definition: ELdestination.h:132
edm::service::close_and_delete::operator()
void operator()(std::ostream *os) const
Definition: ELdestination.cc:222
edm::service::ELdestination::wipe
virtual void wipe()
Definition: ELdestination.cc:107
edm::messagelogger::ELseverityLevel
Definition: ELseverityLevel.h:26
edm::service::ELdestination::getLineLength
virtual int getLineLength() const
Definition: ELdestination.cc:206
edm::service::ELdestination::preamble
std::string preamble
Definition: ELdestination.h:122
edm::service::ELdestination::setThreshold
void setThreshold(const messagelogger::ELseverityLevel &sv)
Definition: ELdestination.cc:91
edm::service::ELdestination::log
virtual bool log(const edm::ErrorObj &msg)
Definition: ELdestination.cc:72
edm::service::ELdestination::attachTime
virtual void attachTime()
Definition: ELdestination.cc:193
edm::service::ELdestination::ignoreThese
std::unordered_set< std::string > ignoreThese
Definition: ELdestination.h:129
edm::service::ELdestination::respondToModule
virtual void respondToModule(std::string const &moduleName)
Definition: ELdestination.cc:111