19#include <xpu/defines.h>
21#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
26#include <boost/serialization/access.hpp>
27#include <boost/serialization/base_object.hpp>
61 XPU_D
CbmStsDigi(int32_t address, int32_t channel, uint32_t time, uint16_t charge)
105 double GetCharge()
const {
return static_cast<double>(
UnpackCharge()); }
120 double GetTime()
const {
return static_cast<double>(
UnpackTime()); }
126 template<
class Archive>
215#if !defined(NO_ROOT) && !XPU_IS_HIP_CUDA
@ kSts
Silicon Tracking System.
Data class for a single-channel message in the STS.
ClassDefNV(CbmStsDigi, 8)
XPU_D void PackAddressAndTime(int32_t newAddress, uint32_t newTime)
XPU_D void SetAddress(int32_t address)
XPU_D void PackChannelAndCharge(uint16_t channel, uint16_t charge)
std::string ToString() const
static constexpr uint32_t kTimestampMask
XPU_D int32_t GetAddressPacked() const
XPU_D void SetAddressAndTime(int32_t address, uint32_t time)
XPU_D void SetCharge(uint16_t charge)
XPU_D void SetChannelAndCharge(uint16_t channel, uint16_t charge)
uint32_t fTime
Time [ns] in lower 31 bits, highest bit is the 17th address bit.
uint16_t fChannelAndCharge
Channel number (lower 11 bits) and charge [ADC Units] in upper 5 bits.
XPU_D void SetTime(uint32_t dNewTime)
XPU_D uint16_t UnpackChannel() const
static constexpr uint32_t kAdcMask
XPU_D uint16_t GetChannel() const
Channel number in module @value Channel number.
static constexpr int kNumAdcBits
static constexpr uint32_t kMaxTimestamp
uint16_t fAddress
Unique element address (lower 16 bits of 17)
XPU_D uint16_t UnpackCharge() const
XPU_D int32_t UnpackAddress() const
XPU_D uint32_t UnpackTime() const
static ECbmModuleId GetSystem()
XPU_D void PackTime(uint32_t newTime)
XPU_D int32_t GetAddress() const
static const char * GetBranchName()
Get the desired name of the branch for this obj in the cbm output tree (static)
XPU_D uint32_t ClampTime(uint32_t time) const
XPU_D uint16_t GetChargeU16() const
void serialize(Archive &ar, const unsigned int)
static constexpr uint32_t kTimeAddressBitMask
static constexpr int kNumTimestampBits
XPU_D uint32_t GetTimeU32() const
XPU_D void SetChannel(uint16_t channel)
static constexpr int kNumLowerAddrBits
XPU_D CbmStsDigi(int32_t address, int32_t channel, uint32_t time, uint16_t charge)
friend class boost::serialization::access
static const char * GetClassName()
Class name (static)
XPU_D int32_t PackDigiAddress(int32_t address)
Strip address to contain only unit, (half)ladder and module.
XPU_D int32_t UnpackDigiAddress(int32_t digiAddress)
Add version and system to compressed address that's stored in a digi.