Belle II Software light-2406-ragdoll
|
Base class for importing objects to the database. More...
#include <DBImportBase.h>
Public Member Functions | |
DBImportBase (const std::string &name) | |
Constructor. | |
virtual | ~DBImportBase () |
Destructor. | |
const std::string & | getName () const |
Returns the name under which the object will be stored in the database. | |
virtual void | addEventDependency (unsigned int eventNumber) |
add event dependency | |
virtual void | addTimeStampDependency (unsigned long long int timeStamp) |
add time stamp dependency | |
virtual void | addSubrunDependency (int subrun) |
add subrun dependency | |
bool | import (const IntervalOfValidity &iov) |
Import the object to database. | |
virtual void | clear () |
Clear the content, e.g. | |
Protected Types | |
enum | EIntraRunDependency { c_None = 0 , c_Event = 1 , c_TimeStamp = 2 , c_Subrun = 3 } |
Intra run dependency types (used only internaly) More... | |
Protected Member Functions | |
void | addIntraRunDependency (unsigned long long int tag, EIntraRunDependency type) |
add intra run dependency | |
Protected Attributes | |
std::string | m_name |
object or array name in database | |
TObject * | m_object = 0 |
pointer to allocated object or array | |
Private Member Functions | |
DBImportBase (const DBImportBase &) | |
Hidden copy constructor. | |
template<class IntraRun > | |
bool | import (const IntervalOfValidity &iov) |
Import intra run dependent object to database. | |
bool | storeData (TObject *intraRun, const IntervalOfValidity &iov) |
Store intra run dependent objects. | |
Private Attributes | |
EIntraRunDependency | m_dependency = c_None |
dependency type | |
std::vector< TObject * > | m_objects |
container for intra run dependency objects | |
std::vector< unsigned long long int > | m_tags |
container for intra run dep. | |
Base class for importing objects to the database.
Note that the object is NOT parked at DBStore, but allocated internally.
Definition at line 23 of file DBImportBase.h.
|
protected |
Intra run dependency types (used only internaly)
Definition at line 86 of file DBImportBase.h.
|
inlineexplicit |
Constructor.
name | Name under which the object will be stored in the database |
Definition at line 30 of file DBImportBase.h.
|
virtual |
Destructor.
Definition at line 76 of file DBImportBase.cc.
|
private |
Hidden copy constructor.
To prevent making copies, since the class contains pointer to allocated memory.
|
inlinevirtual |
add event dependency
eventNumber | event number |
Reimplemented in DBImportArray< T >.
Definition at line 47 of file DBImportBase.h.
|
protected |
add intra run dependency
tag | according to type: event number or time stamp or subrun number |
type | intra run dependency type |
Definition at line 17 of file DBImportBase.cc.
|
inlinevirtual |
add subrun dependency
subrun | subrun number |
Reimplemented in DBImportArray< T >.
Definition at line 65 of file DBImportBase.h.
|
inlinevirtual |
add time stamp dependency
timeStamp | time stamp |
Reimplemented in DBImportArray< T >.
Definition at line 56 of file DBImportBase.h.
|
virtual |
Clear the content, e.g.
destroy allocated objects and prepare for the new DB import.
Reimplemented in DBImportArray< T >.
Definition at line 58 of file DBImportBase.cc.
|
inline |
Returns the name under which the object will be stored in the database.
Definition at line 41 of file DBImportBase.h.
bool import | ( | const IntervalOfValidity & | iov | ) |
Import the object to database.
iov | interval of validity |
Definition at line 36 of file DBImportBase.cc.
|
inlineprivate |
Import intra run dependent object to database.
iov | interval of validity |
Definition at line 114 of file DBImportBase.h.
|
private |
Store intra run dependent objects.
This is an extra function to hide implementation details of Database.h
intraRun | pointer to the Intra Run implementation which has to inherit from TObject |
iov | interval of validity |
Definition at line 71 of file DBImportBase.cc.
|
private |
dependency type
Definition at line 137 of file DBImportBase.h.
|
protected |
object or array name in database
Definition at line 99 of file DBImportBase.h.
|
protected |
pointer to allocated object or array
Definition at line 100 of file DBImportBase.h.
|
private |
container for intra run dependency objects
Definition at line 138 of file DBImportBase.h.
|
private |