CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cond::UpdateStamp Class Reference

#include <UpdateStamp.h>

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

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 (UpdateStamp const &rhs)
 
virtual ~UpdateStamp ()
 

Private Attributes

 COND_SERIALIZABLE
 
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 16 of file UpdateStamp.h.

Constructor & Destructor Documentation

cond::UpdateStamp::UpdateStamp ( )

Definition at line 10 of file UpdateStamp.cc.

10  :
11  m_revision(-1), m_timestamp(0), m_comment("not stamped"){}
cond::Time_t m_timestamp
Definition: UpdateStamp.h:37
std::string m_comment
Definition: UpdateStamp.h:38
cond::UpdateStamp::UpdateStamp ( UpdateStamp const &  rhs)

Definition at line 13 of file UpdateStamp.cc.

References m_comment, m_revision, and m_timestamp.

13  {
14  m_revision = rhs.m_revision;
15  m_timestamp = rhs.m_timestamp;
16  m_comment = rhs.m_comment;
17  }
cond::Time_t m_timestamp
Definition: UpdateStamp.h:37
std::string m_comment
Definition: UpdateStamp.h:38
cond::UpdateStamp::~UpdateStamp ( )
virtual

Definition at line 19 of file UpdateStamp.cc.

19 {}

Member Function Documentation

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

Definition at line 32 of file UpdateStamp.h.

References m_comment.

32 { return m_comment;}
std::string m_comment
Definition: UpdateStamp.h:38
int cond::UpdateStamp::revision ( ) const
inline

Definition at line 28 of file UpdateStamp.h.

References m_revision.

28 { 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, cond::time::now(), and cmsHarvester::sep.

22  {
23  m_revision++;
25  if (append && !icomment.empty()) m_comment += sep + icomment;
26  else m_comment = icomment;
27  return m_revision;
28  }
cond::Time_t m_timestamp
Definition: UpdateStamp.h:37
std::string m_comment
Definition: UpdateStamp.h:38
Time_t now()
cond::Time_t cond::UpdateStamp::timestamp ( ) const
inline

Definition at line 30 of file UpdateStamp.h.

References m_timestamp.

30 { return m_timestamp;}
cond::Time_t m_timestamp
Definition: UpdateStamp.h:37

Member Data Documentation

cond::UpdateStamp::COND_SERIALIZABLE
private

Definition at line 40 of file UpdateStamp.h.

std::string cond::UpdateStamp::m_comment
private

Definition at line 38 of file UpdateStamp.h.

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

int cond::UpdateStamp::m_revision
private

Definition at line 36 of file UpdateStamp.h.

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

cond::Time_t cond::UpdateStamp::m_timestamp
private

Definition at line 37 of file UpdateStamp.h.

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