Belle II Software development
|
The ECLDBTool class is designed to read / write object from / to database. More...
#include <ECLDBTool.h>
Public Member Functions | |
ECLDBTool (bool isLocal, const char *dbName, const char *payloadName) | |
Constructor. | |
~ECLDBTool () | |
Destructor. | |
void | connect () const |
Connect to a database. | |
void | write (TObject *const obj, const IntervalOfValidity &iov) const |
Write object and validity interval to a database. | |
void | read (TObject **obj, IntervalOfValidity **iov, const EventMetaData &event) const |
Read object and validity interval from a database. | |
void | read (IntervalOfValidity **iov, const EventMetaData &event) const |
Read just validity interval. | |
void | changeIoV (const EventMetaData &event, const IntervalOfValidity &iov) const |
Change interval of validity (Make a copy of the current payload with other validity interval). | |
Private Attributes | |
bool | m_isLocal |
If m_isLocal is true, local database is used. | |
std::string | m_dbName |
Tag in the central database or path to a local database. | |
std::string | m_payloadName |
Name of payload. | |
The ECLDBTool class is designed to read / write object from / to database.
Definition at line 23 of file ECLDBTool.h.
ECLDBTool | ( | bool | isLocal, |
const char * | dbName, | ||
const char * | payloadName | ||
) |
Constructor.
isLocal | enables local database usage. |
dbName | is a tag of the central database or path to a local database. |
payloadName | is name of payload. |
Definition at line 15 of file ECLDBTool.cc.
~ECLDBTool | ( | ) |
void changeIoV | ( | const EventMetaData & | event, |
const IntervalOfValidity & | iov | ||
) | const |
Change interval of validity (Make a copy of the current payload with other validity interval).
event | is the event metadata. |
iov | is the validity interval. |
Definition at line 66 of file ECLDBTool.cc.
void connect | ( | ) | const |
Connect to a database.
Definition at line 28 of file ECLDBTool.cc.
void read | ( | IntervalOfValidity ** | iov, |
const EventMetaData & | event | ||
) | const |
Read just validity interval.
iov | is validity interval. |
event | is the event metadata. |
Definition at line 55 of file ECLDBTool.cc.
void read | ( | TObject ** | obj, |
IntervalOfValidity ** | iov, | ||
const EventMetaData & | event | ||
) | const |
Read object and validity interval from a database.
obj | is object. |
iov | is validity interval. |
event | is event metadata. |
Definition at line 45 of file ECLDBTool.cc.
void write | ( | TObject *const | obj, |
const IntervalOfValidity & | iov | ||
) | const |
Write object and validity interval to a database.
obj | is object. |
iov | is validity interval. |
Definition at line 38 of file ECLDBTool.cc.
|
private |
Tag in the central database or path to a local database.
Definition at line 90 of file ECLDBTool.h.
|
private |
If m_isLocal is true, local database is used.
Otherwise central database is used.
Definition at line 85 of file ECLDBTool.h.
|
private |
Name of payload.
Definition at line 94 of file ECLDBTool.h.