80 template<
class DBObjType>
84 theLabel.
construct(DBObjType::getGlobalUniqueID(), element, param);
99 construct(100000 * dbObjId + element, param);
147 operator int() {
return (
int)
label();}
152 operator unsigned int() {
return (
unsigned int)
label();}
177 void dump(
int level = 0)
const;
187 for (
unsigned int i =
tid; i <
maxTID; i++) {
188 if (it->second.get(i) !=
tid)
202 static unsigned int subrun = 0;
251 if (i >= start && i <= end)
268 if (i >= start && i <= end)
278 static std::map<gidTYPE, TimeInterval > intervals;
286 static std::map<gidTYPE, gidTYPE> dictionary;
Class to convert to/from global labels for Millepede II to/from detector & parameter identificators.
static const gidTYPE tidOffset
Offset of time slice id = 1.000.000.
static gidTYPE getCurrentTimeInterval()
Get current time id.
int label()
Returns encoded Pede label.
static void clearTimeDependentParamaters()
Forget all previously registered time dependent parameters.
static std::map< gidTYPE, gidTYPE > & getDictionary()
Reference to dictionary/map TEIDPID -> EIDPID.
static const gidTYPE maxTEID
max time-dep.
static const gidTYPE maxEID
max 9.999.999 detector elements 1..9999999 (NOT time-dep-)
gidTYPE setParameterId(gidTYPE paramId)
Usefull setter to quickly change only the parameter id and return back the encoded label (for use in ...
static const gidTYPE eidOffest
Offset of detector element id = 100.
gidTYPE getUniqueId() const
Returns the global id identifing DB object for constantwith this label.
void dump(int level=0) const
Dumps the label to std::cout.
static const gidTYPE teidOffset
Offset of time dependent element(detector+parameter) = 100.
GlobalLabel()
Default constuctor. Members initialized in declaration.
gidTYPE getParameterId() const
Get id of alignment/calibration parameter.
static const gidTYPE maxPID
max 99 parameter types 1..99
bool getTimeFlag() const
Is label time-dependent?
unsigned int gidTYPE
shortcut for main data type (unsigned int)
gidTYPE getElementId() const
Returns the element id (like VxdID for silicon sensors) to identify sets of parameters in DB objects.
int getEndOfValidity()
Get the last time id, where this label is valid.
static const gidTYPE maxTID
max time slices for a parameter 1..999
static void setCurrentTimeInterval(gidTYPE time)
Sets current time id.
static GlobalLabel construct(gidTYPE element, gidTYPE param)
Construct label for given DB object (template argument) and its element and parameter.
static unsigned int & getCurrentTimeIntervalRef()
Returns reference to current time id.
void registerTimeDependent(gidTYPE start, gidTYPE end=maxTID)
Register this Detector element and parameter as time dependent with instance starting at "start" time...
gidTYPE makeEIDPID(gidTYPE eid_, gidTYPE pid_)
Helper to compose elemnt id & param id.
static const gidTYPE pidOffset
parameter number are the last 2 decimal digits
gidTYPE makeTEIDPID(gidTYPE teid_, gidTYPE pid_)
Helper to compose time elemnt id & param id.
gidTYPE tif
time identification flag
static const gidTYPE tifOffset
Offset of time flag = 1.000.000.000.
static const gidTYPE maxLabel
Label and internal id ("gid") are the same numbers (label is signed but 0 and <0 values are invalid t...
static const gidTYPE maxTIF
time-dep.
static std::set< unsigned short > m_components
Set of global ids of components for which to return non-zero labels.
void construct(gidTYPE dbObjId, gidTYPE element, gidTYPE param)
Construct label for given DB object id and its element and parameter.
static const gidTYPE maxGID
max internal id = 1.999.999.999
gidTYPE getTimeId() const
Get time id.
static std::map< gidTYPE, TimeInterval > & getTimeIntervals()
Reference to map EIDPID -> (TEIDPID, time intervals)
static void setComponents(const std::set< unsigned short > &components)
Set which DB objects have non-zero labels (by their id)
bool isValid()
Is label valid? (non-zero)
Abstract base class for different kinds of events.
Struct to hold intervals of validity.
gidTYPE get(gidTYPE timeid)
Get the start time id for validity interval valid at given timeid.
void set(gidTYPE start, gidTYPE end)
Set new parameter validity interval from start to end.
gidTYPE teidpid_
Time element id & parameter id.
gidTYPE arr_[maxTID+1]
Array of time ids.
gidTYPE teidpid()
Get composed time element id & param id.
TimeInterval(gidTYPE TEIDPID, gidTYPE start, gidTYPE end)
Constructor for given validity interval.