BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsAddress Class Reference

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

#include <CbmStsAddress.h>

Inheritance diagram for CbmStsAddress:
Collaboration diagram for CbmStsAddress:

Static Public Member Functions

static UInt_t GetAddress (Int_t station=0, Int_t ladder=0, Int_t halfladder=0, Int_t module=0, Int_t sensor=0, Int_t side=0, Int_t channel=0)
 Construct address.
static UInt_t GetAddress (Int_t *elementIds)
static Int_t GetNofLevels ()
 Get the number of hierarchy levels For use in macros which do not include this header file.
static Int_t GetNofBits (Int_t level)
 Get the number of bits for a given hierarchy level.
static Int_t GetElementId (UInt_t address, Int_t level)
 Get the index of an element.
static void Print ()
 Print information on the bit field.
static UInt_t SetElementId (UInt_t address, Int_t level, Int_t newId)
 Set the index of an element leaving the other element levels untouched.

Static Private Attributes

static const Int_t fgkBits [kStsNofLevels]
 Number of bits for the different levels.
static const Int_t fgkShift [kStsNofLevels]
 Bit shifts for the different levels.
static const Int_t fgkMask [kStsNofLevels]
 Bit masks for the different levels.

Detailed Description

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Version
1.0

The CbmStsAddress interprets and modifies the unique address for the STS by the proper bit operation on the address bit field.

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

                                          3         2         1

Level Bits Max. Elements Shift 10987654321098765432109876543210
System (kSTS) 4 16 0 0000000000000000000000000000xxxx
Station 4 16 4 000000000000000000000000xxxx0000
Ladder 4 16 8 00000000000000000000xxxx00000000
HalfLadder 1 2 12 0000000000000000000x000000000000
Module 3 8 13 0000000000000000xxx0000000000000
Sensor 2 4 16 00000000000000xx0000000000000000
Side 1 2 18 0000000000000x000000000000000000
Channel 13 8192 19 xxxxxxxxxxxxx0000000000000000000

Definition at line 53 of file CbmStsAddress.h.

Member Function Documentation

◆ GetAddress() [1/2]

UInt_t CbmStsAddress::GetAddress ( Int_t * elementIds)
static

Definition at line 86 of file CbmStsAddress.cxx.

References fgkBits, fgkShift, kStsNofLevels, and kStsSystem.

◆ GetAddress() [2/2]

UInt_t CbmStsAddress::GetAddress ( Int_t station = 0,
Int_t ladder = 0,
Int_t halfladder = 0,
Int_t module = 0,
Int_t sensor = 0,
Int_t side = 0,
Int_t channel = 0 )
static
Parameters
stationStation index
ladderLadder index in station
halfladderHalfladder index in ladder
moduleModule index within halfladder
sensorSensor index within module
sideSide (0=front, 1=back) of sensor
channelChannel number
Returns
Unique element address

Definition at line 39 of file CbmStsAddress.cxx.

References fgkBits, fgkShift, kStsChannel, kStsHalfLadder, kStsLadder, kStsModule, kStsSensor, kStsSide, kStsStation, and kStsSystem.

Referenced by CbmStsAddress_test().

Here is the caller graph for this function:

◆ GetElementId()

Int_t CbmStsAddress::GetElementId ( UInt_t address,
Int_t level )
inlinestatic
Parameters
addressUnique element address
levelHierarchy level
Returns
Element index

Definition at line 99 of file CbmStsAddress.h.

References fgkMask, fgkShift, and kStsNofLevels.

Referenced by CbmStsAddress_test(), CbmStsElement::GetIndex(), and CbmStsSenzor::GetSensorId().

Here is the caller graph for this function:

◆ GetNofBits()

Int_t CbmStsAddress::GetNofBits ( Int_t level)
inlinestatic
Parameters
levelRequested element level
Returns
Number of bits in address field

Definition at line 87 of file CbmStsAddress.h.

References fgkBits, and kStsNofLevels.

Referenced by CbmStsAddress_test().

Here is the caller graph for this function:

◆ GetNofLevels()

Int_t CbmStsAddress::GetNofLevels ( )
inlinestatic
Returns
Number of hierarchy levels

Definition at line 81 of file CbmStsAddress.h.

References kStsNofLevels.

Referenced by CbmStsAddress_test().

Here is the caller graph for this function:

◆ Print()

void CbmStsAddress::Print ( )
static

Definition at line 104 of file CbmStsAddress.cxx.

References fgkBits, fgkMask, and kStsNofLevels.

Referenced by CbmStsAddress_test().

Here is the caller graph for this function:

◆ SetElementId()

UInt_t CbmStsAddress::SetElementId ( UInt_t address,
Int_t level,
Int_t newId )
inlinestatic
Parameters
addressUnique element address
levelHierarchy level
newIdNew element index
Returns
New address

Definition at line 116 of file CbmStsAddress.h.

References fgkBits, fgkMask, fgkShift, and kStsNofLevels.

Referenced by CbmStsElement::AddDaughter(), CbmStsModule::AddSensor(), and CbmStsAddress_test().

Here is the caller graph for this function:

Member Data Documentation

◆ fgkBits

const Int_t CbmStsAddress::fgkBits
staticprivate
Initial value:
= {fgkSystemBits,
4,
4,
1,
3,
2,
1,
13}

Definition at line 11 of file CbmStsAddress.h.

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

◆ fgkMask

const Int_t CbmStsAddress::fgkMask
staticprivate
Initial value:
= {(1 << fgkBits[0]) - 1, (1 << fgkBits[1]) - 1, (1 << fgkBits[2]) - 1,
(1 << fgkBits[3]) - 1, (1 << fgkBits[4]) - 1, (1 << fgkBits[5]) - 1,
(1 << fgkBits[6]) - 1, (1 << fgkBits[7]) - 1}
static const Int_t fgkBits[kStsNofLevels]
Number of bits for the different levels.

Definition at line 33 of file CbmStsAddress.h.

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

◆ fgkShift

const Int_t CbmStsAddress::fgkShift
staticprivate

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