#include <MsgContext.h>
Public Member Functions | |
void | clearContext () |
MsgContext * | clone () const |
ELstring | context () const |
ELstring | fullContext () const |
void | setContext (const std::string &c) |
ELstring | summaryContext () const |
Private Member Functions | |
std::string | compress (const std::string &c) const |
Private Attributes | |
std::string | context_ |
std::string | summary_context_ |
Definition at line 11 of file MsgContext.h.
void edm::service::MsgContext::clearContext | ( | ) | [inline] |
Definition at line 24 of file MsgContext.h.
References context_, and summary_context_.
{ context_.clear(); summary_context_.clear(); }
MsgContext* edm::service::MsgContext::clone | ( | void | ) | const [inline, virtual] |
Implements edm::service::ELcontextSupplier.
Definition at line 14 of file MsgContext.h.
{ return new MsgContext(*this); }
std::string edm::service::MsgContext::compress | ( | const std::string & | c | ) | const [private] |
Definition at line 20 of file MsgContext.cc.
References trackerHits::c, event(), and DTTTrigCorrFirst::run.
Referenced by setContext().
{ if ( c.substr (0,4) != "Run:" ) return c; std::istringstream is (c); std::string runWord; int run; is >> runWord >> run; if (!is) return c; if (runWord != "Run:") return c; std::string eventWord; int event; is >> eventWord >> event; if (!is) return c; if (eventWord != "Event:") return c; std::ostringstream os; os << run << "/" << event; return os.str(); }
ELstring edm::service::MsgContext::context | ( | ) | const [inline, virtual] |
Implements edm::service::ELcontextSupplier.
Definition at line 15 of file MsgContext.h.
References context_.
Referenced by fullContext().
{ return context_; }
ELstring edm::service::MsgContext::fullContext | ( | ) | const [inline, virtual] |
Implements edm::service::ELcontextSupplier.
Definition at line 17 of file MsgContext.h.
References context().
{ return context(); }
void edm::service::MsgContext::setContext | ( | const std::string & | c | ) | [inline] |
Definition at line 19 of file MsgContext.h.
References trackerHits::c, compress(), context_, and summary_context_.
Referenced by edm::service::MessageLoggerScribe::log().
{ context_ = c; summary_context_ = compress(c); }
ELstring edm::service::MsgContext::summaryContext | ( | ) | const [inline, virtual] |
Implements edm::service::ELcontextSupplier.
Definition at line 16 of file MsgContext.h.
References summary_context_.
{ return summary_context_; }
std::string edm::service::MsgContext::context_ [private] |
Definition at line 27 of file MsgContext.h.
Referenced by clearContext(), context(), and setContext().
std::string edm::service::MsgContext::summary_context_ [private] |
Definition at line 28 of file MsgContext.h.
Referenced by clearContext(), setContext(), and summaryContext().