Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:25

0001 #include "CondCore/CondDB/interface/PayloadReader.h"
0002 
0003 namespace cond {
0004 
0005   namespace persistency {
0006 
0007     PayloadReader::PayloadReader() { m_connection.reset(new ConnectionPool); }
0008 
0009     PayloadReader::PayloadReader(const PayloadReader& rhs) : m_connection(rhs.m_connection), m_session(rhs.m_session) {}
0010 
0011     PayloadReader::~PayloadReader() {}
0012 
0013     PayloadReader& PayloadReader::operator=(const PayloadReader& rhs) {
0014       m_connection = rhs.m_connection;
0015       m_session = rhs.m_session;
0016       return *this;
0017     }
0018 
0019     ConnectionPool& PayloadReader::connection() { return *m_connection; }
0020 
0021     void PayloadReader::open(const std::string& connectionString) {
0022       m_session = m_connection->createSession(connectionString);
0023     }
0024 
0025     void PayloadReader::open() { open(PRODUCTION_DB); }
0026 
0027     void PayloadReader::close() { m_session.close(); }
0028 
0029   }  // namespace persistency
0030 }  // namespace cond