CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
cond::persistency::PayloadReader Class Reference

#include <PayloadReader.h>

Public Member Functions

void close ()
 
ConnectionPoolconnection ()
 
template<typename T >
std::shared_ptr< Tfetch (const cond::Hash &payloadHash)
 
void open ()
 
void open (const std::string &connectionString)
 
PayloadReaderoperator= (const PayloadReader &rhs)
 
 PayloadReader ()
 
 PayloadReader (const PayloadReader &rhs)
 
virtual ~PayloadReader ()
 

Static Public Attributes

static constexpr const char *const PRODUCTION_DB = "oracle://cms_orcon_adg/CMS_CONDITIONS"
 

Private Attributes

std::shared_ptr< ConnectionPoolm_connection
 
Session m_session
 

Detailed Description

Definition at line 23 of file PayloadReader.h.

Constructor & Destructor Documentation

◆ PayloadReader() [1/2]

PayloadReader::PayloadReader ( )

Definition at line 7 of file PayloadReader.cc.

7 { m_connection.reset(new ConnectionPool); }

References m_connection.

◆ PayloadReader() [2/2]

PayloadReader::PayloadReader ( const PayloadReader rhs)

Definition at line 9 of file PayloadReader.cc.

9 : m_connection(rhs.m_connection), m_session(rhs.m_session) {}

◆ ~PayloadReader()

PayloadReader::~PayloadReader ( )
virtual

Definition at line 11 of file PayloadReader.cc.

11 {}

Member Function Documentation

◆ close()

void PayloadReader::close ( void  )

◆ connection()

ConnectionPool & PayloadReader::connection ( )

Definition at line 19 of file PayloadReader.cc.

19 { return *m_connection; }

References m_connection.

◆ fetch()

template<typename T >
std::shared_ptr< T > PayloadReader::fetch ( const cond::Hash payloadHash)
inline

◆ open() [1/2]

void PayloadReader::open ( )

Definition at line 25 of file PayloadReader.cc.

25 { open(PRODUCTION_DB); }

References PRODUCTION_DB.

Referenced by fetch().

◆ open() [2/2]

void PayloadReader::open ( const std::string &  connectionString)

Definition at line 21 of file PayloadReader.cc.

21  {
22  m_session = m_connection->createSession(connectionString);
23  }

References l1RCTOmdsFedVectorProducer_cfi::connectionString, m_connection, and m_session.

◆ operator=()

PayloadReader & PayloadReader::operator= ( const PayloadReader rhs)

Definition at line 13 of file PayloadReader.cc.

13  {
14  m_connection = rhs.m_connection;
15  m_session = rhs.m_session;
16  return *this;
17  }

References m_connection, and m_session.

Member Data Documentation

◆ m_connection

std::shared_ptr<ConnectionPool> cond::persistency::PayloadReader::m_connection
private

Definition at line 57 of file PayloadReader.h.

Referenced by connection(), open(), operator=(), and PayloadReader().

◆ m_session

Session cond::persistency::PayloadReader::m_session
private

Definition at line 58 of file PayloadReader.h.

Referenced by close(), fetch(), open(), and operator=().

◆ PRODUCTION_DB

constexpr const char* const cond::persistency::PayloadReader::PRODUCTION_DB = "oracle://cms_orcon_adg/CMS_CONDITIONS"
staticconstexpr

Definition at line 25 of file PayloadReader.h.

Referenced by fetch(), and open().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
cond::persistency::Session::close
void close()
Definition: Session.cc:50
cond::persistency::Session::fetchPayload
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:213
cond::persistency::Session::connectionString
std::string connectionString()
Definition: Session.cc:216
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::persistency::Session::transaction
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
cond::persistency::PayloadReader::PRODUCTION_DB
static constexpr const char *const PRODUCTION_DB
Definition: PayloadReader.h:25
T
long double T
Definition: Basic3DVectorLD.h:48
cond::persistency::PayloadReader::m_connection
std::shared_ptr< ConnectionPool > m_connection
Definition: PayloadReader.h:57
cond::persistency::PayloadReader::open
void open()
Definition: PayloadReader.cc:25
l1RCTOmdsFedVectorProducer_cfi.connectionString
connectionString
Definition: l1RCTOmdsFedVectorProducer_cfi.py:4
cond::persistency::PayloadReader::m_session
Session m_session
Definition: PayloadReader.h:58