SqliteReadSvc implementats IRDBAccessSvc interface for reading plain tables in the Geometry SQLite database.
More...
#include <SqliteReadSvc.h>
|
| SqliteReadSvc (const std::string &name, ISvcLocator *svc) |
| Standard Service Constructor. More...
|
|
StatusCode | finalize () override |
|
StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) override |
|
bool | connect (const std::string &connName) override |
| Open the SQLite database This method has no effect if the connection has already been opened. More...
|
|
bool | disconnect (const std::string &) override |
| Dummy overrider of the virtual function. More...
|
|
bool | shutdown (const std::string &) override |
| Closes the database connection. More...
|
|
IRDBRecordset_ptr | getRecordsetPtr (const std::string &node, const std::string &, const std::string &, const std::string &) override |
| Provides access to the Recordset object containing HVS-tagged data. More...
|
|
std::string | getChildTag (const std::string &childNode, const std::string &, const std::string &, const std::string &) override |
| Dummy overrider of the virtual function. More...
|
|
std::unique_ptr< IRDBQuery > | getQuery (const std::string &node, const std::string &, const std::string &, const std::string &) override |
| Dummy overrider of the virtual function (for now) More...
|
|
void | getTagDetails (RDBTagDetails &tagDetails, const std::string &tag, const std::string &) override |
| Dummy overrider of the virtual function. More...
|
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
SqliteReadSvc implementats IRDBAccessSvc interface for reading plain tables in the Geometry SQLite database.
Definition at line 40 of file SqliteReadSvc.h.
◆ SqliteReadSvc()
SqliteReadSvc::SqliteReadSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
◆ connect()
bool SqliteReadSvc::connect |
( |
const std::string & |
connName | ) |
|
|
overridevirtual |
Open the SQLite database This method has no effect if the connection has already been opened.
- Parameters
-
connName | [IN] path to the SQLite database file |
- Returns
- success/failure
Implements IRDBAccessSvc.
Definition at line 45 of file SqliteReadSvc.cxx.
49 int res = sqlite3_open(connName.c_str(), &
m_db);
50 if (
res != SQLITE_OK) {
◆ disconnect()
bool SqliteReadSvc::disconnect |
( |
const std::string & |
| ) |
|
|
overridevirtual |
◆ finalize()
StatusCode SqliteReadSvc::finalize |
( |
| ) |
|
|
override |
◆ getChildTag()
std::string SqliteReadSvc::getChildTag |
( |
const std::string & |
childNode, |
|
|
const std::string & |
parentTag, |
|
|
const std::string & |
parentNode, |
|
|
const std::string & |
|
|
) |
| |
|
overridevirtual |
Dummy overrider of the virtual function.
- Parameters
-
childNode | [IN] the name of the table |
- Returns
- the name of the table if exists, otherwise an empty string
Implements IRDBAccessSvc.
Definition at line 112 of file SqliteReadSvc.cxx.
117 ATH_MSG_DEBUG(
"getChildTag for " << childNode <<
" " << parentTag <<
" " << parentNode);
119 return std::string();
◆ getQuery()
std::unique_ptr< IRDBQuery > SqliteReadSvc::getQuery |
( |
const std::string & |
node, |
|
|
const std::string & |
tag, |
|
|
const std::string & |
tag2node, |
|
|
const std::string & |
connName |
|
) |
| |
|
overridevirtual |
Dummy overrider of the virtual function (for now)
Implements IRDBAccessSvc.
Definition at line 101 of file SqliteReadSvc.cxx.
109 return std::unique_ptr<IRDBQuery>();
◆ getRecordsetPtr()
Provides access to the Recordset object containing HVS-tagged data.
- Parameters
-
node | [IN] name of the table. Other input parameters are dummy |
- Returns
- pointer to the recordset object
Implements IRDBAccessSvc.
Definition at line 75 of file SqliteReadSvc.cxx.
84 ATH_MSG_ERROR(
"Connection to the SQLite database not open. Returning empty recordset");
91 return itRecordset->second;
◆ getTagDetails()
◆ interfaceID()
static const InterfaceID& SqliteReadSvc::interfaceID |
( |
| ) |
|
|
inlinestatic |
Retrieve interface ID.
Definition at line 52 of file SqliteReadSvc.h.
52 {
return IID_IRDBAccessSvc; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ queryInterface()
StatusCode SqliteReadSvc::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvInterface |
|
) |
| |
|
override |
Definition at line 32 of file SqliteReadSvc.cxx.
34 if (IID_IRDBAccessSvc == riid) {
38 return AthService::queryInterface(riid, ppvInterface);
42 return StatusCode::SUCCESS;
◆ shutdown()
bool SqliteReadSvc::shutdown |
( |
const std::string & |
| ) |
|
|
overridevirtual |
◆ SvcFactory< SqliteReadSvc >
◆ m_db
sqlite3* SqliteReadSvc::m_db {nullptr} |
|
private |
◆ m_recordsetMutex
std::mutex SqliteReadSvc::m_recordsetMutex |
|
private |
◆ m_recordsets
◆ m_sessionMutex
std::mutex SqliteReadSvc::m_sessionMutex |
|
private |
The documentation for this class was generated from the following files: