CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | 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 ELstring &filename)
 
 ELdestination ()
 
virtual void excludeModule (ELstring const &moduleName)
 
virtual void filterModule (ELstring const &moduleName)
 
virtual void finish ()
 
virtual void flush ()
 
virtual int getLineLength () const
 
virtual ELstring getNewline () const
 
virtual void ignoreModule (ELstring 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)
 
virtual void respondToModule (ELstring const &moduleName)
 
virtual void separateEpilogue ()
 
virtual void separateTime ()
 
void setInterval (const ELstring &s, int interval)
 
void setInterval (const ELseverityLevel &sv, int interval)
 
void setLimit (const ELstring &s, int n)
 
void setLimit (const ELseverityLevel &sv, int n)
 
virtual int setLineLength (int len)
 
virtual void setTableLimit (int n)
 
void setThreshold (const ELseverityLevel &sv)
 
void setTimespan (const ELstring &s, int n)
 
void setTimespan (const ELseverityLevel &sv, int n)
 
void setTraceThreshold (const ELseverityLevel &sv)
 
virtual void suppressContext ()
 
virtual void suppressModule ()
 
virtual void suppressSerial ()
 
virtual void suppressSubroutine ()
 
virtual void suppressText ()
 
virtual void suppressTime ()
 
virtual bool thisShouldBeIgnored (const ELstring &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
 
ELstring indent
 
ELlimitsTable limits
 
int lineLength
 
ELstring newline
 
ELstring preamble
 
bool respondToMostModules
 
std::unordered_set< std::string > respondToThese
 
ELseverityLevel threshold
 
ELseverityLevel traceThreshold
 

Static Protected Attributes

static const int defaultLineLength = 80
 

Private Member Functions

 ELdestination (const ELdestination &orig)=delete
 
ELdestinationoperator= (const ELdestination &orig)=delete
 

Friends

class ELadministrator
 

Detailed Description

Definition at line 55 of file ELdestination.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file ELdestination.cc.

References MessageLogger_cfi::cerr.

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

Definition at line 64 of file ELdestination.cc.

References MessageLogger_cfi::cerr.

64  {
65 
66  #ifdef ELdestinationCONSTRUCTOR_TRACE
67  std::cerr << "Destructor for ELdestination\n";
68  #endif
69 
70 } // ~ELdestination()
edm::service::ELdestination::ELdestination ( const ELdestination orig)
privatedelete

Member Function Documentation

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

Reimplemented in edm::service::ELoutput.

Definition at line 229 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 226 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 182 of file ELdestination.cc.

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

182  {
184  msg << notELoutputMsg;
185  log( msg );
186 }
static const ELstring noosMsg
ELslProxy< ELwarningGen > const ELwarning
static const ELstring notELoutputMsg
tuple msg
Definition: mps_check.py:277
virtual bool log(const edm::ErrorObj &msg)
void edm::service::ELdestination::changeFile ( const ELstring filename)
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 188 of file ELdestination.cc.

References edm::ELwarning, corrVsCorr::filename, log(), mps_check::msg, and newline.

188  {
190  msg << notELoutputMsg << newline << "file requested is" << filename;
191  log( msg );
192 }
static const ELstring noosMsg
ELslProxy< ELwarningGen > const ELwarning
static const ELstring notELoutputMsg
tuple msg
Definition: mps_check.py:277
virtual bool log(const edm::ErrorObj &msg)
void edm::service::ELdestination::excludeModule ( ELstring const &  moduleName)
virtual

Definition at line 172 of file ELdestination.cc.

References ignoreModule(), and respondToModule().

172  {
173  respondToModule("*");
175 }
virtual void ignoreModule(ELstring const &moduleName)
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
virtual void respondToModule(ELstring const &moduleName)
void edm::service::ELdestination::filterModule ( ELstring const &  moduleName)
virtual

Definition at line 167 of file ELdestination.cc.

References ignoreModule(), and respondToModule().

167  {
168  ignoreModule("*");
170 }
virtual void ignoreModule(ELstring const &moduleName)
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
virtual void respondToModule(ELstring const &moduleName)
void edm::service::ELdestination::finish ( )
virtual

Definition at line 177 of file ELdestination.cc.

Referenced by progressbar.ProgressBar::__next__().

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

Reimplemented in edm::service::ELoutput.

Definition at line 194 of file ELdestination.cc.

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

194  {
196  msg << "cannot flush()";
197  log( msg );
198 }
static const ELstring noosMsg
ELslProxy< ELwarningGen > const ELwarning
tuple msg
Definition: mps_check.py:277
virtual bool log(const edm::ErrorObj &msg)
int edm::service::ELdestination::getLineLength ( ) const
virtual

Definition at line 239 of file ELdestination.cc.

References lineLength.

ELstring edm::service::ELdestination::getNewline ( ) const
virtual

Definition at line 231 of file ELdestination.cc.

References newline.

231 { return newline; }
void edm::service::ELdestination::ignoreModule ( ELstring const &  moduleName)
virtual

Definition at line 155 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

Referenced by excludeModule(), and filterModule().

155  {
156  if (moduleName=="*") {
157  respondToMostModules = false;
158  ignoreMostModules = true;
159  respondToThese.clear();
160  ignoreThese.clear();
161  } else {
162  ignoreThese.insert(moduleName);
163  respondToThese.erase(moduleName);
164  }
165 }
std::unordered_set< std::string > ignoreThese
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
std::unordered_set< std::string > respondToThese
void edm::service::ELdestination::includeContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 217 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 208 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 220 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 211 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 205 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 214 of file ELdestination.cc.

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

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

Definition at line 77 of file ELdestination.cc.

Referenced by changeFile(), and flush().

77 { return false; }
ELdestination& edm::service::ELdestination::operator= ( const ELdestination orig)
privatedelete
void edm::service::ELdestination::respondToModule ( ELstring const &  moduleName)
virtual

Definition at line 143 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

Referenced by excludeModule(), and filterModule().

143  {
144  if (moduleName=="*") {
145  ignoreMostModules = false;
146  respondToMostModules = true;
147  ignoreThese.clear();
148  respondToThese.clear();
149  } else {
150  respondToThese.insert(moduleName);
151  ignoreThese.erase(moduleName);
152  }
153 }
std::unordered_set< std::string > ignoreThese
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
std::unordered_set< std::string > respondToThese
void edm::service::ELdestination::separateEpilogue ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 228 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 225 of file ELdestination.cc.

225 { ; }
void edm::service::ELdestination::setInterval ( const ELstring s,
int  interval 
)

Definition at line 118 of file ELdestination.cc.

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

Referenced by setLimit().

118  {
119  limits.setInterval( s, interval );
120 }
void setInterval(const ELstring &id, int interval)
void edm::service::ELdestination::setInterval ( const ELseverityLevel sv,
int  interval 
)

Definition at line 114 of file ELdestination.cc.

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

114  {
115  limits.setInterval( sv, interval );
116 }
void setInterval(const ELstring &id, int interval)
void edm::service::ELdestination::setLimit ( const ELstring s,
int  n 
)

Definition at line 108 of file ELdestination.cc.

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

108  {
109  limits.setLimit( s, n );
110 }
void setLimit(const ELstring &id, int n)
void edm::service::ELdestination::setLimit ( const ELseverityLevel sv,
int  n 
)

Definition at line 123 of file ELdestination.cc.

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

123  {
124  limits.setLimit( sv, n );
125 }
void setLimit(const ELstring &id, int n)
int edm::service::ELdestination::setLineLength ( int  len)
virtual

Definition at line 233 of file ELdestination.cc.

References lineLength, and groupFilesInBlocks::temp.

233  {
234  int temp=lineLength;
235  lineLength = len;
236  return temp;
237 }
void edm::service::ELdestination::setTableLimit ( int  n)
virtual
void edm::service::ELdestination::setThreshold ( const ELseverityLevel sv)

Definition at line 98 of file ELdestination.cc.

References threshold.

98  {
99  threshold = sv;
100 }
void edm::service::ELdestination::setTimespan ( const ELstring s,
int  n 
)

Definition at line 128 of file ELdestination.cc.

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

128  {
129  limits.setTimespan( s, n );
130 }
void setTimespan(const ELstring &id, int n)
void edm::service::ELdestination::setTimespan ( const ELseverityLevel sv,
int  n 
)

Definition at line 133 of file ELdestination.cc.

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

133  {
134  limits.setTimespan( sv, n );
135 }
void setTimespan(const ELstring &id, int n)
void edm::service::ELdestination::setTraceThreshold ( const ELseverityLevel sv)

Definition at line 103 of file ELdestination.cc.

References traceThreshold.

103  {
104  traceThreshold = sv;
105 }
ELseverityLevel traceThreshold
void edm::service::ELdestination::suppressContext ( )
virtual

Reimplemented in edm::service::ELoutput.

Definition at line 216 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 207 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 219 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 210 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 204 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 213 of file ELdestination.cc.

213 { ; }
bool edm::service::ELdestination::thisShouldBeIgnored ( const ELstring s) const
virtual

Definition at line 246 of file ELdestination.cc.

References ignoreMostModules, ignoreThese, respondToMostModules, and respondToThese.

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

246  {
247  if (respondToMostModules) {
248  return ( ignoreThese.find(s) != ignoreThese.end() );
249  } else if (ignoreMostModules) {
250  return ( respondToThese.find(s) == respondToThese.end() );
251  } else {
252  return false;
253  }
254 }
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 223 of file ELdestination.cc.

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

Reimplemented in edm::service::ELoutput.

Definition at line 222 of file ELdestination.cc.

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

Reimplemented in edm::service::ELstatistics.

Definition at line 138 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 141 of file ELdestination.cc.

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

Friends And Related Function Documentation

friend class ELadministrator
friend

Definition at line 57 of file ELdestination.h.

Member Data Documentation

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

Definition at line 126 of file ELdestination.h.

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