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

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>

Collaboration diagram for GlobalParamTimeLine:

Public Member Functions

 GlobalParamTimeLine (const std::vector< EventMetaData > &events, GlobalLabel &label, const GlobalParamVector &vector)
 Constructor. More...
 
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. More...
 
std::vector< std::pair< IntervalOfValidity, TObject * > > releaseObjects ()
 Release all the objects (you become the owner!) for DB storage. More...
 

Private Attributes

TimeTable timeTable {}
 The final TimeTable with payload indices.
 
PayloadsTable payloadsTable {}
 Table with payloads.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GlobalParamTimeLine()

GlobalParamTimeLine ( const std::vector< EventMetaData > &  events,
GlobalLabel label,
const GlobalParamVector vector 
)

Constructor.

Parameters
eventsvector of events to interpret time ids from GlobalLabel
label(only for style) - static functions called to read the mapping of parameters and time intervals
vectorthe 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.

221  : timeTable(makeInitialTimeTable(events, label))
222  {
223  finalizeTimeTable(timeTable);
224  payloadsTable = TimeIdsTable2PayloadsTable(timeTable, vector);
225 
226  }
PayloadsTable payloadsTable
Table with payloads.
TimeTable timeTable
The final TimeTable with payload indices.

Member Function Documentation

◆ releaseObjects()

std::vector< std::pair< IntervalOfValidity, TObject * > > releaseObjects ( )

Release all the objects (you become the owner!) for DB storage.

Returns
vector of pairs. First is the IoV to store this in DB. Second is the object (payload) itself. Note that this might be EventDependencies in case objects can change inside runs

Definition at line 279 of file GlobalTimeLine.cc.

◆ updateGlobalParam()

void updateGlobalParam ( GlobalLabel  label,
double  correction,
bool  resetParam = false 
)

Add a correction to any payload's parameter in the timeline.

Parameters
labelthe 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
correctionthe value to be added to the given constant
resetParamif 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.


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