Belle II Software  release-08-01-10
ECLDBTool Class Reference

The ECLDBTool class is designed to read / write object from / to database. More...

#include <ECLDBTool.h>

Collaboration diagram for ECLDBTool:

Public Member Functions

 ECLDBTool (bool isLocal, const char *dbName, const char *payloadName)
 Constructor. More...
 
 ~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. More...
 
void read (TObject **obj, IntervalOfValidity **iov, const EventMetaData &event) const
 Read object and validity interval from a database. More...
 
void read (IntervalOfValidity **iov, const EventMetaData &event) const
 Read just validity interval. More...
 
void changeIoV (const EventMetaData &event, const IntervalOfValidity &iov) const
 Change interval of validity (Make a copy of the current payload with other validity interval). More...
 

Private Attributes

bool m_isLocal
 If m_isLocal is true, local database is used. More...
 
std::string m_dbName
 Tag in the central database or path to a local database.
 
std::string m_payloadName
 Name of payload.
 

Detailed Description

The ECLDBTool class is designed to read / write object from / to database.

Definition at line 23 of file ECLDBTool.h.

Constructor & Destructor Documentation

◆ ECLDBTool()

ECLDBTool ( bool  isLocal,
const char *  dbName,
const char *  payloadName 
)

Constructor.

Parameters
isLocalenables local database usage.
dbNameis a tag of the central database or path to a local database.
payloadNameis name of payload.

Definition at line 15 of file ECLDBTool.cc.

17  :
18  m_isLocal(isLocal),
19  m_dbName(dbName),
20  m_payloadName(payloadName)
21 {
22 }
std::string m_dbName
Tag in the central database or path to a local database.
Definition: ECLDBTool.h:90
bool m_isLocal
If m_isLocal is true, local database is used.
Definition: ECLDBTool.h:85
std::string m_payloadName
Name of payload.
Definition: ECLDBTool.h:94

Member Function Documentation

◆ changeIoV()

void changeIoV ( const EventMetaData event,
const IntervalOfValidity iov 
) const

Change interval of validity (Make a copy of the current payload with other validity interval).

Parameters
eventis the event metadata.
iovis the validity interval.

Definition at line 66 of file ECLDBTool.cc.

◆ read() [1/2]

void read ( IntervalOfValidity **  iov,
const EventMetaData event 
) const

Read just validity interval.

Parameters
iovis validity interval.
eventis the event metadata.

Definition at line 55 of file ECLDBTool.cc.

◆ read() [2/2]

void read ( TObject **  obj,
IntervalOfValidity **  iov,
const EventMetaData event 
) const

Read object and validity interval from a database.

Parameters
objis object.
iovis validity interval.
eventis event metadata.

Definition at line 45 of file ECLDBTool.cc.

◆ write()

void write ( TObject *const  obj,
const IntervalOfValidity iov 
) const

Write object and validity interval to a database.

Parameters
objis object.
iovis validity interval.

Definition at line 38 of file ECLDBTool.cc.

Member Data Documentation

◆ m_isLocal

bool m_isLocal
private

If m_isLocal is true, local database is used.

Otherwise central database is used.

Definition at line 85 of file ECLDBTool.h.


The documentation for this class was generated from the following files: