CMS 3D CMS Logo

Public Member Functions | Private Attributes

cond::IOVElement Class Reference

#include <IOVElement.h>

List of all members.

Public Member Functions

 IOVElement ()
 IOVElement (cond::Time_t it)
 IOVElement (cond::Time_t it, std::string const &itoken)
bool operator== (IOVElement const &rh) const
cond::Time_t sinceTime () const
void swapOId (ora::ITokenWriter &writer) const
void swapToken (ora::ITokenParser &parser) const
std::string token () const

Private Attributes

ora::OId m_oid
cond::Time_t m_sinceTime
std::string m_wrapper

Detailed Description

Element of an IOV Sequence include the since time, token to the wrapper

Definition at line 12 of file IOVElement.h.


Constructor & Destructor Documentation

cond::IOVElement::IOVElement ( ) [inline]

Definition at line 14 of file IOVElement.h.

                :
      m_sinceTime(0),
      m_wrapper(""),
      m_oid(){}
cond::IOVElement::IOVElement ( cond::Time_t  it) [inline, explicit]

Definition at line 19 of file IOVElement.h.

                                       : 
      m_sinceTime(it),
      m_wrapper(""),
      m_oid(){}
cond::IOVElement::IOVElement ( cond::Time_t  it,
std::string const &  itoken 
) [inline]

Definition at line 24 of file IOVElement.h.

References ora::OId::fromString(), and m_oid.

                                       :
      m_sinceTime(it),
      m_wrapper(""),
      m_oid(){
      m_oid.fromString( itoken );
    }

Member Function Documentation

bool cond::IOVElement::operator== ( IOVElement const &  rh) const [inline]

Definition at line 38 of file IOVElement.h.

References sinceTime(), and token().

                                                 {
      return sinceTime()==rh.sinceTime()
        &&  token()==rh.token();
    }
cond::Time_t cond::IOVElement::sinceTime ( ) const [inline]

Definition at line 32 of file IOVElement.h.

References m_sinceTime.

Referenced by cond::IOVSequence::find(), operator==(), and cond::IOVSequence::sortMe().

{return m_sinceTime;}
void cond::IOVElement::swapOId ( ora::ITokenWriter writer) const [inline]

Definition at line 50 of file IOVElement.h.

References ora::OId::isInvalid(), m_oid, m_wrapper, ora::OId::reset(), and ora::ITokenWriter::write().

                                                  {
      if( !m_oid.isInvalid() ){
        const_cast<IOVElement*>(this)->m_wrapper = writer.write( m_oid );
        const_cast<IOVElement*>(this)->m_oid.reset();
      }
    }
void cond::IOVElement::swapToken ( ora::ITokenParser parser) const [inline]

Definition at line 43 of file IOVElement.h.

References m_oid, m_wrapper, and ora::ITokenParser::parse().

                                                    {
      if( !m_wrapper.empty() ){
        const_cast<IOVElement*>(this)->m_oid = parser.parse( m_wrapper );
        const_cast<IOVElement*>(this)->m_wrapper.clear();
      }
    }
std::string cond::IOVElement::token ( ) const [inline]

Definition at line 34 of file IOVElement.h.

References m_oid, and ora::OId::toString().

Referenced by operator==().

                            {
      return m_oid.toString();
    }

Member Data Documentation

Definition at line 60 of file IOVElement.h.

Referenced by IOVElement(), swapOId(), swapToken(), and token().

Definition at line 58 of file IOVElement.h.

Referenced by sinceTime().

std::string cond::IOVElement::m_wrapper [private]

Definition at line 59 of file IOVElement.h.

Referenced by swapOId(), and swapToken().