Belle II Software development
|
Convenient class to automatically create payloads from allowed time depedence of parameter, load their value from database, update te constants one by one usually from Millepde result) and output the final payloads (including EventDependencies) such that one can store them (updated) in the database. More...
#include <GlobalTimeLine.h>
Public Member Functions | |
GlobalParamTimeLine (const std::vector< EventMetaData > &events, GlobalLabel &label, const GlobalParamVector &vector) | |
Constructor. | |
void | loadFromDB () |
Load every single payload with the content in database at its corresponding event (when it should start to be valid) WARNING: This is potentionally a very expensive operation with lots of HTTP communication TODO: make the loading from DB slightly more optimized -> needs change in GlobalParamSet<...> | |
void | updateGlobalParam (GlobalLabel label, double correction, bool resetParam=false) |
Add a correction to any payload's parameter in the timeline. | |
std::vector< std::pair< IntervalOfValidity, TObject * > > | releaseObjects () |
Release all the objects (you become the owner!) for DB storage. | |
Private Attributes | |
TimeTable | timeTable {} |
The final TimeTable with payload indices. | |
PayloadsTable | payloadsTable {} |
Table with payloads. | |
Convenient class to automatically create payloads from allowed time depedence of parameter, load their value from database, update te constants one by one usually from Millepde result) and output the final payloads (including EventDependencies) such that one can store them (updated) in the database.
Definition at line 146 of file GlobalTimeLine.h.
GlobalParamTimeLine | ( | const std::vector< EventMetaData > & | events, |
GlobalLabel & | label, | ||
const GlobalParamVector & | vector | ||
) |
Constructor.
events | vector of events to interpret time ids from GlobalLabel |
label | (only for style) - static functions called to read the mapping of parameters and time intervals |
vector | the global vector initialized with DB objects for which payloads shoudl be generated WARNING: do not construct() or loadFromDB() the vector - use it "raw" - the internal object handlers are copied into the payloads table constructing the internal DB objects would result in copiyng them around, too |
Definition at line 220 of file GlobalTimeLine.cc.
void loadFromDB | ( | ) |
Load every single payload with the content in database at its corresponding event (when it should start to be valid) WARNING: This is potentionally a very expensive operation with lots of HTTP communication TODO: make the loading from DB slightly more optimized -> needs change in GlobalParamSet<...>
Definition at line 228 of file GlobalTimeLine.cc.
std::vector< std::pair< IntervalOfValidity, TObject * > > releaseObjects | ( | ) |
Release all the objects (you become the owner!) for DB storage.
Definition at line 279 of file GlobalTimeLine.cc.
void updateGlobalParam | ( | GlobalLabel | label, |
double | correction, | ||
bool | resetParam = false |
||
) |
Add a correction to any payload's parameter in the timeline.
label | the label any global parameter constructed from integer after Millepede calibration The mapping of time intervals has to be loaded for the label to provide correct infortmation about its validity in time intervals -> all payloads are updated until the end of validity of this parameter |
correction | the value to be added to the given constant |
resetParam | if True, the parameters is not updated with correction, but set to 'correction' value This has special use-case when filling the objects with errors/corrections data instead of absolute parameter values |
Definition at line 252 of file GlobalTimeLine.cc.
|
private |
Table with payloads.
Definition at line 152 of file GlobalTimeLine.h.
|
private |
The final TimeTable with payload indices.
Definition at line 150 of file GlobalTimeLine.h.