CMS 3D CMS Logo

Public Member Functions | Private Attributes

cond::UpdateStamp Class Reference

#include <UpdateStamp.h>

Inheritance diagram for cond::UpdateStamp:
cond::IOVSequence

List of all members.

Public Member Functions

std::string const & comment () const
int revision () const
int stamp (std::string const &icomment, bool append=false)
cond::Time_t timestamp () const
 UpdateStamp (UpdateStamp const &rhs)
 UpdateStamp ()
virtual ~UpdateStamp ()

Private Attributes

std::string m_comment
int m_revision
cond::Time_t m_timestamp

Detailed Description

class to "stamp" a new version of an updateble persistent object it includes a timestamp, a sequential revision number and a comment no history in mantained at the moment

Definition at line 14 of file UpdateStamp.h.


Constructor & Destructor Documentation

cond::UpdateStamp::UpdateStamp ( )

Definition at line 10 of file UpdateStamp.cc.

                           : 
    m_revision(-1), m_timestamp(0), m_comment("not stamped"){}
cond::UpdateStamp::UpdateStamp ( UpdateStamp const &  rhs)

Definition at line 13 of file UpdateStamp.cc.

References m_comment, m_revision, and m_timestamp.

                                                  {
    m_revision = rhs.m_revision;
    m_timestamp = rhs.m_timestamp;
    m_comment = rhs.m_comment;
  }
cond::UpdateStamp::~UpdateStamp ( ) [virtual]

Definition at line 19 of file UpdateStamp.cc.

{}

Member Function Documentation

std::string const& cond::UpdateStamp::comment ( ) const [inline]

Definition at line 30 of file UpdateStamp.h.

References m_comment.

{ return m_comment;}
int cond::UpdateStamp::revision ( ) const [inline]

Definition at line 26 of file UpdateStamp.h.

References m_revision.

{ return  m_revision;}
int cond::UpdateStamp::stamp ( std::string const &  icomment,
bool  append = false 
)

Definition at line 22 of file UpdateStamp.cc.

References m_comment, m_revision, m_timestamp, and cmsPerfSuiteHarvest::now.

                                                                {
    m_revision++;
    m_timestamp = cond::time::now();
    if (append && !icomment.empty()) m_comment += sep + icomment;
    else m_comment = icomment;
    return m_revision;
  }
cond::Time_t cond::UpdateStamp::timestamp ( ) const [inline]

Definition at line 28 of file UpdateStamp.h.

References m_timestamp.

{ return m_timestamp;}

Member Data Documentation

std::string cond::UpdateStamp::m_comment [private]

Definition at line 37 of file UpdateStamp.h.

Referenced by comment(), stamp(), and UpdateStamp().

Definition at line 35 of file UpdateStamp.h.

Referenced by revision(), stamp(), and UpdateStamp().

Definition at line 36 of file UpdateStamp.h.

Referenced by stamp(), timestamp(), and UpdateStamp().