Project
Loading...
Searching...
No Matches
o2::mch::ChannelCode Class Reference

#include <ChannelCode.h>

Public Member Functions

 ChannelCode ()=default
 
 ChannelCode (uint16_t deId, uint16_t dePadIndex)
 
 ChannelCode (uint16_t solarId, uint8_t elinkIndex, uint8_t channel)
 
uint16_t getDeId () const
 
uint16_t getDePadIndex () const
 
uint16_t getDsId () const
 
uint16_t getDsIndex () const
 
uint16_t getSolarId () const
 
uint16_t getSolarIndex () const
 
uint8_t getChannel () const
 
uint8_t getDeIndex () const
 
uint8_t getElinkId () const
 
uint8_t getElinkIndex () const
 
bool isValid () const
 
uint64_t value () const
 

Detailed Description

64-bits identifier of a MCH channel.

The ChannelCode class encodes in a 64 bits integer the following information about a MCH channel :

  • detection element identifier (and index)
  • pad index within the detection element
  • dual sampa identifier (and index)
  • solar identifier (and index)
  • elink identifier (or index, those are the same)
  • channel number

This class serves the same purposes as DsChannelId, but using two different "coordinate systems" to reference the elements within the spectrometer, while DsChannelId uses only one. DsChannelId is readout/online oriented, while ChannelCode is both reconstruction/offline and readout/online oriented. But at a cost of twice the size.

Note that while this class is internal storing indices-, it also offer getters for _identifiers (Ids).

Definition at line 46 of file ChannelCode.h.

Constructor & Destructor Documentation

◆ ChannelCode() [1/3]

o2::mch::ChannelCode::ChannelCode ( )
default

◆ ChannelCode() [2/3]

o2::mch::ChannelCode::ChannelCode ( uint16_t  deId,
uint16_t  dePadIndex 
)

Ctor using "detector oriented" numbering.

Parameters
deIddetection element identifier (e.g. 100, 502, 1025)
dePadIndexpad index within the detection element [0..(npads in DE)-1]
Exceptions
runtime_errorif (deId,dePadIndex) is not a valid combination

Definition at line 22 of file ChannelCode.cxx.

◆ ChannelCode() [3/3]

o2::mch::ChannelCode::ChannelCode ( uint16_t  solarId,
uint8_t  elinkIndex,
uint8_t  channel 
)

Ctor using "electronics oriented" numbering.

Parameters
solarIdsolar identifier
elinkIndexelink index 0..39
channelchannel number 0..63
Exceptions
runtime_errorif (solarId,elinkIndex,channel) is not a valid combination

Note that elinkIndex is also called elinkId equivalently in some other parts of the code, as for elink the id is the index.

Definition at line 56 of file ChannelCode.cxx.

Member Function Documentation

◆ getChannel()

uint8_t o2::mch::ChannelCode::getChannel ( ) const

return the dual sampa channel (0..63)

Definition at line 137 of file ChannelCode.cxx.

◆ getDeId()

uint16_t o2::mch::ChannelCode::getDeId ( ) const

return the detection element identifier

Definition at line 142 of file ChannelCode.cxx.

◆ getDeIndex()

uint8_t o2::mch::ChannelCode::getDeIndex ( ) const

return the detection element index (0..155)

Definition at line 112 of file ChannelCode.cxx.

◆ getDePadIndex()

uint16_t o2::mch::ChannelCode::getDePadIndex ( ) const

return the pad index within the detection element. It's in the range 0..(npads in DE)-1)

Definition at line 117 of file ChannelCode.cxx.

◆ getDsId()

uint16_t o2::mch::ChannelCode::getDsId ( ) const

return the dual sampa identifier

Definition at line 148 of file ChannelCode.cxx.

◆ getDsIndex()

uint16_t o2::mch::ChannelCode::getDsIndex ( ) const

return the dual sampa index (0..16819)

Definition at line 122 of file ChannelCode.cxx.

◆ getElinkId()

uint8_t o2::mch::ChannelCode::getElinkId ( ) const

return the elink identifier = index (0..39)

Definition at line 132 of file ChannelCode.cxx.

◆ getElinkIndex()

uint8_t o2::mch::ChannelCode::getElinkIndex ( ) const
inline

return the elink index = identifier (0..39)

Definition at line 91 of file ChannelCode.h.

◆ getSolarId()

uint16_t o2::mch::ChannelCode::getSolarId ( ) const

return the solar identifier

Definition at line 155 of file ChannelCode.cxx.

◆ getSolarIndex()

uint16_t o2::mch::ChannelCode::getSolarIndex ( ) const

return the solar index (0..623)

Definition at line 127 of file ChannelCode.cxx.

◆ isValid()

bool o2::mch::ChannelCode::isValid ( ) const
inline

Definition at line 99 of file ChannelCode.h.

◆ value()

uint64_t o2::mch::ChannelCode::value ( ) const
inline

Definition at line 102 of file ChannelCode.h.


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