CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Static Protected Attributes | Friends
edm::service::ELdestination Class Reference

#include <ELdestination.h>

Inheritance diagram for edm::service::ELdestination:
edm::service::ELoutput edm::service::ELstatistics

Public Member Functions

virtual void attachEpilogue ()
 
virtual void attachTime ()
 
virtual void changeFile (std::ostream &os)
 
virtual void changeFile (const std::string &filename)
 
 ELdestination ()
 
 ELdestination (const ELdestination &orig)=delete
 
virtual void excludeModule (std::string const &moduleName)
 
virtual void filterModule (std::string const &moduleName)
 
virtual void finish ()
 
virtual void flush ()
 
virtual int getLineLength () const
 
virtual std::string getNewline () const
 
virtual void ignoreModule (std::string const &moduleName)
 
virtual void includeContext ()
 
virtual void includeModule ()
 
virtual void includeSerial ()
 
virtual void includeSubroutine ()
 
virtual void includeText ()
 
virtual void includeTime ()
 
virtual bool log (const edm::ErrorObj &msg)
 
ELdestinationoperator= (const ELdestination &orig)=delete
 
virtual void respondToModule (std::string const &moduleName)
 
virtual void separateEpilogue ()
 
virtual void separateTime ()
 
void setInterval (const std::string &s, int interval)
 
void setInterval (const messagelogger::ELseverityLevel &sv, int interval)
 
void setLimit (const std::string &s, int n)
 
void setLimit (const messagelogger::ELseverityLevel &sv, int n)
 
virtual int setLineLength (int len)
 
virtual void setTableLimit (int n)
 
void setThreshold (const messagelogger::ELseverityLevel &sv)
 
void setTimespan (const std::string &s, int n)
 
void setTimespan (const messagelogger::ELseverityLevel &sv, int n)
 
void setTraceThreshold (const messagelogger::ELseverityLevel &sv)
 
virtual void suppressContext ()
 
virtual void suppressModule ()
 
virtual void suppressSerial ()
 
virtual void suppressSubroutine ()
 
virtual void suppressText ()
 
virtual void suppressTime ()
 
virtual bool thisShouldBeIgnored (std::string const &s) const
 
virtual void useContext ()
 
virtual void useFullContext ()
 
virtual void wipe ()
 
virtual void zero ()
 
virtual ~ELdestination ()
 

Protected Attributes

bool ignoreMostModules
 
std::unordered_set< std::string > ignoreThese
 
std::string indent
 
ELlimitsTable limits
 
int lineLength
 
std::string newline
 
std::string preamble
 
bool respondToMostModules
 
std::unordered_set< std::string > respondToThese
 
messagelogger::ELseverityLevel threshold
 
messagelogger::ELseverityLevel traceThreshold
 

Static Protected Attributes

static const int defaultLineLength = 80
 

Friends

class ELadministrator
 

Detailed Description

Definition at line 52 of file ELdestination.h.

Constructor & Destructor Documentation

edm::service::ELdestination::ELdestination ( )

Definition at line 43 of file ELdestination.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr.

46  limits(),
47  preamble("%MSG"),
48  newline("\n"),
49  indent(" "),
51  respondToMostModules(false),
52  ignoreMostModules(false),
54  ignoreThese() {
55 #ifdef ELdestinationCONSTRUCTOR_TRACE
56  std::cerr << "Constructor for ELdestination\n";
57 #endif
58 
59  } // ELdestination()
std::unordered_set< std::string > ignoreThese
static const int defaultLineLength
constexpr const ELseverityLevel ELhighestSeverity
std::unordered_set< std::string > respondToThese
constexpr const ELseverityLevel ELzeroSeverity
messagelogger::ELseverityLevel traceThreshold
messagelogger::ELseverityLevel threshold
edm::service::ELdestination::ELdestination ( const ELdestination orig)
delete
edm::service::ELdestination::~ELdestination ( )
virtual

Definition at line 61 of file ELdestination.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr.

61  {
62 #ifdef ELdestinationCONSTRUCTOR_TRACE
63  std::cerr << "Destructor for ELdestination\n";
64 #endif
65 
66  } // ~ELdestination()

Member Function Documentation

void edm::service::ELdestination::attachEpilogue ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 196 of file ELdestination.cc.

196 { ; }
void edm::service::ELdestination::attachTime ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 193 of file ELdestination.cc.

193 { ; }
void edm::service::ELdestination::changeFile ( std::ostream &  os)
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 149 of file ELdestination.cc.

References edm::ELwarning, log(), mps_check::msg, edm::service::noosMsg, and edm::service::notELoutputMsg.

149  {
151  msg << notELoutputMsg;
152  log(msg);
153  }
constexpr const ELseverityLevel ELwarning
tuple msg
Definition: mps_check.py:285
static const std::string noosMsg
virtual bool log(const edm::ErrorObj &msg)
static const std::string notELoutputMsg
void edm::service::ELdestination::changeFile ( const std::string &  filename)
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 155 of file ELdestination.cc.

References edm::ELwarning, lut2db_cfg::filename, log(), mps_check::msg, newline, edm::service::noosMsg, and edm::service::notELoutputMsg.

155  {
157  msg << notELoutputMsg << newline << "file requested is" << filename;
158  log(msg);
159  }
constexpr const ELseverityLevel ELwarning
tuple msg
Definition: mps_check.py:285
static const std::string noosMsg
tuple filename
Definition: lut2db_cfg.py:20
virtual bool log(const edm::ErrorObj &msg)
static const std::string notELoutputMsg
void edm::service::ELdestination::excludeModule ( std::string const &  moduleName)
virtual

Definition at line 140 of file ELdestination.cc.

References ignoreModule(), and respondToModule().

140  {
141  respondToModule("*");
143  }
virtual void respondToModule(std::string const &moduleName)
virtual void ignoreModule(std::string const &moduleName)
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
void edm::service::ELdestination::filterModule ( std::string const &  moduleName)
virtual

Definition at line 135 of file ELdestination.cc.

References ignoreModule(), and respondToModule().

135  {
136  ignoreModule("*");
138  }
virtual void respondToModule(std::string const &moduleName)
virtual void ignoreModule(std::string const &moduleName)
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
void edm::service::ELdestination::finish ( )
virtual

Definition at line 145 of file ELdestination.cc.

Referenced by progressbar.ProgressBar::__next__().

145 {}
void edm::service::ELdestination::flush ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 161 of file ELdestination.cc.

References edm::ELwarning, log(), mps_check::msg, and edm::service::noosMsg.

161  {
163  msg << "cannot flush()";
164  log(msg);
165  }
constexpr const ELseverityLevel ELwarning
tuple msg
Definition: mps_check.py:285
static const std::string noosMsg
virtual bool log(const edm::ErrorObj &msg)
int edm::service::ELdestination::getLineLength ( ) const
virtual

Definition at line 206 of file ELdestination.cc.

References lineLength.

206 { return lineLength; }
std::string edm::service::ELdestination::getNewline ( ) const
virtual

Definition at line 198 of file ELdestination.cc.

References newline.

198 { return newline; }
void edm::service::ELdestination::ignoreModule ( std::string const &  moduleName)
virtual

Definition at line 123 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

Referenced by excludeModule(), and filterModule().

123  {
124  if (moduleName == "*") {
125  respondToMostModules = false;
126  ignoreMostModules = true;
127  respondToThese.clear();
128  ignoreThese.clear();
129  } else {
130  ignoreThese.insert(moduleName);
131  respondToThese.erase(moduleName);
132  }
133  }
std::unordered_set< std::string > ignoreThese
std::unordered_set< std::string > respondToThese
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
void edm::service::ELdestination::includeContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 184 of file ELdestination.cc.

184 { ; }
void edm::service::ELdestination::includeModule ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 175 of file ELdestination.cc.

175 { ; }
void edm::service::ELdestination::includeSerial ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 187 of file ELdestination.cc.

187 { ; }
void edm::service::ELdestination::includeSubroutine ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 178 of file ELdestination.cc.

178 { ; }
void edm::service::ELdestination::includeText ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 172 of file ELdestination.cc.

172 { ; }
void edm::service::ELdestination::includeTime ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 181 of file ELdestination.cc.

181 { ; }
bool edm::service::ELdestination::log ( const edm::ErrorObj msg)
virtual

Reimplemented in edm::service::ELstatistics, and edm::service::ELoutput.

Definition at line 72 of file ELdestination.cc.

Referenced by changeFile(), and flush().

72 { return false; }
ELdestination& edm::service::ELdestination::operator= ( const ELdestination orig)
delete
void edm::service::ELdestination::respondToModule ( std::string const &  moduleName)
virtual

Definition at line 111 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

Referenced by excludeModule(), and filterModule().

111  {
112  if (moduleName == "*") {
113  ignoreMostModules = false;
114  respondToMostModules = true;
115  ignoreThese.clear();
116  respondToThese.clear();
117  } else {
118  respondToThese.insert(moduleName);
119  ignoreThese.erase(moduleName);
120  }
121  }
std::unordered_set< std::string > ignoreThese
std::unordered_set< std::string > respondToThese
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
void edm::service::ELdestination::separateEpilogue ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 195 of file ELdestination.cc.

195 { ; }
void edm::service::ELdestination::separateTime ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 192 of file ELdestination.cc.

192 { ; }
void edm::service::ELdestination::setInterval ( const std::string &  s,
int  interval 
)

Definition at line 99 of file ELdestination.cc.

References limits, and edm::service::ELlimitsTable::setInterval().

tuple interval
Definition: MergeJob_cfg.py:20
void setInterval(const std::string &id, int interval)
void edm::service::ELdestination::setInterval ( const messagelogger::ELseverityLevel sv,
int  interval 
)
void edm::service::ELdestination::setLimit ( const std::string &  s,
int  n 
)

Definition at line 95 of file ELdestination.cc.

References limits, and edm::service::ELlimitsTable::setLimit().

95 { limits.setLimit(s, n); }
void setLimit(const std::string &id, int n)
void edm::service::ELdestination::setLimit ( const messagelogger::ELseverityLevel sv,
int  n 
)
int edm::service::ELdestination::setLineLength ( int  len)
virtual

Definition at line 200 of file ELdestination.cc.

References lineLength, and groupFilesInBlocks::temp.

200  {
201  int temp = lineLength;
202  lineLength = len;
203  return temp;
204  }
void edm::service::ELdestination::setTableLimit ( int  n)
virtual
void edm::service::ELdestination::setThreshold ( const messagelogger::ELseverityLevel sv)

Definition at line 91 of file ELdestination.cc.

References threshold.

91 { threshold = sv; }
messagelogger::ELseverityLevel threshold
void edm::service::ELdestination::setTimespan ( const std::string &  s,
int  n 
)

Definition at line 103 of file ELdestination.cc.

References limits, and edm::service::ELlimitsTable::setTimespan().

103 { limits.setTimespan(s, n); }
void setTimespan(const std::string &id, int n)
void edm::service::ELdestination::setTimespan ( const messagelogger::ELseverityLevel sv,
int  n 
)
void edm::service::ELdestination::setTraceThreshold ( const messagelogger::ELseverityLevel sv)

Definition at line 93 of file ELdestination.cc.

References traceThreshold.

93 { traceThreshold = sv; }
messagelogger::ELseverityLevel traceThreshold
void edm::service::ELdestination::suppressContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 183 of file ELdestination.cc.

183 { ; }
void edm::service::ELdestination::suppressModule ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 174 of file ELdestination.cc.

174 { ; }
void edm::service::ELdestination::suppressSerial ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 186 of file ELdestination.cc.

186 { ; }
void edm::service::ELdestination::suppressSubroutine ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 177 of file ELdestination.cc.

177 { ; }
void edm::service::ELdestination::suppressText ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 171 of file ELdestination.cc.

171 { ; } // $$ jvr
void edm::service::ELdestination::suppressTime ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 180 of file ELdestination.cc.

180 { ; }
bool edm::service::ELdestination::thisShouldBeIgnored ( std::string const &  s) const
virtual

Definition at line 212 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

Referenced by edm::service::ELoutput::log(), and edm::service::ELstatistics::log().

212  {
213  if (respondToMostModules) {
214  return (ignoreThese.find(s) != ignoreThese.end());
215  } else if (ignoreMostModules) {
216  return (respondToThese.find(s) == respondToThese.end());
217  } else {
218  return false;
219  }
220  }
std::unordered_set< std::string > ignoreThese
std::unordered_set< std::string > respondToThese
void edm::service::ELdestination::useContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 190 of file ELdestination.cc.

190 { ; }
void edm::service::ELdestination::useFullContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 189 of file ELdestination.cc.

189 { ; }
void edm::service::ELdestination::wipe ( )
virtual

Reimplemented in edm::service::ELstatistics.

Definition at line 107 of file ELdestination.cc.

References limits, and edm::service::ELlimitsTable::wipe().

void edm::service::ELdestination::zero ( )
virtual

Reimplemented in edm::service::ELstatistics.

Definition at line 109 of file ELdestination.cc.

References limits, and edm::service::ELlimitsTable::zero().

Friends And Related Function Documentation

friend class ELadministrator
friend

Definition at line 53 of file ELdestination.h.

Member Data Documentation

const int edm::service::ELdestination::defaultLineLength = 80
staticprotected

Definition at line 132 of file ELdestination.h.

bool edm::service::ELdestination::ignoreMostModules
protected
std::unordered_set<std::string> edm::service::ELdestination::ignoreThese
protected
std::string edm::service::ELdestination::indent
protected
ELlimitsTable edm::service::ELdestination::limits
protected
int edm::service::ELdestination::lineLength
protected
std::string edm::service::ELdestination::newline
protected
std::string edm::service::ELdestination::preamble
protected
bool edm::service::ELdestination::respondToMostModules
protected
std::unordered_set<std::string> edm::service::ELdestination::respondToThese
protected
messagelogger::ELseverityLevel edm::service::ELdestination::threshold
protected
messagelogger::ELseverityLevel edm::service::ELdestination::traceThreshold
protected