CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::service::MsgContext Class Reference

#include <MsgContext.h>

Inheritance diagram for edm::service::MsgContext:
edm::service::ELcontextSupplier

List of all members.

Public Member Functions

void clearContext ()
MsgContextclone () 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_

Detailed Description

Definition at line 11 of file MsgContext.h.


Member Function Documentation

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

Member Data Documentation

std::string edm::service::MsgContext::context_ [private]

Definition at line 27 of file MsgContext.h.

Referenced by clearContext(), context(), and setContext().

Definition at line 28 of file MsgContext.h.

Referenced by clearContext(), setContext(), and summaryContext().