Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
bool isMeasurementExpected () 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 MeasurementRange noMeasurementExpected ()
 

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 46 of file AtlasUncalibSourceLinkAccessor.h.

46 : 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 47 of file AtlasUncalibSourceLinkAccessor.h.

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

Member Function Documentation

◆ containerIndex()

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

Definition at line 63 of file AtlasUncalibSourceLinkAccessor.h.

64  {
65  assert(isConsistentRange());
66  return extractContainerIndex(this->first);
67  }

◆ 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 68 of file AtlasUncalibSourceLinkAccessor.h.

69  {
70  assert(isConsistentRange());
71  return extractElementIndex(this->first);
72  }

◆ elementEndIndex()

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

Definition at line 73 of file AtlasUncalibSourceLinkAccessor.h.

74  {
75  assert(isConsistentRange());
76  return extractElementIndex(this->second);
77  }

◆ empty()

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

Definition at line 78 of file AtlasUncalibSourceLinkAccessor.h.

78 { 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  {
44  }

◆ isMeasurementExpected()

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

Definition at line 79 of file AtlasUncalibSourceLinkAccessor.h.

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

◆ noMeasurementExpected()

static MeasurementRange ActsTrk::detail::MeasurementRange::noMeasurementExpected ( )
inlinestatic

Definition at line 52 of file AtlasUncalibSourceLinkAccessor.h.

52  {
55  0);
56  }

◆ updateEnd()

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

Definition at line 58 of file AtlasUncalibSourceLinkAccessor.h.

58  {
59  assert( extractContainerIndex(this->first) == container_idx);
60  this->second = createRangeValue(container_idx, end_element_idx);
61  }

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::MeasurementRange
MeasurementRange()
Definition: AtlasUncalibSourceLinkAccessor.h:46
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