 |
Belle II Software
release-05-02-19
|
12 #include <framework/database/DBArray.h>
26 template<
class T,
typename KEY, KEY(T::*METHOD)() const, const std::
string& NAME = DBPo
inter_defaultName>
class DBPointer {
37 inline KEY
key()
const {
return m_key;}
40 inline operator KEY()
const {
return m_key;}
52 inline operator bool()
const {
return isValid();}
55 inline const T* operator ->()
const {
return getPointer();}
std::string DBPointer_defaultName
Use default name for array in DBPointer.
KEY m_key
Key value of the referred array element.
KEY operator=(KEY key)
Setter for key value.
Class for accessing arrays of objects in the database.
bool isValid() const
Check whether we point to a valid object.
B2Vector3< DataType > operator*(DataType a, const B2Vector3< DataType > &p)
non-memberfunction Scaling of 3-vectors with a real number
const T * m_object
Pointer to actual object.
KEY key() const
Accessor for key value.
Abstract base class for different kinds of events.
DBPointer(KEY key)
Constructor of pointer to an array element in the database.
const T * getPointer() const
Find the referred object and set m_object to it.
const T * getByKey(KEY(T::*method)(void) const, KEY key) const
Access object by key instead of by index.