ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ITkStripOnlineId Class Reference

#include <ITkStripOnlineId.h>

Collaboration diagram for ITkStripOnlineId:

Public Types

enum  { INVALID_FIBRE =255, INVALID_ROD =16777215, INVALID_ONLINE_ID =0xFFFFFFFF }
 

Public Member Functions

 ITkStripOnlineId ()=default
 Default constructor produces an invalid serial number. More...
 
 ITkStripOnlineId (const std::uint32_t onlineId)
 Construct from uint32. More...
 
 ITkStripOnlineId (const std::uint32_t rodId, const std::uint32_t fibre)
 Construct from robId and fibre; a cursory check is made on validity of the input. More...
 
std::uint32_t rod () const
 Return the rod/rob Id. More...
 
std::uint32_t fibre () const
 Return the fibre. More...
 
 operator unsigned int () const
 Overload cast to uint. More...
 
auto operator (const ITkStripOnlineId &other) const =default
 Equality etc. More...
 
bool isValid () const
 

Private Attributes

std::uint32_t m_onlineId {INVALID_ONLINE_ID}
 

Friends

std::ostream & operator<< (std::ostream &os, const ITkStripOnlineId &id)
 representation for debugging, messages More...
 

Detailed Description

Definition at line 16 of file ITkStripOnlineId.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INVALID_FIBRE 
INVALID_ROD 
INVALID_ONLINE_ID 

Definition at line 37 of file ITkStripOnlineId.h.

37  {
38  INVALID_FIBRE=255, INVALID_ROD=16777215, INVALID_ONLINE_ID=0xFFFFFFFF
39  };

Constructor & Destructor Documentation

◆ ITkStripOnlineId() [1/3]

ITkStripOnlineId::ITkStripOnlineId ( )
default

Default constructor produces an invalid serial number.

◆ ITkStripOnlineId() [2/3]

ITkStripOnlineId::ITkStripOnlineId ( const std::uint32_t  onlineId)

Construct from uint32.

Definition at line 9 of file ITkStripOnlineId.cxx.

9  :m_onlineId(onlineId){
10  //nop
11 }

◆ ITkStripOnlineId() [3/3]

ITkStripOnlineId::ITkStripOnlineId ( const std::uint32_t  rodId,
const std::uint32_t  fibre 
)

Construct from robId and fibre; a cursory check is made on validity of the input.

Definition at line 14 of file ITkStripOnlineId.cxx.

14  {
15  m_onlineId = rodId + (fibre<<24);
16 }

Member Function Documentation

◆ fibre()

std::uint32_t ITkStripOnlineId::fibre ( ) const

Return the fibre.

Definition at line 25 of file ITkStripOnlineId.cxx.

25  {
26  return m_onlineId>>24;
27 }

◆ isValid()

bool ITkStripOnlineId::isValid ( ) const

Definition at line 30 of file ITkStripOnlineId.cxx.

30  {
31  return m_onlineId != INVALID_ONLINE_ID;
32 }

◆ operator()

auto ITkStripOnlineId::operator ( const ITkStripOnlineId other) const
default

Equality etc.

◆ operator unsigned int()

ITkStripOnlineId::operator unsigned int ( ) const
inlineexplicit

Overload cast to uint.

Definition at line 31 of file ITkStripOnlineId.h.

31 {return m_onlineId;}

◆ rod()

std::uint32_t ITkStripOnlineId::rod ( ) const

Return the rod/rob Id.

Definition at line 19 of file ITkStripOnlineId.cxx.

19  {
20  return m_onlineId & 0xFFFFFF;
21 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const ITkStripOnlineId id 
)
friend

representation for debugging, messages

Definition at line 34 of file ITkStripOnlineId.cxx.

34  {
35  os<<std::hex<<std::showbase<<id.m_onlineId<<std::dec<<std::noshowbase;
36  return os;
37 }

Member Data Documentation

◆ m_onlineId

std::uint32_t ITkStripOnlineId::m_onlineId {INVALID_ONLINE_ID}
private

Definition at line 41 of file ITkStripOnlineId.h.


The documentation for this class was generated from the following files:
ITkStripOnlineId::INVALID_ROD
@ INVALID_ROD
Definition: ITkStripOnlineId.h:38
ITkStripOnlineId::fibre
std::uint32_t fibre() const
Return the fibre.
Definition: ITkStripOnlineId.cxx:25
ITkStripOnlineId::m_onlineId
std::uint32_t m_onlineId
Definition: ITkStripOnlineId.h:41
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ITkStripOnlineId::INVALID_ONLINE_ID
@ INVALID_ONLINE_ID
Definition: ITkStripOnlineId.h:38
ITkStripOnlineId::INVALID_FIBRE
@ INVALID_FIBRE
Definition: ITkStripOnlineId.h:38