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

Interface class to unique address for the MuST. More...

#include <CbmMustAddress.h>

Inheritance diagram for CbmMustAddress:
[legend]
Collaboration diagram for CbmMustAddress:
[legend]

Static Public Member Functions

static uint32_t GetAddress (int32_t station=0, int32_t layer=0, int32_t module=0, int32_t tube=0)
 
static uint32_t GetAddress (int32_t *elementIds)
 
static int32_t GetNofLevels ()
 
static int32_t GetNofBits (int32_t level)
 
static int32_t GetElementId (uint32_t address, int32_t level)
 
static int32_t GetSystemIndex (int32_t address)
 
static int32_t GetStationIndex (int32_t address)
 
static int32_t GetLayerIndex (int32_t address)
 
static int32_t GetModuleIndex (int32_t address)
 
static int32_t GetTubeIndex (int32_t address)
 
static int32_t GetElementAddress (int32_t address, int32_t level)
 
static void Print ()
 
static uint32_t SetElementId (uint32_t address, int32_t level, int32_t newId)
 
static int32_t GetNofSystemBits ()
 
static int32_t GetSystemId (uint32_t address)
 

Static Protected Attributes

static const int32_t fgkSystemBits = 4
 

Private Member Functions

 ClassDef (CbmMustAddress, 1)
 

Static Private Attributes

static const int32_t fgkBits [kMustNofLevels]
 
static const int32_t fgkShift [kMustNofLevels]
 
static const int32_t fgkMask [kMustNofLevels]
 

Detailed Description

Interface class to unique address for the MuST.

Author
R. Karabowicz <r.kar.nosp@m.abow.nosp@m.icz@g.nosp@m.si.d.nosp@m.e
Version
1.0

Based on CbmMuchAddress class by E.Kryshen e.kry.nosp@m.shen.nosp@m.@gsi..nosp@m.de

The CbmMustAddress interprets and modifies the unique address for the MuST by the proper bit operation on the address bit field.

The current definition of the bit field for the MuST is:

                                          3         2         1

Level Bits Max. Elements Shift 10987654321098765432109876543210
System (kMuST) 4 16 0 0000000000000000000000000000xxxx
Station 4 16 4 000000000000000000000000xxxx0000
Layer 4 16 8 00000000000000000000xxxx00000000
Module 8 256 22 000000000000xxxxxxxx000000000000
Tube 10 1024 30 00xxxxxxxxxx00000000000000000000

Definition at line 52 of file CbmMustAddress.h.

Member Function Documentation

◆ ClassDef()

CbmMustAddress::ClassDef ( CbmMustAddress ,
1  )
private

◆ GetAddress() [1/2]

uint32_t CbmMustAddress::GetAddress ( int32_t * elementIds)
static

Definition at line 64 of file CbmMustAddress.cxx.

References fgkBits, fgkShift, kMust, kMustNofLevels, kMustSystem, and ToIntegralType().

◆ GetAddress() [2/2]

uint32_t CbmMustAddress::GetAddress ( int32_t station = 0,
int32_t layer = 0,
int32_t module = 0,
int32_t tube = 0 )
static

Construct address

Parameters
stationStation index
layerLayer index in station
moduleModule index within layerside
tubeTube number
Returns
Unique element address

Definition at line 36 of file CbmMustAddress.cxx.

References fgkBits, fgkShift, kMust, kMustLayer, kMustModule, kMustStation, kMustSystem, kMustTube, and ToIntegralType().

Referenced by CbmMust::ProcessHits().

◆ GetElementAddress()

static int32_t CbmMustAddress::GetElementAddress ( int32_t address,
int32_t level )
inlinestatic

Definition at line 100 of file CbmMustAddress.h.

References fgkBits, and fgkShift.

Referenced by CbmMustTube::CompareTubeIndex().

◆ GetElementId()

static int32_t CbmMustAddress::GetElementId ( uint32_t address,
int32_t level )
inlinestatic

Get the index of an element

Parameters
addressUnique element address
levelHierarchy level
Returns
Element index

Definition at line 87 of file CbmMustAddress.h.

References fgkMask, fgkShift, and kMustNofLevels.

Referenced by GetLayerIndex(), GetModuleIndex(), GetStationIndex(), GetSystemIndex(), and GetTubeIndex().

◆ GetLayerIndex()

static int32_t CbmMustAddress::GetLayerIndex ( int32_t address)
inlinestatic

◆ GetModuleIndex()

static int32_t CbmMustAddress::GetModuleIndex ( int32_t address)
inlinestatic

Definition at line 97 of file CbmMustAddress.h.

References GetElementId(), and kMustModule.

Referenced by CbmMustPoint::GetModuleId(), and CbmMustLayer::GetTube().

◆ GetNofBits()

static int32_t CbmMustAddress::GetNofBits ( int32_t level)
inlinestatic

Get the number of bits for a given hierarchy level

Parameters
levelRequested element level
Returns
Number of bits in address field

Definition at line 79 of file CbmMustAddress.h.

References fgkBits, and kMustNofLevels.

◆ GetNofLevels()

static int32_t CbmMustAddress::GetNofLevels ( )
inlinestatic

Get the number of hierarchy levels For use in macros which do not include this header file.

Returns
Number of hierarchy levels

Definition at line 72 of file CbmMustAddress.h.

References kMustNofLevels.

◆ GetNofSystemBits()

static int32_t CbmAddress::GetNofSystemBits ( )
inlinestaticinherited

Number of bits for system Id in the address field

Returns
Number of bits

Definition at line 40 of file CbmAddress.h.

References fgkSystemBits.

Referenced by TEST().

◆ GetStationIndex()

static int32_t CbmMustAddress::GetStationIndex ( int32_t address)
inlinestatic

Definition at line 95 of file CbmMustAddress.h.

References GetElementId(), and kMustStation.

Referenced by CbmMustPoint::GetStationId().

◆ GetSystemId()

static int32_t CbmAddress::GetSystemId ( uint32_t address)
inlinestaticinherited

Get the system Id from the address

Parameters
addressUnique address
Returns
systemId

Definition at line 47 of file CbmAddress.h.

References fgkSystemBits.

Referenced by cbm::GeoNodeMap::ApplyMask(), cbm::GeoNodeMap::GetVolumeProperties(), CbmRecoSts::ProcessData(), CbmRecoStsPixel::ProcessData(), cbm::GeoNodeMap::ReadGeoVolume(), and TEST().

◆ GetSystemIndex()

static int32_t CbmMustAddress::GetSystemIndex ( int32_t address)
inlinestatic

Derivatives

Definition at line 94 of file CbmMustAddress.h.

References GetElementId(), and kMustSystem.

◆ GetTubeIndex()

static int32_t CbmMustAddress::GetTubeIndex ( int32_t address)
inlinestatic

Definition at line 98 of file CbmMustAddress.h.

References GetElementId(), and kMustTube.

Referenced by CbmMustModule::GetTubeByAddress(), and CbmMustPoint::GetTubeId().

◆ Print()

void CbmMustAddress::Print ( )
static

Print information on the bit field

Definition at line 83 of file CbmMustAddress.cxx.

References fgkBits, fgkMask, and kMustNofLevels.

◆ SetElementId()

uint32_t CbmMustAddress::SetElementId ( uint32_t address,
int32_t level,
int32_t newId )
static

Set the index of an element leaving the other element levels untouched

Parameters
addressUnique element address
levelHierarchy level
newIdNew element index
Returns
New address

Definition at line 94 of file CbmMustAddress.cxx.

References fgkBits, fgkMask, fgkShift, and kMustNofLevels.

Member Data Documentation

◆ fgkBits

const int32_t CbmMustAddress::fgkBits
staticprivate
Initial value:
4,
4,
8,
10}
static const int32_t fgkSystemBits
Definition CbmAddress.h:52

Number of bits for the different levels

Definition at line 15 of file CbmMustAddress.h.

Referenced by GetAddress(), GetAddress(), GetElementAddress(), GetNofBits(), Print(), and SetElementId().

◆ fgkMask

const int32_t CbmMustAddress::fgkMask
staticprivate
Initial value:
= {(1 << fgkBits[0]) - 1, (1 << fgkBits[1]) - 1, (1 << fgkBits[2]) - 1,
(1 << fgkBits[3]) - 1, (1 << fgkBits[4]) - 1}
static const int32_t fgkBits[kMuchNofLevels]

Bit masks for the different levels

Definition at line 30 of file CbmMustAddress.h.

Referenced by GetElementId(), Print(), and SetElementId().

◆ fgkShift

const int32_t CbmMustAddress::fgkShift
staticprivate
Initial value:

Bit shifts for the different levels

Definition at line 23 of file CbmMustAddress.h.

Referenced by GetAddress(), GetAddress(), GetElementAddress(), GetElementId(), and SetElementId().

◆ fgkSystemBits

const int32_t CbmAddress::fgkSystemBits = 4
staticprotectedinherited

Number of bits for system Id in the address field

Definition at line 52 of file CbmAddress.h.

Referenced by GetNofSystemBits(), GetSystemId(), and CbmTofAddress::GetUniqueAddress().


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