CMS 3D CMS Logo

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

◆ ELdestination() [1/2]

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

Definition at line 43 of file ELdestination.cc.

References DMR_cfg::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

◆ ELdestination() [2/2]

edm::service::ELdestination::ELdestination ( const ELdestination orig)
delete

◆ ~ELdestination()

edm::service::ELdestination::~ELdestination ( )
virtual

Definition at line 61 of file ELdestination.cc.

References DMR_cfg::cerr.

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

Member Function Documentation

◆ attachEpilogue()

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

Reimplemented in edm::service::ELoutput.

Definition at line 196 of file ELdestination.cc.

196 { ; }

◆ attachTime()

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

Reimplemented in edm::service::ELoutput.

Definition at line 193 of file ELdestination.cc.

193 { ; }

◆ changeFile() [1/2]

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:286
static const std::string noosMsg
virtual bool log(const edm::ErrorObj &msg)
static const std::string notELoutputMsg

◆ changeFile() [2/2]

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, corrVsCorr::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:286
static const std::string noosMsg
virtual bool log(const edm::ErrorObj &msg)
static const std::string notELoutputMsg

◆ excludeModule()

void edm::service::ELdestination::excludeModule ( std::string const &  moduleName)
virtual

Definition at line 140 of file ELdestination.cc.

References ignoreModule(), edm::moduleName(), 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

◆ filterModule()

void edm::service::ELdestination::filterModule ( std::string const &  moduleName)
virtual

Definition at line 135 of file ELdestination.cc.

References ignoreModule(), edm::moduleName(), 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

◆ finish()

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

Definition at line 145 of file ELdestination.cc.

Referenced by progressbar.ProgressBar::__next__().

145 {}

◆ flush()

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:286
static const std::string noosMsg
virtual bool log(const edm::ErrorObj &msg)

◆ getLineLength()

int edm::service::ELdestination::getLineLength ( ) const
virtual

Definition at line 206 of file ELdestination.cc.

References lineLength.

◆ getNewline()

std::string edm::service::ELdestination::getNewline ( ) const
virtual

Definition at line 198 of file ELdestination.cc.

References newline.

198 { return newline; }

◆ ignoreModule()

void edm::service::ELdestination::ignoreModule ( std::string const &  moduleName)
virtual

Definition at line 123 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, edm::moduleName(), 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

◆ includeContext()

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

Reimplemented in edm::service::ELoutput.

Definition at line 184 of file ELdestination.cc.

184 { ; }

◆ includeModule()

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

Reimplemented in edm::service::ELoutput.

Definition at line 175 of file ELdestination.cc.

175 { ; }

◆ includeSerial()

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

Reimplemented in edm::service::ELoutput.

Definition at line 187 of file ELdestination.cc.

187 { ; }

◆ includeSubroutine()

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

Reimplemented in edm::service::ELoutput.

Definition at line 178 of file ELdestination.cc.

178 { ; }

◆ includeText()

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

Reimplemented in edm::service::ELoutput.

Definition at line 172 of file ELdestination.cc.

172 { ; }

◆ includeTime()

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

Reimplemented in edm::service::ELoutput.

Definition at line 181 of file ELdestination.cc.

181 { ; }

◆ log()

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; }

◆ operator=()

ELdestination& edm::service::ELdestination::operator= ( const ELdestination orig)
delete

◆ respondToModule()

void edm::service::ELdestination::respondToModule ( std::string const &  moduleName)
virtual

Definition at line 111 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, edm::moduleName(), 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

◆ separateEpilogue()

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

Reimplemented in edm::service::ELoutput.

Definition at line 195 of file ELdestination.cc.

195 { ; }

◆ separateTime()

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

Reimplemented in edm::service::ELoutput.

Definition at line 192 of file ELdestination.cc.

192 { ; }

◆ setInterval() [1/2]

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

◆ setInterval() [2/2]

void edm::service::ELdestination::setInterval ( const messagelogger::ELseverityLevel sv,
int  interval 
)

◆ setLimit() [1/2]

void edm::service::ELdestination::setLimit ( const std::string &  s,
int  n 
)

◆ setLimit() [2/2]

void edm::service::ELdestination::setLimit ( const messagelogger::ELseverityLevel sv,
int  n 
)

◆ setLineLength()

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  }

◆ setTableLimit()

void edm::service::ELdestination::setTableLimit ( int  n)
virtual

◆ setThreshold()

void edm::service::ELdestination::setThreshold ( const messagelogger::ELseverityLevel sv)

◆ setTimespan() [1/2]

void edm::service::ELdestination::setTimespan ( const std::string &  s,
int  n 
)

◆ setTimespan() [2/2]

void edm::service::ELdestination::setTimespan ( const messagelogger::ELseverityLevel sv,
int  n 
)

◆ setTraceThreshold()

void edm::service::ELdestination::setTraceThreshold ( const messagelogger::ELseverityLevel sv)

◆ suppressContext()

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

Reimplemented in edm::service::ELoutput.

Definition at line 183 of file ELdestination.cc.

183 { ; }

◆ suppressModule()

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

Reimplemented in edm::service::ELoutput.

Definition at line 174 of file ELdestination.cc.

174 { ; }

◆ suppressSerial()

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

Reimplemented in edm::service::ELoutput.

Definition at line 186 of file ELdestination.cc.

186 { ; }

◆ suppressSubroutine()

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

Reimplemented in edm::service::ELoutput.

Definition at line 177 of file ELdestination.cc.

177 { ; }

◆ suppressText()

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

Reimplemented in edm::service::ELoutput.

Definition at line 171 of file ELdestination.cc.

171 { ; } // $$ jvr

◆ suppressTime()

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

Reimplemented in edm::service::ELoutput.

Definition at line 180 of file ELdestination.cc.

180 { ; }

◆ thisShouldBeIgnored()

bool edm::service::ELdestination::thisShouldBeIgnored ( std::string const &  s) const
virtual

Definition at line 212 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, respondToThese, and alignCSCRings::s.

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

◆ useContext()

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

Reimplemented in edm::service::ELoutput.

Definition at line 190 of file ELdestination.cc.

190 { ; }

◆ useFullContext()

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

Reimplemented in edm::service::ELoutput.

Definition at line 189 of file ELdestination.cc.

189 { ; }

◆ wipe()

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().

◆ zero()

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

◆ ELadministrator

friend class ELadministrator
friend

Definition at line 53 of file ELdestination.h.

Member Data Documentation

◆ defaultLineLength

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

Definition at line 132 of file ELdestination.h.

◆ ignoreMostModules

bool edm::service::ELdestination::ignoreMostModules
protected

◆ ignoreThese

std::unordered_set<std::string> edm::service::ELdestination::ignoreThese
protected

◆ indent

std::string edm::service::ELdestination::indent
protected

◆ limits

ELlimitsTable edm::service::ELdestination::limits
protected

◆ lineLength

int edm::service::ELdestination::lineLength
protected

◆ newline

std::string edm::service::ELdestination::newline
protected

◆ preamble

std::string edm::service::ELdestination::preamble
protected

◆ respondToMostModules

bool edm::service::ELdestination::respondToMostModules
protected

◆ respondToThese

std::unordered_set<std::string> edm::service::ELdestination::respondToThese
protected

◆ threshold

messagelogger::ELseverityLevel edm::service::ELdestination::threshold
protected

◆ traceThreshold

messagelogger::ELseverityLevel edm::service::ELdestination::traceThreshold
protected