CbmRoot
Loading...
Searching...
No Matches
CbmPsdAddress Class Reference

CBM PSD interface class to the unique address. More...

#include <CbmPsdAddress.h>

Static Public Member Functions

static uint32_t GetAddress (int32_t moduleId, int32_t sectionId)
 Return address from system ID, module, Section.
 
static uint32_t GetSystemId (uint32_t address)
 Return System identifier from address.
 
static uint32_t GetModuleId (uint32_t address)
 Return module ID from address.
 
static uint32_t GetSectionId (uint32_t address)
 Return sector ID from address.
 
static uint32_t SetModuleId (uint32_t address, int32_t newModuleId)
 Set new module ID for address.
 
static uint32_t SetSectionId (uint32_t address, int32_t newSectionId)
 Set new section ID for address.
 

Static Private Attributes

static const int32_t fgkSystemIdLength = 15
 
static const int32_t fgkModuleIdLength = 63
 
static const int32_t fgkSectionIdLength = 31
 
static const int32_t fgkSystemIdShift = 0
 
static const int32_t fgkModuleIdShift = 4
 
static const int32_t fgkSectionIdShift = 10
 

Detailed Description

CBM PSD interface class to the unique address.

Author
Nikolay Karpushkin karpu.nosp@m.shki.nosp@m.n@inr.nosp@m..ru
Version
1.0

CbmPsdAddress is the class for the concrete interfaces to the unique address, which is encoded in a 32-bit field (int32_t), for the PSD detector elements.

                                3         2         1         0   Shift  Bits  Values

Current definition: 10987654321098765432109876543210 System ID (ECbmModuleId::kPsd=8) on bits 0- 3 00000000000000000000000000001111 << 0 4 15 Module ID on bits 4- 9 00000000000000000000001111110000 << 4 6 63 Section ID on bits 10-14 00000000000000000111110000000000 <<10 5 31 // to be reduced to 15 Empty on bits 15-31 11111111111111111000000000000000 <<16 17 2^17-1

Definition at line 35 of file CbmPsdAddress.h.

Member Function Documentation

◆ GetAddress()

static uint32_t CbmPsdAddress::GetAddress ( int32_t moduleId,
int32_t sectionId )
inlinestatic

Return address from system ID, module, Section.

Parameters
[in]moduleIdModule ID.
[in]SectionIdSection ID.
Returns
Address from system ID, module, Section.

Definition at line 43 of file CbmPsdAddress.h.

References fgkModuleIdLength, fgkModuleIdShift, fgkSectionIdLength, fgkSectionIdShift, fgkSystemIdShift, kPsd, and ToIntegralType().

Referenced by CbmPsdDigi::CbmPsdDigi(), CbmPsdSimpleDigitizer::Exec(), CbmMcbm2018UnpackerAlgoPsd::InitParameters(), CbmPsdUnpackAlgo::initParSet(), CbmPsdDigi::SetAddress(), SetModuleId(), and SetSectionId().

◆ GetModuleId()

static uint32_t CbmPsdAddress::GetModuleId ( uint32_t address)
inlinestatic

Return module ID from address.

Parameters
[in]addressUnique channel address.
Returns
Module ID from address.

Definition at line 65 of file CbmPsdAddress.h.

References fgkModuleIdLength, and fgkModuleIdShift.

Referenced by comparePsdAddressDataMembers(), CbmPsdDigi::GetModuleID(), CbmPsdDsp::GetModuleID(), and SetSectionId().

◆ GetSectionId()

static uint32_t CbmPsdAddress::GetSectionId ( uint32_t address)
inlinestatic

Return sector ID from address.

Parameters
[in]addressUnique channel address.
Returns
Sector ID from address.

Definition at line 75 of file CbmPsdAddress.h.

References fgkSectionIdLength, and fgkSectionIdShift.

Referenced by CbmMcbmCheckTimingAlgo::CheckInterSystemOffset(), comparePsdAddressDataMembers(), CbmMcbmCheckTimingAlgo::FillTimeOffsetHistos(), CbmPsdDigi::GetSectionID(), CbmPsdDsp::GetSectionID(), and SetModuleId().

◆ GetSystemId()

static uint32_t CbmPsdAddress::GetSystemId ( uint32_t address)
inlinestatic

Return System identifier from address.

Parameters
[in]addressUnique channel address.
Returns
System identifier from address.

Definition at line 55 of file CbmPsdAddress.h.

References fgkSystemIdLength, and fgkSystemIdShift.

Referenced by comparePsdAddressDataMembers().

◆ SetModuleId()

static uint32_t CbmPsdAddress::SetModuleId ( uint32_t address,
int32_t newModuleId )
inlinestatic

Set new module ID for address.

Parameters
addressCurrent address.
newModuleIdNew value for module ID.
Returns
New address with modified module ID.

Definition at line 86 of file CbmPsdAddress.h.

References fgkModuleIdLength, GetAddress(), and GetSectionId().

Referenced by TEST().

◆ SetSectionId()

static uint32_t CbmPsdAddress::SetSectionId ( uint32_t address,
int32_t newSectionId )
inlinestatic

Set new section ID for address.

Parameters
addressCurrent address.
newSectionIdNew value for section ID.
Returns
New address with modified section ID.

Definition at line 98 of file CbmPsdAddress.h.

References fgkSectionIdLength, GetAddress(), and GetModuleId().

Referenced by TEST().

Member Data Documentation

◆ fgkModuleIdLength

const int32_t CbmPsdAddress::fgkModuleIdLength = 63
staticprivate

Definition at line 108 of file CbmPsdAddress.h.

Referenced by GetAddress(), GetModuleId(), and SetModuleId().

◆ fgkModuleIdShift

const int32_t CbmPsdAddress::fgkModuleIdShift = 4
staticprivate

Definition at line 113 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetModuleId().

◆ fgkSectionIdLength

const int32_t CbmPsdAddress::fgkSectionIdLength = 31
staticprivate

Definition at line 109 of file CbmPsdAddress.h.

Referenced by GetAddress(), GetSectionId(), and SetSectionId().

◆ fgkSectionIdShift

const int32_t CbmPsdAddress::fgkSectionIdShift = 10
staticprivate

Definition at line 114 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetSectionId().

◆ fgkSystemIdLength

const int32_t CbmPsdAddress::fgkSystemIdLength = 15
staticprivate

Definition at line 107 of file CbmPsdAddress.h.

Referenced by GetSystemId().

◆ fgkSystemIdShift

const int32_t CbmPsdAddress::fgkSystemIdShift = 0
staticprivate

Definition at line 112 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetSystemId().


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