Project
Loading...
Searching...
No Matches
o2::fit::DataBlockWrapper< ConfigType, T, typename > Struct Template Reference

#include <DataBlockBase.h>

Public Types

enum  AccessByteLUT {
  kNBYTES , kSRCBYTEPOS , kDESTBYTEPOS , kELEMENTINDEX ,
  kWORDINDEX
}
 
enum  AccessReadingLUT { kNELEMENTS , kNSTEPS , kISPARTED }
 
typedef T Data_t
 
typedef ConfigType Config_t
 

Public Member Functions

 DataBlockWrapper ()=default
 
 DataBlockWrapper (const DataBlockWrapper &)=default
 
void serialize (std::vector< char > &vecBytes, size_t nWords, size_t &destPos) const
 
void deserialize (const gsl::span< const uint8_t > inputBytes, size_t nWords, size_t &srcPos)
 
void print () const
 

Static Public Member Functions

static constexpr std::size_t getWordSize ()
 
static constexpr size_t getNsteps ()
 
static constexpr std::array< std::tuple< size_t, size_t, size_t, int, int >, getNsteps()> GetByteLookupTable ()
 
static constexpr std::array< std::tuple< unsigned int, unsigned int, bool >, MaxNwords+1 > GetReadingLookupTable ()
 
static void printLUT ()
 

Public Attributes

Data_t mData [Data_t::MaxNelements]
 
unsigned int mNelements
 
RawDataMetric::Status_t mStatusBits {}
 
bool mIsIncorrect
 

Static Public Attributes

static constexpr bool sIsPadded = Config_t::sIsPadded
 
static constexpr std::size_t sSizeWord = getWordSize()
 
static constexpr int MaxNwords = Data_t::PayloadSize * Data_t::MaxNelements / Data_t::PayloadPerGBTword + (Data_t::PayloadSize * Data_t::MaxNelements % Data_t::PayloadPerGBTword > 0)
 
static constexpr int MaxNbytes = SIZE_WORD * MaxNwords
 
static constexpr int MinNwords = Data_t::PayloadSize * Data_t::MinNelements / Data_t::PayloadPerGBTword + (Data_t::PayloadSize * Data_t::MinNelements % Data_t::PayloadPerGBTword > 0)
 
static constexpr int MinNbytes = SIZE_WORD * MinNwords
 
static constexpr std::array< std::tuple< size_t, size_t, size_t, int, int >, getNsteps()> sByteLookupTable = GetByteLookupTable()
 
static constexpr std::array< std::tuple< unsigned int, unsigned int, bool >, MaxNwords+1 > sReadingLookupTable = GetReadingLookupTable()
 

Detailed Description

template<typename ConfigType, typename T, typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
struct o2::fit::DataBlockWrapper< ConfigType, T, typename >

Definition at line 129 of file DataBlockBase.h.

Member Typedef Documentation

◆ Config_t

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
typedef ConfigType o2::fit::DataBlockWrapper< ConfigType, T, typename >::Config_t

Definition at line 133 of file DataBlockBase.h.

◆ Data_t

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
typedef T o2::fit::DataBlockWrapper< ConfigType, T, typename >::Data_t

Definition at line 132 of file DataBlockBase.h.

Member Enumeration Documentation

◆ AccessByteLUT

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
enum o2::fit::DataBlockWrapper::AccessByteLUT
Enumerator
kNBYTES 
kSRCBYTEPOS 
kDESTBYTEPOS 
kELEMENTINDEX 
kWORDINDEX 

Definition at line 235 of file DataBlockBase.h.

◆ AccessReadingLUT

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
enum o2::fit::DataBlockWrapper::AccessReadingLUT
Enumerator
kNELEMENTS 
kNSTEPS 
kISPARTED 

Definition at line 310 of file DataBlockBase.h.

Constructor & Destructor Documentation

◆ DataBlockWrapper() [1/2]

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
o2::fit::DataBlockWrapper< ConfigType, T, typename >::DataBlockWrapper ( )
default

◆ DataBlockWrapper() [2/2]

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
o2::fit::DataBlockWrapper< ConfigType, T, typename >::DataBlockWrapper ( const DataBlockWrapper< ConfigType, T, typename > &  )
default

Member Function Documentation

◆ deserialize()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
void o2::fit::DataBlockWrapper< ConfigType, T, typename >::deserialize ( const gsl::span< const uint8_t >  inputBytes,
size_t  nWords,
size_t &  srcPos 
)
inline

Definition at line 168 of file DataBlockBase.h.

◆ GetByteLookupTable()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
static constexpr std::array< std::tuple< size_t, size_t, size_t, int, int >, getNsteps()> o2::fit::DataBlockWrapper< ConfigType, T, typename >::GetByteLookupTable ( )
inlinestaticconstexpr

Definition at line 240 of file DataBlockBase.h.

◆ getNsteps()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
static constexpr size_t o2::fit::DataBlockWrapper< ConfigType, T, typename >::getNsteps ( )
inlinestaticconstexpr

Definition at line 200 of file DataBlockBase.h.

◆ GetReadingLookupTable()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
static constexpr std::array< std::tuple< unsigned int, unsigned int, bool >, MaxNwords+1 > o2::fit::DataBlockWrapper< ConfigType, T, typename >::GetReadingLookupTable ( )
inlinestaticconstexpr

Definition at line 313 of file DataBlockBase.h.

◆ getWordSize()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
static constexpr std::size_t o2::fit::DataBlockWrapper< ConfigType, T, typename >::getWordSize ( )
inlinestaticconstexpr

Definition at line 135 of file DataBlockBase.h.

◆ print()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
void o2::fit::DataBlockWrapper< ConfigType, T, typename >::print ( ) const
inline

Definition at line 370 of file DataBlockBase.h.

◆ printLUT()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
static void o2::fit::DataBlockWrapper< ConfigType, T, typename >::printLUT ( )
inlinestatic

Definition at line 351 of file DataBlockBase.h.

◆ serialize()

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
void o2::fit::DataBlockWrapper< ConfigType, T, typename >::serialize ( std::vector< char > &  vecBytes,
size_t  nWords,
size_t &  destPos 
) const
inline

Definition at line 145 of file DataBlockBase.h.

Member Data Documentation

◆ MaxNbytes

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr int o2::fit::DataBlockWrapper< ConfigType, T, typename >::MaxNbytes = SIZE_WORD * MaxNwords
staticconstexpr

Definition at line 194 of file DataBlockBase.h.

◆ MaxNwords

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr int o2::fit::DataBlockWrapper< ConfigType, T, typename >::MaxNwords = Data_t::PayloadSize * Data_t::MaxNelements / Data_t::PayloadPerGBTword + (Data_t::PayloadSize * Data_t::MaxNelements % Data_t::PayloadPerGBTword > 0)
staticconstexpr

Definition at line 193 of file DataBlockBase.h.

◆ mData

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
Data_t o2::fit::DataBlockWrapper< ConfigType, T, typename >::mData[Data_t::MaxNelements]

Definition at line 378 of file DataBlockBase.h.

◆ MinNbytes

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr int o2::fit::DataBlockWrapper< ConfigType, T, typename >::MinNbytes = SIZE_WORD * MinNwords
staticconstexpr

Definition at line 197 of file DataBlockBase.h.

◆ MinNwords

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr int o2::fit::DataBlockWrapper< ConfigType, T, typename >::MinNwords = Data_t::PayloadSize * Data_t::MinNelements / Data_t::PayloadPerGBTword + (Data_t::PayloadSize * Data_t::MinNelements % Data_t::PayloadPerGBTword > 0)
staticconstexpr

Definition at line 196 of file DataBlockBase.h.

◆ mIsIncorrect

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
bool o2::fit::DataBlockWrapper< ConfigType, T, typename >::mIsIncorrect

Definition at line 381 of file DataBlockBase.h.

◆ mNelements

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
unsigned int o2::fit::DataBlockWrapper< ConfigType, T, typename >::mNelements

Definition at line 379 of file DataBlockBase.h.

◆ mStatusBits

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
RawDataMetric::Status_t o2::fit::DataBlockWrapper< ConfigType, T, typename >::mStatusBits {}

Definition at line 380 of file DataBlockBase.h.

◆ sByteLookupTable

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr std::array<std::tuple<size_t, size_t, size_t, int, int>, getNsteps()> o2::fit::DataBlockWrapper< ConfigType, T, typename >::sByteLookupTable = GetByteLookupTable()
staticconstexpr

Definition at line 303 of file DataBlockBase.h.

◆ sIsPadded

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr bool o2::fit::DataBlockWrapper< ConfigType, T, typename >::sIsPadded = Config_t::sIsPadded
staticconstexpr

Definition at line 134 of file DataBlockBase.h.

◆ sReadingLookupTable

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr std::array<std::tuple<unsigned int, unsigned int, bool>, MaxNwords + 1> o2::fit::DataBlockWrapper< ConfigType, T, typename >::sReadingLookupTable = GetReadingLookupTable()
staticconstexpr

Definition at line 348 of file DataBlockBase.h.

◆ sSizeWord

template<typename ConfigType , typename T , typename = typename std::enable_if_t<DataBlockHelper<T>::check()>>
constexpr std::size_t o2::fit::DataBlockWrapper< ConfigType, T, typename >::sSizeWord = getWordSize()
staticconstexpr

Definition at line 144 of file DataBlockBase.h.


The documentation for this struct was generated from the following file: