#include <IOManagerDB.h>
Inheritance diagram for SctArchiving::IOManagerDB:
Public Member Functions | |
virtual void | write (const Sct::Serializable &ob, const Sct::IOParams *params=0) const |
write using default streamers | |
virtual shared_ptr< Sct::Serializable > | read (const string &name, const Sct::IOParams *params=0) const |
read using appropriate streamers | |
virtual std::string | status () const |
get some status information | |
virtual void | addRun (unsigned long runNumber) |
Add a run - gets location identifier from getLocationIdentifier. | |
virtual bool | runExists (unsigned long runNumber) |
Returns true if run already exists. | |
virtual void | addTest (const TestData &testdata, bool alsoAddScans) |
Add a test. | |
virtual bool | testExists (const TestData &testdata) |
check if scan exists | |
virtual void | addScan (const TestData &testdata, unsigned scanNumber) |
Add a scan. | |
virtual bool | scanExists (const TestData &testdata, unsigned scanNumber) |
check if scan exists | |
virtual std::string | getLocationName () |
get string identifying data set e.g. | |
virtual void | setLocationName (const std::string &locationName) |
Static Public Member Functions | |
IOManagerDB & | instance () |
retrieve access to singleton | |
std::string | convertToMysqlDateTimeFormat (const std::string &isotime) |
conversion just removes 'T' from isotime | |
Private Member Functions | |
void | checkForErrors (const string &msg, const string &file, int line) |
throw MysqlException if there is an error in the mysql object | |
void | checkForErrors (const string &msg, const string &query, const string &file, int line) |
throw MysqlException if there is an error in the mysql object - listing query | |
IOManagerDB () | |
constructor. | |
Static Private Member Functions | |
const SctData::ResultHeader & | getHeader (const Sct::Serializable &ob) |
get the header from a TestResult or ScanResult | |
std::string | getTable (const Sct::Serializable &ob) |
find the name of the table which the ob should to into. | |
Private Attributes | |
boost::shared_ptr< ZlibStringCompressor > | m_compressor |
keep a string compressor handy to zip and unzip BLOB data. | |
MYSQL * | m_mysql |
the main MYSQL object | |
std::string | m_locationName |
Static Private Attributes | |
IOManagerDB * | s_man |
pointer to singleton |
It is expected to be used in archival, and so also makes use of streamer versioning by inheriting from IOManagerStreamerVersioned. Uses a mysql back-end.
Definition at line 34 of file IOManagerDB.h.
|
constructor.
Definition at line 62 of file IOManagerDB.cpp. References checkForErrors(), m_compressor, and m_mysql. Referenced by instance(). |
Here is the call graph for this function:
|
Add a run - gets location identifier from getLocationIdentifier.
Definition at line 213 of file IOManagerDB.cpp. References checkForErrors(), getLocationName(), and m_mysql. |
Here is the call graph for this function:
|
Add a scan. Identifies correct Test from start time of TestData. Definition at line 282 of file IOManagerDB.cpp. References checkForErrors(), convertToMysqlDateTimeFormat(), getLocationName(), m_mysql, TestData::runNumber, TestData::startTime, and TestData::testName. Referenced by addTest(). |
Here is the call graph for this function:
|
Add a test.
Definition at line 244 of file IOManagerDB.cpp. References addScan(), checkForErrors(), convertToMysqlDateTimeFormat(), TestData::endTime, getLocationName(), m_mysql, TestData::nScans, TestData::runNumber, TestData::startScanNumber, TestData::startTime, and TestData::testName. |
Here is the call graph for this function:
|
throw MysqlException if there is an error in the mysql object - listing query
Definition at line 47 of file IOManagerDB.cpp. References m_mysql. |
|
throw MysqlException if there is an error in the mysql object
Definition at line 37 of file IOManagerDB.cpp. References m_mysql. Referenced by addRun(), addScan(), addTest(), IOManagerDB(), runExists(), and testExists(). |
|
conversion just removes 'T' from isotime
Definition at line 233 of file IOManagerDB.cpp. Referenced by addScan(), addTest(), and testExists(). |
|
get the header from a TestResult or ScanResult
Definition at line 115 of file IOManagerDB.cpp. References Sct::Streamable::getClassName(), and Sct::Serializable::getUniqueID(). |
Here is the call graph for this function:
|
get string identifying data set e.g. Barrel3_Cold_Oxford Definition at line 312 of file IOManagerDB.cpp. Referenced by addRun(), addScan(), addTest(), runExists(), and testExists(). |
|
find the name of the table which the ob should to into.
Definition at line 134 of file IOManagerDB.cpp. |
|
retrieve access to singleton
Definition at line 98 of file IOManagerDB.cpp. References IOManagerDB(), and s_man. |
Here is the call graph for this function:
|
read using appropriate streamers
Definition at line 151 of file IOManagerDB.cpp. References Sct::Archive::IOManagerStreamerVersioned::getMutex(), Sct::Archive::IOManagerStreamerVersioned::getReadVersionMap(), m_compressor, Sct::Archive::IOManagerStreamerVersioned::readImpl(), and Sct::Archive::IOManagerStreamerVersioned::setReadMode(). |
Here is the call graph for this function:
|
Returns true if run already exists.
Definition at line 194 of file IOManagerDB.cpp. References checkForErrors(), getLocationName(), and m_mysql. |
Here is the call graph for this function:
|
check if scan exists
Definition at line 277 of file IOManagerDB.cpp. |
|
get some status information
Implements Sct::Archive::IOManagerArchive. Definition at line 103 of file IOManagerDB.cpp. References m_compressor. |
|
check if scan exists
Definition at line 169 of file IOManagerDB.cpp. References checkForErrors(), convertToMysqlDateTimeFormat(), getLocationName(), m_mysql, TestData::runNumber, TestData::startTime, and TestData::testName. |
Here is the call graph for this function:
|
write using default streamers
Definition at line 138 of file IOManagerDB.cpp. References Sct::Archive::IOManagerStreamerVersioned::getMutex(), and Sct::Archive::IOManagerStreamerVersioned::setReadMode(). |
Here is the call graph for this function:
|
keep a string compressor handy to zip and unzip BLOB data.
Definition at line 103 of file IOManagerDB.h. Referenced by IOManagerDB(), read(), and status(). |
|
the main MYSQL object
Definition at line 106 of file IOManagerDB.h. Referenced by addRun(), addScan(), addTest(), checkForErrors(), IOManagerDB(), runExists(), and testExists(). |
|
pointer to singleton
Definition at line 96 of file IOManagerDB.cpp. Referenced by instance(). |