ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ActsTrk::detail::MeasurementRange Struct Reference

#include <AtlasUncalibSourceLinkAccessor.h>

Inheritance diagram for ActsTrk::detail::MeasurementRange:
Collaboration diagram for ActsTrk::detail::MeasurementRange:

Public Member Functions

bool isConsistentRange () const
 
 MeasurementRange ()
 
 MeasurementRange (unsigned int container_idx, unsigned int start_element_idx, unsigned int end_element_idx)
 
void updateEnd (std::size_t container_idx, unsigned int end_element_idx)
 
unsigned int containerIndex () const
 
unsigned int elementBeginIndex () const
 
unsigned int elementEndIndex () const
 
bool empty () const
 

Static Public Member Functions

static constexpr unsigned int createRangeValue (unsigned int container_idx, unsigned int index)
 
static constexpr unsigned int extractContainerIndex (unsigned int value)
 
static constexpr unsigned int extractElementIndex (unsigned int value)
 

Static Public Attributes

static constexpr unsigned int CONTAINER_IDX_SHIFT = 28
 
static constexpr unsigned int CONTAINER_IDX_MASK = (1u << 31) | (1u << 30) | (1u << 29) | (1u << 28)
 
static constexpr unsigned int ELEMENT_IDX_MASK = ~CONTAINER_IDX_MASK
 

Detailed Description

Definition at line 23 of file AtlasUncalibSourceLinkAccessor.h.

Constructor & Destructor Documentation

◆ MeasurementRange() [1/2]

ActsTrk::detail::MeasurementRange::MeasurementRange ( )
inline

Definition at line 45 of file AtlasUncalibSourceLinkAccessor.h.

45 : std::pair<unsigned int, unsigned int>(std::numeric_limits<unsigned int>::max(), std::numeric_limits<unsigned int>::max()) {}

◆ MeasurementRange() [2/2]

ActsTrk::detail::MeasurementRange::MeasurementRange ( unsigned int  container_idx,
unsigned int  start_element_idx,
unsigned int  end_element_idx 
)
inline

Definition at line 46 of file AtlasUncalibSourceLinkAccessor.h.

47  : std::pair<unsigned int, unsigned int>( createRangeValue(container_idx, start_element_idx),
48  createRangeValue(container_idx, end_element_idx) ) {
49  }

Member Function Documentation

◆ containerIndex()

unsigned int ActsTrk::detail::MeasurementRange::containerIndex ( ) const
inline

Definition at line 56 of file AtlasUncalibSourceLinkAccessor.h.

57  {
58  assert(isConsistentRange());
59  return extractContainerIndex(this->first);
60  }

◆ createRangeValue()

static constexpr unsigned int ActsTrk::detail::MeasurementRange::createRangeValue ( unsigned int  container_idx,
unsigned int  index 
)
inlinestaticconstexpr

Definition at line 28 of file AtlasUncalibSourceLinkAccessor.h.

29  {
30  assert(container_idx < (1u << (32 - CONTAINER_IDX_SHIFT)));
31  assert((index & CONTAINER_IDX_MASK) == 0u);
32  return (container_idx << CONTAINER_IDX_SHIFT) | index;
33  }

◆ elementBeginIndex()

unsigned int ActsTrk::detail::MeasurementRange::elementBeginIndex ( ) const
inline

Definition at line 61 of file AtlasUncalibSourceLinkAccessor.h.

62  {
63  assert(isConsistentRange());
64  return extractElementIndex(this->first);
65  }

◆ elementEndIndex()

unsigned int ActsTrk::detail::MeasurementRange::elementEndIndex ( ) const
inline

Definition at line 66 of file AtlasUncalibSourceLinkAccessor.h.

67  {
68  assert(isConsistentRange());
69  return extractElementIndex(this->second);
70  }

◆ empty()

bool ActsTrk::detail::MeasurementRange::empty ( ) const
inline

Definition at line 71 of file AtlasUncalibSourceLinkAccessor.h.

71 { assert(isConsistentRange()); return this->first == this->second; }

◆ extractContainerIndex()

static constexpr unsigned int ActsTrk::detail::MeasurementRange::extractContainerIndex ( unsigned int  value)
inlinestaticconstexpr

Definition at line 34 of file AtlasUncalibSourceLinkAccessor.h.

34  {
36  }

◆ extractElementIndex()

static constexpr unsigned int ActsTrk::detail::MeasurementRange::extractElementIndex ( unsigned int  value)
inlinestaticconstexpr

Definition at line 37 of file AtlasUncalibSourceLinkAccessor.h.

37  {
38  return value & ELEMENT_IDX_MASK;
39  }

◆ isConsistentRange()

bool ActsTrk::detail::MeasurementRange::isConsistentRange ( ) const
inline

Definition at line 40 of file AtlasUncalibSourceLinkAccessor.h.

40  {
43  }

◆ updateEnd()

void ActsTrk::detail::MeasurementRange::updateEnd ( std::size_t  container_idx,
unsigned int  end_element_idx 
)
inline

Definition at line 51 of file AtlasUncalibSourceLinkAccessor.h.

51  {
52  assert( extractContainerIndex(this->first) == container_idx);
53  this->second = createRangeValue(container_idx, end_element_idx);
54  }

Member Data Documentation

◆ CONTAINER_IDX_MASK

constexpr unsigned int ActsTrk::detail::MeasurementRange::CONTAINER_IDX_MASK = (1u << 31) | (1u << 30) | (1u << 29) | (1u << 28)
staticconstexpr

Definition at line 26 of file AtlasUncalibSourceLinkAccessor.h.

◆ CONTAINER_IDX_SHIFT

constexpr unsigned int ActsTrk::detail::MeasurementRange::CONTAINER_IDX_SHIFT = 28
staticconstexpr

Definition at line 25 of file AtlasUncalibSourceLinkAccessor.h.

◆ ELEMENT_IDX_MASK

constexpr unsigned int ActsTrk::detail::MeasurementRange::ELEMENT_IDX_MASK = ~CONTAINER_IDX_MASK
staticconstexpr

Definition at line 27 of file AtlasUncalibSourceLinkAccessor.h.


The documentation for this struct was generated from the following file:
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
ActsTrk::detail::MeasurementRange::createRangeValue
static constexpr unsigned int createRangeValue(unsigned int container_idx, unsigned int index)
Definition: AtlasUncalibSourceLinkAccessor.h:28
ActsTrk::detail::MeasurementRange::extractContainerIndex
static constexpr unsigned int extractContainerIndex(unsigned int value)
Definition: AtlasUncalibSourceLinkAccessor.h:34
index
Definition: index.py:1
ActsTrk::detail::MeasurementRange::extractElementIndex
static constexpr unsigned int extractElementIndex(unsigned int value)
Definition: AtlasUncalibSourceLinkAccessor.h:37
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
athena.value
value
Definition: athena.py:124
ActsTrk::detail::MeasurementRange::CONTAINER_IDX_SHIFT
static constexpr unsigned int CONTAINER_IDX_SHIFT
Definition: AtlasUncalibSourceLinkAccessor.h:25
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
ActsTrk::detail::MeasurementRange::ELEMENT_IDX_MASK
static constexpr unsigned int ELEMENT_IDX_MASK
Definition: AtlasUncalibSourceLinkAccessor.h:27
DeMoScan.index
string index
Definition: DeMoScan.py:364
DeMoScan.first
bool first
Definition: DeMoScan.py:536
ActsTrk::detail::MeasurementRange::isConsistentRange
bool isConsistentRange() const
Definition: AtlasUncalibSourceLinkAccessor.h:40
ActsTrk::detail::MeasurementRange::CONTAINER_IDX_MASK
static constexpr unsigned int CONTAINER_IDX_MASK
Definition: AtlasUncalibSourceLinkAccessor.h:26