CbmRoot
CbmPsdAddress Class Reference

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

#include <CbmPsdAddress.h>

Static Public Member Functions

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

Static Private Attributes

static const Int_t fgkSystemIdLength = 15
 
static const Int_t fgkModuleIdLength = 63
 
static const Int_t fgkSectionIdLength = 31
 
static const Int_t fgkSystemIdShift = 0
 
static const Int_t fgkModuleIdShift = 4
 
static const Int_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 (Int_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 30 of file CbmPsdAddress.h.

Member Function Documentation

◆ GetAddress()

static UInt_t CbmPsdAddress::GetAddress ( Int_t  moduleId,
Int_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 38 of file CbmPsdAddress.h.

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

Referenced by CbmPsdDigi::CbmPsdDigi(), CbmMcbm2018UnpackerAlgoPsd::InitParameters(), CbmPsdDigi::SetAddress(), SetModuleId(), and SetSectionId().

◆ GetModuleId()

static UInt_t CbmPsdAddress::GetModuleId ( UInt_t  address)
inlinestatic

Return module ID from address.

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

Definition at line 60 of file CbmPsdAddress.h.

References fgkModuleIdLength, and fgkModuleIdShift.

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

◆ GetSectionId()

static UInt_t CbmPsdAddress::GetSectionId ( UInt_t  address)
inlinestatic

Return sector ID from address.

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

Definition at line 70 of file CbmPsdAddress.h.

References fgkSectionIdLength, and fgkSectionIdShift.

Referenced by comparePsdAddressDataMembers(), CbmPsdDigi::GetSectionID(), and SetModuleId().

◆ GetSystemId()

static UInt_t CbmPsdAddress::GetSystemId ( UInt_t  address)
inlinestatic

Return System identifier from address.

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

Definition at line 50 of file CbmPsdAddress.h.

References fgkSystemIdLength, and fgkSystemIdShift.

Referenced by comparePsdAddressDataMembers().

◆ SetModuleId()

static UInt_t CbmPsdAddress::SetModuleId ( UInt_t  address,
Int_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 81 of file CbmPsdAddress.h.

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

Referenced by TEST().

◆ SetSectionId()

static UInt_t CbmPsdAddress::SetSectionId ( UInt_t  address,
Int_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 92 of file CbmPsdAddress.h.

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

Referenced by TEST().

Member Data Documentation

◆ fgkModuleIdLength

const Int_t CbmPsdAddress::fgkModuleIdLength = 63
staticprivate

Definition at line 101 of file CbmPsdAddress.h.

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

◆ fgkModuleIdShift

const Int_t CbmPsdAddress::fgkModuleIdShift = 4
staticprivate

Definition at line 106 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetModuleId().

◆ fgkSectionIdLength

const Int_t CbmPsdAddress::fgkSectionIdLength = 31
staticprivate

Definition at line 102 of file CbmPsdAddress.h.

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

◆ fgkSectionIdShift

const Int_t CbmPsdAddress::fgkSectionIdShift = 10
staticprivate

Definition at line 107 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetSectionId().

◆ fgkSystemIdLength

const Int_t CbmPsdAddress::fgkSystemIdLength = 15
staticprivate

Definition at line 100 of file CbmPsdAddress.h.

Referenced by GetSystemId().

◆ fgkSystemIdShift

const Int_t CbmPsdAddress::fgkSystemIdShift = 0
staticprivate

Definition at line 105 of file CbmPsdAddress.h.

Referenced by GetAddress(), and GetSystemId().


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