Belle II Software
release-08-01-10
|
Base accessor class to store different DBObjects e.g. More...
#include <GlobalParam.h>
Public Member Functions | |
GlobalParamSetAccess () | |
Constructor. | |
virtual | ~GlobalParamSetAccess () |
Virtual destructor (base class, but with no members) | |
virtual unsigned short | getGlobalUniqueID () const =0 |
implement: Get the global unique id of DBObject | |
virtual double | getGlobalParam (unsigned short, unsigned short)=0 |
implement: get a global parameter value based on the element number in the DBObject and its parameter number. More... | |
virtual void | setGlobalParam (double, unsigned short, unsigned short)=0 |
implemtn: set a global param value by element and param number | |
virtual std::vector< std::pair< unsigned short, unsigned short > > | listGlobalParams ()=0 |
implement: generate list of all global parameters in the DBObject | |
virtual void | updateGlobalParam (double correction, unsigned short element, unsigned short param) |
Sum value of global element param with a correction. | |
virtual TObject * | getDBObj ()=0 |
Get a raw pointer to the internal DB object (can be nullptr if not yet constructed) Use with caution - always check for nullptr. | |
virtual std::string | getDefaultName () const =0 |
Get the default DBObject name used by datastore. | |
virtual TObject * | releaseObject ()=0 |
Release the object from internal unique_ptr to be managed elsewhere Useful to pass it to be stored in DB (and thus later deleted by framework) | |
virtual GlobalParamSetAccess * | clone ()=0 |
Clone the object, making a copy of the internal object - has to be implemented in derived template class to return the actuall type of the object. | |
virtual void | loadFromDB (EventMetaData emd)=0 |
Load the content (by copying obj retrieved from DB) for a given exp/run/event. | |
virtual void | loadFromDBObjPtr ()=0 |
Load using DBObjPtr<DBObjType> which uses current EventMetaData to load valid constants. | |
virtual void | construct ()=0 |
Construct the internal DBObject. | |
virtual bool | isConstructed () const =0 |
Has the internal DBObject been already constructed The object is constructed at latest on first access to its parameters. | |
virtual bool | hasBeenChangedInDB (bool resetChangedState=true) final |
Has the object been updated in DB since GlobalParamSet<...> has been constructed? Since last call to this function with resetChangedState=true. | |
virtual void | callbackDB () |
Function to call when object has been changed in DB since last loaded. | |
template<class DBObjType > | |
bool | is () const |
Is this set of given type? More... | |
bool | empty () |
Is this set empty or otherwise 'invalid' to identify null sets, end of hierarchy. | |
operator bool () | |
Tentative operator to quickly check the set Returns true when the set is not empty() and the DB object is constructed and can be accessed. | |
Protected Attributes | |
bool | m_hasBeenChangedInDB {false} |
Flag for object changed in DB. | |
Base accessor class to store different DBObjects e.g.
in a vector but allow to access their stored global parameters
Definition at line 95 of file GlobalParam.h.
|
pure virtual |
implement: get a global parameter value based on the element number in the DBObject and its parameter number.
Might be that element/param is zero. Check the meaning in DB object
Implemented in GlobalParamSet< DBObjType >, GlobalParamSet< Belle2::alignment::EmptyGlobalParamSet >, GlobalParamSet< DBObjType >, GlobalParamSet< Belle2::alignment::EmptyGlobalParamSet >, GlobalParamSet< DBObjType >, and GlobalParamSet< Belle2::alignment::EmptyGlobalParamSet >.
|
inline |
Is this set of given type?
Definition at line 144 of file GlobalParam.h.