Belle II Software development
GlobalLabel::TimeInterval Struct Reference

Struct to hold intervals of validity. More...

#include <GlobalLabel.h>

Public Member Functions

 TimeInterval (gidTYPE TEIDPID, gidTYPE start, gidTYPE end)
 Constructor for given validity interval.
 
gidTYPE teidpid ()
 Get composed time element id & param id.
 
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.
 

Private Attributes

gidTYPE teidpid_
 Time element id & parameter id.
 
gidTYPE arr_ [maxTID+1]
 Array of time ids.
 

Detailed Description

Struct to hold intervals of validity.

Definition at line 230 of file GlobalLabel.h.

Constructor & Destructor Documentation

◆ TimeInterval()

TimeInterval ( gidTYPE  TEIDPID,
gidTYPE  start,
gidTYPE  end 
)
inline

Constructor for given validity interval.

Parameters
TEIDPIDTime-dependent parameter id
startstart time id of validity
endend time id of validity

Definition at line 246 of file GlobalLabel.h.

247 {
248 teidpid_ = TEIDPID;
249 for (gidTYPE i = 0; i <= maxTID; i++) {
250 if (i >= start && i <= end)
251 arr_[i] = start;
252 else
253 arr_[i] = 0;
254 }
255 }
unsigned int gidTYPE
shortcut for main data type (unsigned int)
Definition: GlobalLabel.h:45
static const gidTYPE maxTID
max time slices for a parameter 1..999
Definition: GlobalLabel.h:50
gidTYPE teidpid_
Time element id & parameter id.
Definition: GlobalLabel.h:235
gidTYPE arr_[maxTID+1]
Array of time ids.
Definition: GlobalLabel.h:238

Member Function Documentation

◆ get()

gidTYPE get ( gidTYPE  timeid)
inline

Get the start time id for validity interval valid at given timeid.

Definition at line 261 of file GlobalLabel.h.

261{return arr_[timeid];}

◆ set()

void set ( gidTYPE  start,
gidTYPE  end 
)
inline

Set new parameter validity interval from start to end.

Definition at line 264 of file GlobalLabel.h.

265 {
266 for (gidTYPE i = 0; i <= maxTID; i++) {
267 if (i >= start && i <= end)
268 arr_[i] = start;
269 }
270 }

◆ teidpid()

gidTYPE teidpid ( )
inline

Get composed time element id & param id.

Definition at line 258 of file GlobalLabel.h.

258{return teidpid_;}

Member Data Documentation

◆ arr_

gidTYPE arr_[maxTID+1]
private

Array of time ids.

Definition at line 238 of file GlobalLabel.h.

◆ teidpid_

gidTYPE teidpid_
private

Time element id & parameter id.

Definition at line 235 of file GlobalLabel.h.


The documentation for this struct was generated from the following file: