CbmRoot
Loading...
Searching...
No Matches
StsXyterMessage.h File Reference
#include <cstdint>
#include <iostream>
#include <xpu/device.h>
#include "bitmask_operators.hpp"
Include dependency graph for StsXyterMessage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  stsxyter::enable_bitmask_operators< E >
 
struct  stsxyter::MessField
 
class  stsxyter::Message
 

Namespaces

namespace  stsxyter
 

Macros

#define JSS_BITMASK_HPP
 
#define ENABLE_BITMASK_OPERATORS(x)
 

Enumerations

enum class  stsxyter::MessType : uint16_t {
  stsxyter::Dummy , stsxyter::Hit , stsxyter::TsMsb , stsxyter::Epoch ,
  stsxyter::Status , stsxyter::Empty , stsxyter::EndOfMs
}
 Message types. More...
 
enum class  stsxyter::MessSubType : uint16_t { stsxyter::TsMsb = 0 , stsxyter::Epoch = 1 , stsxyter::Status = 2 , stsxyter::Empty = 3 }
 Non-hit Message sub-types. More...
 
enum class  stsxyter::MessagePrintMask : uint16_t { stsxyter::msg_print_Prefix = (0x1 << 0) , stsxyter::msg_print_Data = (0x1 << 1) , stsxyter::msg_print_Hex = (0x1 << 2) , stsxyter::msg_print_Human = (0x1 << 3) }
 Printout control. More...
 
enum class  stsxyter::MsErrorFlags : uint16_t { stsxyter::MsErrOutFifoAlmostFull = (0x1 << 0) , stsxyter::MsErrOutFifoOverflow = (0x1 << 1) , stsxyter::MsErrTimeoutBinReadout = (0x1 << 2) , stsxyter::MsErrBinOverflow = (0x1 << 3) }
 MS error flags. More...
 

Functions

template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E >::type stsxyter::operator| (E lhs, E rhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E >::type stsxyter::operator& (E lhs, E rhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E >::type stsxyter::operator^ (E lhs, E rhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E >::type stsxyter::operator~ (E lhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type stsxyter::operator|= (E &lhs, E rhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type stsxyter::operator&= (E &lhs, E rhs)
 
template<typename E >
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type stsxyter::operator^= (E &lhs, E rhs)
 
static constexpr MessField stsxyter::kFieldLinkIndex (kusPosLinkIndex, kusLenLinkIndex)
 Fields Info.
 
static constexpr MessField stsxyter::kFieldNotHitFlag (kusPosNotHitFlag, kusLenNotHitFlag)
 
static constexpr MessField stsxyter::kFieldHitChannel (kusPosHitChannel, kusLenHitChannel)
 
static constexpr MessField stsxyter::kFieldHitAdc (kusPosHitAdc, kusLenHitAdc)
 
static constexpr MessField stsxyter::kFieldHitTsFull (kusPosHitTs, kusLenHitTsFull)
 
static constexpr MessField stsxyter::kFieldHitTsOver (kusPosHitTsOver, kusLenHitTsOver)
 
static constexpr MessField stsxyter::kFieldHitTs (kusPosHitTs, kusLenHitTs)
 
static constexpr MessField stsxyter::kFieldHitEmFlag (kusPosHitEmFlag, kusLenHitEmFlag)
 
static constexpr MessField stsxyter::kFieldSubtype (kusPosSubtype, kusLenSubtype)
 
static constexpr MessField stsxyter::kFieldTsMsbVal (kusPosTsMsbVal, kusLenTsMsbVal)
 
static constexpr MessField stsxyter::kFieldTsMsbValBinning (kusPosTsMsbVal, kusLenTsMsbValBinning)
 
static constexpr MessField stsxyter::kFieldEpochVal (kusPosEpochVal, kusLenEpochVal)
 
static constexpr MessField stsxyter::kFieldStatLinkId (kusPosStatLinkId, kusLenStatLinkId)
 
static constexpr MessField stsxyter::kFieldStatSxTs (kusPosStatSxTs, kusLenStatSxTs)
 
static constexpr MessField stsxyter::kFieldStatStatus (kusPosStatStatus, kusLenStatStatus)
 
static constexpr MessField stsxyter::kFieldStatDpbTs (kusPosStatDpbTs, kusLenStatDpbTs)
 
static constexpr MessField stsxyter::kFieldStatCpFlag (kusPosStatCpFlag, kusLenStatCpFlag)
 
static constexpr MessField stsxyter::kFieldEmptyFlag (kusPosEmptyFlag, kusLenEmptyFlag)
 
static constexpr MessField stsxyter::kFieldMsErrFlag (kusPosMsErrFlag, kusLenMsErrFlag)
 
static constexpr MessField stsxyter::kFieldMsErrType (kusPosMsErrType, kusLenMsErrType)
 

Variables

static constexpr uint16_t stsxyter::kusPosNotHitFlag = 31
 Fields position (Start bit index)
 
static constexpr uint16_t stsxyter::kusPosLinkIndex = 22
 
static constexpr uint16_t stsxyter::kusPosHitChannel = 15
 
static constexpr uint16_t stsxyter::kusPosHitAdc = 10
 
static constexpr uint16_t stsxyter::kusPosHitTsOver = 9
 
static constexpr uint16_t stsxyter::kusPosHitTs = 1
 
static constexpr uint16_t stsxyter::kusPosHitEmFlag = 0
 
static constexpr uint16_t stsxyter::kusPosSubtype = 29
 
static constexpr uint16_t stsxyter::kusPosTsMsbVal = 0
 
static constexpr uint16_t stsxyter::kusPosEpochVal = 0
 
static constexpr uint16_t stsxyter::kusPosStatLinkId = 20
 
static constexpr uint16_t stsxyter::kusPosStatSxTs = 14
 
static constexpr uint16_t stsxyter::kusPosStatStatus = 10
 
static constexpr uint16_t stsxyter::kusPosStatDpbTs = 1
 
static constexpr uint16_t stsxyter::kusPosStatCpFlag = 0
 
static constexpr uint16_t stsxyter::kusPosEmptyFlag = 28
 
static constexpr uint16_t stsxyter::kusPosMsErrType = 1
 
static constexpr uint16_t stsxyter::kusPosMsErrFlag = 0
 
static constexpr uint16_t stsxyter::kusLenNotHitFlag = 1
 Fields length (bits)
 
static constexpr uint16_t stsxyter::kusLenLinkIndex = 9
 
static constexpr uint16_t stsxyter::kusLenHitChannel = 7
 
static constexpr uint16_t stsxyter::kusLenHitAdc = 5
 
static constexpr uint16_t stsxyter::kusLenHitTsFull = 9
 
static constexpr uint16_t stsxyter::kusLenHitTsOver = 0
 
static constexpr uint16_t stsxyter::kusLenHitTs = 9
 
static constexpr uint16_t stsxyter::kusLenHitEmFlag = 1
 
static constexpr uint16_t stsxyter::kusLenSubtype = 2
 
static constexpr uint16_t stsxyter::kusLenTsMsbVal = 22
 
static constexpr uint16_t stsxyter::kusLenTsMsbValBinning = 29
 
static constexpr uint16_t stsxyter::kusLenEpochVal = 29
 
static constexpr uint16_t stsxyter::kusLenStatLinkId = 9
 
static constexpr uint16_t stsxyter::kusLenStatSxTs = 6
 
static constexpr uint16_t stsxyter::kusLenStatStatus = 4
 
static constexpr uint16_t stsxyter::kusLenStatDpbTs = 9
 
static constexpr uint16_t stsxyter::kusLenStatCpFlag = 1
 
static constexpr uint16_t stsxyter::kusLenEmptyFlag = 1
 
static constexpr uint16_t stsxyter::kusLenMsErrType = 4
 
static constexpr uint16_t stsxyter::kusLenMsErrFlag = 1
 
static constexpr uint32_t stsxyter::kuHitNbAdcBins = (0 < kusLenHitAdc ? 1 << kusLenHitAdc : 0)
 Status/properties constants.
 
static constexpr uint32_t stsxyter::kuHitNbTsBins = (0 < kusLenHitTs ? 1 << kusLenHitTs : 0)
 
static constexpr uint32_t stsxyter::kuHitNbOverBins = (0 < kusLenHitTsOver ? 1 << kusLenHitTsOver : 0)
 
static constexpr uint32_t stsxyter::kuTsMsbNbTsBins = (0 < kusLenTsMsbVal ? 1 << kusLenTsMsbVal : 0)
 
static constexpr uint64_t stsxyter::kulTsCycleNbBins
 
static constexpr uint16_t stsxyter::kusMaskTsMsbOver = (1 << kusLenHitTsOver) - 1
 
static constexpr uint32_t stsxyter::kulClockCycleNom = 25
 Clock cycle nominator [ns], equivalent to 2*160 MHz clock.
 
static constexpr uint32_t stsxyter::kulClockCycleDen = 8
 Clock cycle denominator, equivalent to 2*160 MHz clock.
 
static constexpr double stsxyter::kdClockCycleNs = static_cast<double>(kulClockCycleNom) / kulClockCycleDen
 
static constexpr uint32_t stsxyter::kuHitNbTsBinsBinning = 1 << 10
 
static constexpr uint32_t stsxyter::kuTsMsbNbTsBinsBinning = 1 << kusLenTsMsbValBinning
 
static constexpr uint64_t stsxyter::kulTsCycleNbBinsBinning
 

Macro Definition Documentation

◆ ENABLE_BITMASK_OPERATORS

#define ENABLE_BITMASK_OPERATORS ( x)
Value:
template<> \
struct enable_bitmask_operators<x> { \
static const bool enable = true; \
};

Definition at line 52 of file StsXyterMessage.h.

◆ JSS_BITMASK_HPP

#define JSS_BITMASK_HPP

Definition at line 7 of file StsXyterMessage.h.