CbmRoot
Loading...
Searching...
No Matches
CbmFsdAddress.h File Reference
#include "CbmDefs.h"
#include <cassert>
#include <cstdint>
#include <sstream>
Include dependency graph for CbmFsdAddress.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CbmFsdAddress
 Functions to encode or decode the address field of FSD data.
 
namespace  CbmFsdAddress::Detail
 

Enumerations

enum class  CbmFsdAddress::Level {
  CbmFsdAddress::System , CbmFsdAddress::Unit , CbmFsdAddress::Module , CbmFsdAddress::PhotoDet ,
  CbmFsdAddress::NumLevels
}
 

Functions

int32_t CbmFsdAddress::GetAddress (uint32_t Unit=0, uint32_t Module=0, uint32_t PhotoDet=0, uint32_t Version=kCurrentVersion)
 Construct address.
 
int32_t CbmFsdAddress::GetMotherAddress (int32_t address, int32_t level)
 Construct the address of an element from the address of a descendant element.
 
uint32_t CbmFsdAddress::GetElementId (int32_t address, int32_t level)
 Get the index of an element.
 
uint32_t CbmFsdAddress::GetSystemId (int32_t address)
 Get system Id (should be integer value of ECbmModuleId::kFsd)
 
uint32_t CbmFsdAddress::GetVersion (int32_t address)
 Extract version number.
 
int32_t CbmFsdAddress::SetElementId (int32_t address, int32_t level, uint32_t newId)
 Set the index of an element, leaving the other element levels untouched.
 
std::string CbmFsdAddress::ToString (int32_t address)
 String output.
 

Variables

constexpr uint32_t CbmFsdAddress::kCurrentVersion = 0
 
constexpr int32_t CbmFsdAddress::kVersionSize = 4
 
constexpr int32_t CbmFsdAddress::kVersionShift = 28
 
constexpr int32_t CbmFsdAddress::kVersionMask = (1 << kVersionSize) - 1
 
constexpr uint16_t CbmFsdAddress::Detail::kBits [kCurrentVersion+1][static_cast< uint32_t >(CbmFsdAddress::Level::NumLevels)]
 
constexpr int32_t CbmFsdAddress::Detail::kShift [kCurrentVersion+1][static_cast< uint32_t >(CbmFsdAddress::Level::NumLevels)]
 
constexpr int32_t CbmFsdAddress::Detail::kMask [kCurrentVersion+1][static_cast< uint32_t >(CbmFsdAddress::Level::NumLevels)]
 

Detailed Description

Author
Lukas Chlad l.chl.nosp@m.ad@g.nosp@m.si.de
Date
16.06.2023

Inspired by CbmStsAddress and only accomodate physical properties of expected FSD detector

Definition in file CbmFsdAddress.h.