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::persistency::IOVCache Class Reference

#include <OraDbSchema.h>

Public Member Functions

void addTag (const std::string &tag, const std::string token)
 
cond::IOVEditor editor ()
 
bool existsTag (const std::string &tag)
 
std::string getToken (const std::string &tag)
 
 IOVCache (cond::DbSession &s)
 
cond::IOVProxy iovSequence ()
 
bool load (const std::string &tag)
 
cond::DbSessionsession ()
 

Private Attributes

cond::IOVEditor m_iovAccess
 
std::string m_tag
 
std::string m_token
 

Detailed Description

Definition at line 18 of file OraDbSchema.h.

Constructor & Destructor Documentation

cond::persistency::IOVCache::IOVCache ( cond::DbSession s)

Definition at line 17 of file OraDbSchema.cc.

17  :
18  m_iovAccess( s ){
19  }
cond::IOVEditor m_iovAccess
Definition: OraDbSchema.h:29

Member Function Documentation

void cond::persistency::IOVCache::addTag ( const std::string &  tag,
const std::string  token 
)

Definition at line 47 of file OraDbSchema.cc.

References cond::MetaData::addMapping(), m_tag, m_token, session(), and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by cond::persistency::OraTagTable::insert().

47  {
48  if( tag != m_tag ){
49  cond::MetaData metadata( session() );
50  metadata.addMapping( tag, token );
51  m_tag = tag;
52  m_token = token;
53  }
54  }
cond::DbSession & session()
Definition: OraDbSchema.cc:21
cond::IOVEditor cond::persistency::IOVCache::editor ( )
bool cond::persistency::IOVCache::existsTag ( const std::string &  tag)

Definition at line 33 of file OraDbSchema.cc.

References cond::MetaData::hasTag(), and session().

Referenced by cond::persistency::OraTagTable::select().

33  {
34  cond::MetaData metadata( session() );
35  return metadata.hasTag( t );
36  }
cond::DbSession & session()
Definition: OraDbSchema.cc:21
std::string cond::persistency::IOVCache::getToken ( const std::string &  tag)

Definition at line 38 of file OraDbSchema.cc.

References cond::MetaData::getToken(), m_tag, m_token, session(), and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by load(), and cond::persistency::OraTagTable::update().

38  {
39  if( tag != m_tag ){
40  cond::MetaData metadata( session() );
41  m_tag = tag;
42  m_token = metadata.getToken( tag );
43  }
44  return m_token;
45  }
cond::DbSession & session()
Definition: OraDbSchema.cc:21
cond::IOVProxy cond::persistency::IOVCache::iovSequence ( )
bool cond::persistency::IOVCache::load ( const std::string &  tag)
cond::DbSession & cond::persistency::IOVCache::session ( )

Definition at line 21 of file OraDbSchema.cc.

References cond::IOVProxy::db(), m_iovAccess, and cond::IOVEditor::proxy().

Referenced by addTag(), cond::persistency::OraIOVSchema::create(), cond::persistency::OraIOVSchema::exists(), existsTag(), and getToken().

21  {
22  return m_iovAccess.proxy().db();
23  }
DbSession & db() const
Definition: IOVProxy.cc:312
cond::IOVProxy proxy() const
Definition: IOVEditor.cc:546
cond::IOVEditor m_iovAccess
Definition: OraDbSchema.h:29

Member Data Documentation

cond::IOVEditor cond::persistency::IOVCache::m_iovAccess
private

Definition at line 29 of file OraDbSchema.h.

Referenced by editor(), iovSequence(), load(), and session().

std::string cond::persistency::IOVCache::m_tag
private

Definition at line 30 of file OraDbSchema.h.

Referenced by addTag(), and getToken().

std::string cond::persistency::IOVCache::m_token
private

Definition at line 31 of file OraDbSchema.h.

Referenced by addTag(), and getToken().