Belle II Software development
SVDOnlineToOfflineMap::ChipID Class Reference

Class to hold FADC+APV25 numbers. More...

#include <SVDOnlineToOfflineMap.h>

Public Types

typedef unsigned short baseType
 Typedefs of the compound id type and chip number types.
 
typedef unsigned char chipNumberType
 Type of chip numbers.
 

Public Member Functions

 ChipID (baseType id=0)
 Constructor taking a compound id.
 
 ChipID (chipNumberType FADC, chipNumberType APV25)
 Constructor taking chip numbers.
 
 ChipID (const ChipID &other)
 Copy ctor.
 
ChipIDoperator= (ChipID other)
 Assignment from same type.
 
ChipIDoperator= (baseType id)
 Assignment from base type.
 
 operator baseType ()
 cast to base type
 
bool operator== (const ChipID &other) const
 equality
 
bool operator< (const ChipID &other) const
 ordering
 
baseType getID () const
 Get chip ID.
 
chipNumberType getFADC () const
 Get FADC number.
 
chipNumberType getAPV25 () const
 Get APV25 number.
 
void setID (baseType id)
 Set chip ID.
 
void setFADC (chipNumberType FADC)
 Set FADC number.
 
void setAPV25 (chipNumberType APV25)
 Set APV25 number.
 

Private Attributes

union {
   baseType   id: 8 * sizeof(baseType)
 unique id More...
 
   struct {
      chipNumberType   FADC: 8 * sizeof(chipNumberType)
 
      chipNumberType   APV25: 8 * sizeof(chipNumberType)
 
   }   parts
 Alternative struct representation.
 
m_id
 Union type representing the ChipID compound.
 

Detailed Description

Class to hold FADC+APV25 numbers.

Definition at line 37 of file SVDOnlineToOfflineMap.h.

Member Typedef Documentation

◆ baseType

typedef unsigned short baseType

Typedefs of the compound id type and chip number types.

Definition at line 40 of file SVDOnlineToOfflineMap.h.

◆ chipNumberType

typedef unsigned char chipNumberType

Type of chip numbers.

Definition at line 42 of file SVDOnlineToOfflineMap.h.

Constructor & Destructor Documentation

◆ ChipID() [1/3]

ChipID ( baseType  id = 0)
inlineexplicit

Constructor taking a compound id.

Definition at line 46 of file SVDOnlineToOfflineMap.h.

46{ m_id.id = id; }
union Belle2::SVDOnlineToOfflineMap::ChipID::@250 m_id
Union type representing the ChipID compound.

◆ ChipID() [2/3]

ChipID ( chipNumberType  FADC,
chipNumberType  APV25 
)
inline

Constructor taking chip numbers.

Definition at line 48 of file SVDOnlineToOfflineMap.h.

49 { m_id.parts.FADC = FADC; m_id.parts.APV25 = APV25; }

◆ ChipID() [3/3]

ChipID ( const ChipID other)
inline

Copy ctor.

Definition at line 51 of file SVDOnlineToOfflineMap.h.

51: m_id(other.m_id) {}

Member Function Documentation

◆ getAPV25()

chipNumberType getAPV25 ( ) const
inline

Get APV25 number.

Definition at line 70 of file SVDOnlineToOfflineMap.h.

70{return m_id.parts.APV25; }

◆ getFADC()

chipNumberType getFADC ( ) const
inline

Get FADC number.

Definition at line 68 of file SVDOnlineToOfflineMap.h.

68{return m_id.parts.FADC; }

◆ getID()

baseType getID ( ) const
inline

Get chip ID.

Definition at line 66 of file SVDOnlineToOfflineMap.h.

66{ return m_id.id; }

◆ operator baseType()

operator baseType ( )
inline

cast to base type

Definition at line 58 of file SVDOnlineToOfflineMap.h.

58{ return m_id.id; }

◆ operator<()

bool operator< ( const ChipID other) const
inline

ordering

Definition at line 62 of file SVDOnlineToOfflineMap.h.

62{ return (m_id.id < other.m_id.id); }

◆ operator=() [1/2]

ChipID & operator= ( baseType  id)
inline

Assignment from base type.

Definition at line 56 of file SVDOnlineToOfflineMap.h.

56{ m_id.id = id; return *this; }

◆ operator=() [2/2]

ChipID & operator= ( ChipID  other)
inline

Assignment from same type.

Definition at line 54 of file SVDOnlineToOfflineMap.h.

54{ m_id.id = other.m_id.id; return *this; }

◆ operator==()

bool operator== ( const ChipID other) const
inline

equality

Definition at line 60 of file SVDOnlineToOfflineMap.h.

60{ return (m_id.id == other.m_id.id); }

◆ setAPV25()

void setAPV25 ( chipNumberType  APV25)
inline

Set APV25 number.

Definition at line 76 of file SVDOnlineToOfflineMap.h.

76{ m_id.parts.APV25 = APV25; }

◆ setFADC()

void setFADC ( chipNumberType  FADC)
inline

Set FADC number.

Definition at line 74 of file SVDOnlineToOfflineMap.h.

74{ m_id.parts.FADC = FADC; }

◆ setID()

void setID ( baseType  id)
inline

Set chip ID.

Definition at line 72 of file SVDOnlineToOfflineMap.h.

72{ m_id.id = id; }

Member Data Documentation

◆ APV25

Definition at line 86 of file SVDOnlineToOfflineMap.h.

◆ FADC

Definition at line 85 of file SVDOnlineToOfflineMap.h.

◆ id

unique id

Definition at line 82 of file SVDOnlineToOfflineMap.h.


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