11#include <alignment/GlobalLabel.h>
12#include <alignment/GlobalParam.h>
13#include <framework/dataobjects/EventMetaData.h>
28 typedef std::pair<int, int> ExpRun;
30 typedef std::vector<EventMetaData> EventHeader;
32 typedef std::vector<ExpRun> RunHeader;
36 typedef std::unordered_map<int, std::vector<int>> TableData;
38 typedef std::tuple<EventHeader, RunHeader, TableData> TimeTable;
43 typedef std::vector< std::pair<EventMetaData, std::shared_ptr<GlobalParamSetAccess>>> IntraIoVPayloads;
45 typedef std::vector<std::pair<IntervalOfValidity, IntraIoVPayloads>> PayloadIovBlockRow;
47 typedef std::unordered_map<int, PayloadIovBlockRow> PayloadsTable;
57 EventMetaData gotoNextChangeRunWise(TimeTable& timeTable,
int uid,
int& timeid);
67 EventMetaData gotoNextChangeInRun(TimeTable& timeTable,
int uid,
int& timeid);
72 PayloadsTable TimeIdsTable2PayloadsTable(TimeTable& timeTable,
const GlobalParamVector& vector);
82 TimeTable makeInitialTimeTable(std::vector<EventMetaData> events, GlobalLabel& label);
87 void finalizeTimeTable(TimeTable& table);
93 std::pair<EventMetaData, std::shared_ptr<GlobalParamSetAccess>> getPayloadByContinuousIndex(PayloadsTable& payloadsTable,
int uid,
94 long unsigned int index);;
99 int getContinuousIndexByTimeID(
const TimeTable& timeTable,
int uid,
int timeid);
118 std::vector<EventMetaData> setupTimedepGlobalLabels(PyObject* config);
139 std::vector<EventMetaData> setupTimedepGlobalLabels(
140 std::vector< std::tuple< std::vector< int >, std::vector< std::tuple< int, int, int > > > >& config);
184 std::vector<std::pair<IntervalOfValidity, TObject*>>
releaseObjects();
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators.
The central user class to manipulate any global constant in any DB object Used to retrieve global par...
Convenient class to automatically create payloads from allowed time depedence of parameter,...
PayloadsTable payloadsTable
Table with payloads.
std::vector< std::pair< IntervalOfValidity, TObject * > > releaseObjects()
Release all the objects (you become the owner!) for DB storage.
void loadFromDB()
Load every single payload with the content in database at its corresponding event (when it should sta...
void updateGlobalParam(GlobalLabel label, double correction, bool resetParam=false)
Add a correction to any payload's parameter in the timeline.
TimeTable timeTable
The final TimeTable with payload indices.
Abstract base class for different kinds of events.