Project
Loading...
Searching...
No Matches
o2::ctf::EncodedBlocks< H, N, W > Class Template Reference

<<======================== Auxiliary classes =======================<< More...

#include <EncodedBlocks.h>

Public Types

typedef EncodedBlocks< H, N, W > base
 
template<typename source_T >
using dictionaryType = std::variant< rans::RenormedSparseHistogram< source_T >, rans::RenormedDenseHistogram< source_T > >
 

Public Member Functions

void setHeader (const H &h)
 
const H & getHeader () const
 
H & getHeader ()
 
std::shared_ptr< H > cloneHeader () const
 
const auto & getRegistry () const
 
const auto & getMetadata () const
 
auto & getMetadata (int i) const
 
auto & getBlock (int i) const
 
template<typename source_T >
dictionaryType< source_TgetDictionary (int i, ANSHeader ansVersion=ANSVersionUnspecified) const
 
void setANSHeader (const ANSHeader &h)
 
const ANSHeadergetANSHeader () const
 
ANSHeadergetANSHeader ()
 
bool empty () const
 check if empty and valid
 
bool flat () const
 check if flat and valid
 
void clear ()
 clear itself
 
size_t compactify ()
 Compactify by eliminating empty space.
 
size_t size () const
 total allocated size in bytes
 
size_t getFreeSize () const
 size remaining for additional data
 
template<typename V >
void copyToFlat (V &vec)
 copy itself to flat buffer created on the fly from the vector
 
void copyToFlat (void *base)
 copy itself to flat buffer created on the fly at the provided pointer. The destination block should be at least of size estimateSize()
 
size_t appendToTree (TTree &tree, const std::string &name) const
 attach to tree
 
void readFromTree (TTree &tree, const std::string &name, int ev=0)
 read from tree to non-flat object
 
template<typename VE , typename buffer_T >
o2::ctf::CTFIOSize encode (const VE &src, int slot, uint8_t symbolTablePrecision, Metadata::OptStore opt, buffer_T *buffer=nullptr, const std::any &encoderExt={}, float memfc=1.f)
 encode vector src to bloc at provided slot
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize encode (const input_IT srcBegin, const input_IT srcEnd, int slot, uint8_t symbolTablePrecision, Metadata::OptStore opt, buffer_T *buffer=nullptr, const std::any &encoderExt={}, float memfc=1.f)
 encode vector src to bloc at provided slot
 
template<class container_T , class container_IT = typename container_T::iterator>
o2::ctf::CTFIOSize decode (container_T &dest, int slot, const std::any &decoderExt={}) const
 decode block at provided slot to destination vector (will be resized as needed)
 
template<typename D_IT , std::enable_if_t< detail::is_iterator_v< D_IT >, bool > = true>
o2::ctf::CTFIOSize decode (D_IT dest, int slot, const std::any &decoderExt={}) const
 decode block at provided slot to destination pointer, the needed space assumed to be available
 
void print (const std::string &prefix="", int verbosity=1) const
 print itself
 
void dump (const std::string &prefix="", int ncol=20) const
 
template<typename D_IT , std::enable_if_t< detail::is_iterator_v< D_IT >, bool > >
CTFIOSize decode (D_IT dest, int slot, const std::any &decoderExt) const
 
template<typename input_IT , typename buffer_T >
CTFIOSize encodeRANSV1External (const input_IT srcBegin, const input_IT srcEnd, int slot, const std::any &encoderExt, buffer_T *buffer, double_t sizeEstimateSafetyFactor)
 
template<typename input_IT , typename buffer_T >
CTFIOSize encodeRANSV1Inplace (const input_IT srcBegin, const input_IT srcEnd, int slot, Metadata::OptStore opt, buffer_T *buffer, double_t sizeEstimateSafetyFactor)
 

Static Public Member Functions

static constexpr int getNBlocks ()
 
static size_t getMinAlignedSize ()
 
static auto get (void *head)
 cast arbitrary buffer head to container class. Head is supposed to respect the alignment
 
static auto get (const void *head)
 
static auto getImage (const void *newHead)
 get const image of the container wrapper, with pointers in the image relocated to new head
 
static auto create (void *head, size_t sz)
 create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect the alignment
 
template<typename VD >
static auto create (VD &v)
 create container from vector. Head is supposed to respect the alignment
 
static size_t estimateBlockSize (int n)
 estimate free size needed to add new block
 
template<typename buffer_T >
static auto expand (buffer_T &buffer, size_t newsizeBytes)
 expand the storage to new size in bytes
 
template<typename VD >
static void readFromTree (VD &vec, TTree &tree, const std::string &name, int ev=0)
 read from tree to destination buffer vector
 
static std::vector< charcreateDictionaryBlocks (const std::vector< rans::DenseHistogram< int32_t > > &vfreq, const std::vector< Metadata > &prbits)
 create a special EncodedBlocks containing only dictionaries made from provided vector of frequency tables
 

Protected Member Functions

void init (size_t sz)
 setup internal structure and registry for given buffer size (in bytes!!!)
 
size_t estimateSize () const
 
size_t estimateSizeFromMetadata () const
 do the same using metadata info
 
void fillFlatCopy (EncodedBlocks &dest) const
 Create its own flat copy in the destination empty flat object.
 
template<typename T >
auto expandStorage (size_t slot, size_t nElemets, T *buffer=nullptr) -> decltype(auto)
 
ANSHeader checkANSVersion (ANSHeader ansVersion) const
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize entropyCodeRANSCompat (const input_IT srcBegin, const input_IT srcEnd, int slot, uint8_t symbolTablePrecision, buffer_T *buffer=nullptr, const std::any &encoderExt={}, float memfc=1.f)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize entropyCodeRANSV1 (const input_IT srcBegin, const input_IT srcEnd, int slot, Metadata::OptStore opt, buffer_T *buffer=nullptr, const std::any &encoderExt={}, float memfc=1.f)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize encodeRANSV1External (const input_IT srcBegin, const input_IT srcEnd, int slot, const std::any &encoderExt, buffer_T *buffer=nullptr, double_t sizeEstimateSafetyFactor=1)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize encodeRANSV1Inplace (const input_IT srcBegin, const input_IT srcEnd, int slot, Metadata::OptStore opt, buffer_T *buffer=nullptr, double_t sizeEstimateSafetyFactor=1)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize pack (const input_IT srcBegin, const input_IT srcEnd, int slot, rans::Metrics< typename std::iterator_traits< input_IT >::value_type > metrics, buffer_T *buffer=nullptr)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize pack (const input_IT srcBegin, const input_IT srcEnd, int slot, buffer_T *buffer=nullptr)
 
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize store (const input_IT srcBegin, const input_IT srcEnd, int slot, Metadata::OptStore opt, buffer_T *buffer=nullptr)
 
template<typename dst_IT >
CTFIOSize decodeCompatImpl (dst_IT dest, int slot, const std::any &decoderExt) const
 
template<typename dst_IT >
CTFIOSize decodeRansV1Impl (dst_IT dest, int slot, const std::any &decoderExt) const
 
template<typename dst_IT >
CTFIOSize decodeUnpackImpl (dst_IT dest, int slot) const
 
template<typename dst_IT >
CTFIOSize decodeCopyImpl (dst_IT dest, int slot) const
 
 ClassDefNV (EncodedBlocks, 3)
 

Static Protected Member Functions

static void relocate (const char *oldHead, char *newHead, char *wrapper, size_t newsize=0)
 
template<typename D >
static size_t fillTreeBranch (TTree &tree, const std::string &brname, D &dt, int compLevel, int splitLevel=99)
 add and fill single branch
 
template<typename D >
static bool readTreeBranch (TTree &tree, const std::string &brname, D &dt, int ev=0)
 read single branch
 

Protected Attributes

Registry mRegistry
 
ANSHeader mANSHeader
 
mHeader
 
std::array< Metadata, N > mMetadata
 
std::array< Block< W >, N > mBlocks
 

Static Protected Attributes

static constexpr Metadata::OptStore FallbackStorageType {Metadata::OptStore::NONE}
 this is in fact stored, but to overcome TBuffer limits we have to define the branches per block!!!
 

Detailed Description

template<typename H, int N, typename W = uint32_t>
class o2::ctf::EncodedBlocks< H, N, W >

<<======================== Auxiliary classes =======================<<

Definition at line 334 of file EncodedBlocks.h.

Member Typedef Documentation

◆ base

template<typename H , int N, typename W = uint32_t>
typedef EncodedBlocks<H, N, W> o2::ctf::EncodedBlocks< H, N, W >::base

Definition at line 337 of file EncodedBlocks.h.

◆ dictionaryType

template<typename H , int N, typename W = uint32_t>
template<typename source_T >
using o2::ctf::EncodedBlocks< H, N, W >::dictionaryType = std::variant<rans::RenormedSparseHistogram<source_T>, rans::RenormedDenseHistogram<source_T> >

Definition at line 341 of file EncodedBlocks.h.

Member Function Documentation

◆ appendToTree()

template<typename H , int N, typename W >
size_t o2::ctf::EncodedBlocks< H, N, W >::appendToTree ( TTree &  tree,
const std::string &  name 
) const

attach to tree


attach to tree

Definition at line 685 of file EncodedBlocks.h.

◆ checkANSVersion()

template<typename H , int N, typename W = uint32_t>
ANSHeader o2::ctf::EncodedBlocks< H, N, W >::checkANSVersion ( ANSHeader  ansVersion) const
inlineprotected

Definition at line 564 of file EncodedBlocks.h.

◆ ClassDefNV()

template<typename H , int N, typename W = uint32_t>
o2::ctf::EncodedBlocks< H, N, W >::ClassDefNV ( EncodedBlocks< H, N, W >  ,
 
)
protected

◆ clear()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::clear ( )

clear itself


clear itself

Definition at line 832 of file EncodedBlocks.h.

◆ cloneHeader()

template<typename H , int N, typename W = uint32_t>
std::shared_ptr< H > o2::ctf::EncodedBlocks< H, N, W >::cloneHeader ( ) const
inline

Definition at line 350 of file EncodedBlocks.h.

◆ compactify()

template<typename H , int N, typename W = uint32_t>
size_t o2::ctf::EncodedBlocks< H, N, W >::compactify ( )
inline

Compactify by eliminating empty space.

Definition at line 466 of file EncodedBlocks.h.

◆ copyToFlat() [1/2]

template<typename H , int N, typename W >
template<typename V >
void o2::ctf::EncodedBlocks< H, N, W >::copyToFlat ( V &  vec)

copy itself to flat buffer created on the fly from the vector


Copy itself to flat buffer created on the fly from the vector

Definition at line 747 of file EncodedBlocks.h.

◆ copyToFlat() [2/2]

template<typename H , int N, typename W = uint32_t>
void o2::ctf::EncodedBlocks< H, N, W >::copyToFlat ( void base)
inline

copy itself to flat buffer created on the fly at the provided pointer. The destination block should be at least of size estimateSize()

Definition at line 483 of file EncodedBlocks.h.

◆ create() [1/2]

template<typename H , int N, typename W >
template<typename VD >
auto o2::ctf::EncodedBlocks< H, N, W >::create ( VD &  v)
inlinestatic

create container from vector. Head is supposed to respect the alignment


create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect the alignment

Definition at line 871 of file EncodedBlocks.h.

◆ create() [2/2]

template<typename H , int N, typename W >
auto o2::ctf::EncodedBlocks< H, N, W >::create ( void head,
size_t  sz 
)
inlinestatic

create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect the alignment


create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect the alignment

Definition at line 858 of file EncodedBlocks.h.

◆ createDictionaryBlocks()

template<typename H , int N, typename W >
std::vector< char > o2::ctf::EncodedBlocks< H, N, W >::createDictionaryBlocks ( const std::vector< rans::DenseHistogram< int32_t > > &  vfreq,
const std::vector< Metadata > &  prbits 
)
static

create a special EncodedBlocks containing only dictionaries made from provided vector of frequency tables

Definition at line 1521 of file EncodedBlocks.h.

◆ decode() [1/3]

template<typename H , int N, typename W >
template<class container_T , class container_IT >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decode ( container_T &  dest,
int  slot,
const std::any &  decoderExt = {} 
) const
inline

decode block at provided slot to destination vector (will be resized as needed)


Definition at line 910 of file EncodedBlocks.h.

◆ decode() [2/3]

template<typename H , int N, typename W = uint32_t>
template<typename D_IT , std::enable_if_t< detail::is_iterator_v< D_IT >, bool > >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decode ( D_IT  dest,
int  slot,
const std::any &  decoderExt 
) const

Definition at line 921 of file EncodedBlocks.h.

◆ decode() [3/3]

template<typename H , int N, typename W = uint32_t>
template<typename D_IT , std::enable_if_t< detail::is_iterator_v< D_IT >, bool > = true>
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decode ( D_IT  dest,
int  slot,
const std::any &  decoderExt = {} 
) const

decode block at provided slot to destination pointer, the needed space assumed to be available

◆ decodeCompatImpl()

template<typename H , int N, typename W >
template<typename dst_IT >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decodeCompatImpl ( dst_IT  dest,
int  slot,
const std::any &  decoderExt 
) const
protected

Definition at line 961 of file EncodedBlocks.h.

◆ decodeCopyImpl()

template<typename H , int N, typename W >
template<typename dst_IT >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decodeCopyImpl ( dst_IT  dest,
int  slot 
) const
protected

Definition at line 1087 of file EncodedBlocks.h.

◆ decodeRansV1Impl()

template<typename H , int N, typename W >
template<typename dst_IT >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decodeRansV1Impl ( dst_IT  dest,
int  slot,
const std::any &  decoderExt 
) const
protected

Definition at line 999 of file EncodedBlocks.h.

◆ decodeUnpackImpl()

template<typename H , int N, typename W >
template<typename dst_IT >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::decodeUnpackImpl ( dst_IT  dest,
int  slot 
) const
protected

Definition at line 1053 of file EncodedBlocks.h.

◆ dump()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::dump ( const std::string &  prefix = "",
int  ncol = 20 
) const

Definition at line 1554 of file EncodedBlocks.h.

◆ empty()

template<typename H , int N, typename W = uint32_t>
bool o2::ctf::EncodedBlocks< H, N, W >::empty ( ) const
inline

check if empty and valid

Definition at line 457 of file EncodedBlocks.h.

◆ encode() [1/2]

template<typename H , int N, typename W >
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encode ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
uint8_t  symbolTablePrecision,
Metadata::OptStore  opt,
buffer_T *  buffer = nullptr,
const std::any &  encoderExt = {},
float  memfc = 1.f 
)

encode vector src to bloc at provided slot


Definition at line 1107 of file EncodedBlocks.h.

◆ encode() [2/2]

template<typename H , int N, typename W = uint32_t>
template<typename VE , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encode ( const VE &  src,
int  slot,
uint8_t  symbolTablePrecision,
Metadata::OptStore  opt,
buffer_T *  buffer = nullptr,
const std::any &  encoderExt = {},
float  memfc = 1.f 
)
inline

encode vector src to bloc at provided slot

Definition at line 497 of file EncodedBlocks.h.

◆ encodeRANSV1External() [1/2]

template<typename H , int N, typename W = uint32_t>
template<typename input_IT , typename buffer_T >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encodeRANSV1External ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
const std::any &  encoderExt,
buffer_T *  buffer,
double_t  sizeEstimateSafetyFactor 
)

Definition at line 1296 of file EncodedBlocks.h.

◆ encodeRANSV1External() [2/2]

template<typename H , int N, typename W = uint32_t>
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encodeRANSV1External ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
const std::any &  encoderExt,
buffer_T *  buffer = nullptr,
double_t  sizeEstimateSafetyFactor = 1 
)
protected

◆ encodeRANSV1Inplace() [1/2]

template<typename H , int N, typename W = uint32_t>
template<typename input_IT , typename buffer_T >
CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encodeRANSV1Inplace ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
Metadata::OptStore  opt,
buffer_T *  buffer,
double_t  sizeEstimateSafetyFactor 
)

Definition at line 1357 of file EncodedBlocks.h.

◆ encodeRANSV1Inplace() [2/2]

template<typename H , int N, typename W = uint32_t>
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::encodeRANSV1Inplace ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
Metadata::OptStore  opt,
buffer_T *  buffer = nullptr,
double_t  sizeEstimateSafetyFactor = 1 
)
protected

◆ entropyCodeRANSCompat()

template<typename H , int N, typename W >
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::entropyCodeRANSCompat ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
uint8_t  symbolTablePrecision,
buffer_T *  buffer = nullptr,
const std::any &  encoderExt = {},
float  memfc = 1.f 
)
protected

Definition at line 1175 of file EncodedBlocks.h.

◆ entropyCodeRANSV1()

template<typename H , int N, typename W >
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::entropyCodeRANSV1 ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
Metadata::OptStore  opt,
buffer_T *  buffer = nullptr,
const std::any &  encoderExt = {},
float  memfc = 1.f 
)
protected

Definition at line 1276 of file EncodedBlocks.h.

◆ estimateBlockSize()

template<typename H , int N, typename W = uint32_t>
static size_t o2::ctf::EncodedBlocks< H, N, W >::estimateBlockSize ( int  n)
inlinestatic

estimate free size needed to add new block

Definition at line 454 of file EncodedBlocks.h.

◆ estimateSize()

template<typename H , int N, typename W >
size_t o2::ctf::EncodedBlocks< H, N, W >::estimateSize ( ) const
protected

Estimate size of the buffer needed to store all compressed data in a contiguous block of memory, accounting for the alignment This method is to be called after reading object from the tree as a non-flat object!


Estimate size of the buffer needed to store all compressed data in a contiguos block of memory, accounting for alignment This method is to be called after reading object from the tree as a non-flat object!

Definition at line 758 of file EncodedBlocks.h.

◆ estimateSizeFromMetadata()

template<typename H , int N, typename W >
size_t o2::ctf::EncodedBlocks< H, N, W >::estimateSizeFromMetadata ( ) const
protected

do the same using metadata info


Estimate size from metadata This method is to be called after reading object from the tree as a non-flat object!

Definition at line 772 of file EncodedBlocks.h.

◆ expand()

template<typename H , int N, typename W >
template<typename buffer_T >
auto o2::ctf::EncodedBlocks< H, N, W >::expand ( buffer_T &  buffer,
size_t  newsizeBytes 
)
static

expand the storage to new size in bytes


expand the storage to new size in bytes

Definition at line 785 of file EncodedBlocks.h.

◆ expandStorage()

template<typename H , int N, typename W >
template<typename T >
auto o2::ctf::EncodedBlocks< H, N, W >::expandStorage ( size_t  slot,
size_t  nElemets,
T *  buffer = nullptr 
) -> decltype(auto)
protected

Definition at line 1150 of file EncodedBlocks.h.

◆ fillFlatCopy()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::fillFlatCopy ( EncodedBlocks< H, N, W > &  dest) const
protected

Create its own flat copy in the destination empty flat object.


Create its own flat copy in the destination empty flat object

Definition at line 732 of file EncodedBlocks.h.

◆ fillTreeBranch()

template<typename H , int N, typename W >
template<typename D >
size_t o2::ctf::EncodedBlocks< H, N, W >::fillTreeBranch ( TTree &  tree,
const std::string &  brname,
D &  dt,
int  compLevel,
int  splitLevel = 99 
)
inlinestaticprotected

add and fill single branch


add and fill single branch

Definition at line 719 of file EncodedBlocks.h.

◆ flat()

template<typename H , int N, typename W = uint32_t>
bool o2::ctf::EncodedBlocks< H, N, W >::flat ( ) const
inline

check if flat and valid

Definition at line 460 of file EncodedBlocks.h.

◆ get() [1/2]

template<typename H , int N, typename W = uint32_t>
static auto o2::ctf::EncodedBlocks< H, N, W >::get ( const void head)
inlinestatic

Definition at line 441 of file EncodedBlocks.h.

◆ get() [2/2]

template<typename H , int N, typename W = uint32_t>
static auto o2::ctf::EncodedBlocks< H, N, W >::get ( void head)
inlinestatic

cast arbitrary buffer head to container class. Head is supposed to respect the alignment

Definition at line 440 of file EncodedBlocks.h.

◆ getANSHeader() [1/2]

template<typename H , int N, typename W = uint32_t>
ANSHeader & o2::ctf::EncodedBlocks< H, N, W >::getANSHeader ( )
inline

Definition at line 433 of file EncodedBlocks.h.

◆ getANSHeader() [2/2]

template<typename H , int N, typename W = uint32_t>
const ANSHeader & o2::ctf::EncodedBlocks< H, N, W >::getANSHeader ( ) const
inline

Definition at line 432 of file EncodedBlocks.h.

◆ getBlock()

template<typename H , int N, typename W = uint32_t>
auto & o2::ctf::EncodedBlocks< H, N, W >::getBlock ( int  i) const
inline

Definition at line 362 of file EncodedBlocks.h.

◆ getDictionary()

template<typename H , int N, typename W = uint32_t>
template<typename source_T >
dictionaryType< source_T > o2::ctf::EncodedBlocks< H, N, W >::getDictionary ( int  i,
ANSHeader  ansVersion = ANSVersionUnspecified 
) const
inline

Definition at line 370 of file EncodedBlocks.h.

◆ getFreeSize()

template<typename H , int N, typename W = uint32_t>
size_t o2::ctf::EncodedBlocks< H, N, W >::getFreeSize ( ) const
inline

size remaining for additional data

Definition at line 472 of file EncodedBlocks.h.

◆ getHeader() [1/2]

template<typename H , int N, typename W = uint32_t>
H & o2::ctf::EncodedBlocks< H, N, W >::getHeader ( )
inline

Definition at line 349 of file EncodedBlocks.h.

◆ getHeader() [2/2]

template<typename H , int N, typename W = uint32_t>
const H & o2::ctf::EncodedBlocks< H, N, W >::getHeader ( ) const
inline

Definition at line 348 of file EncodedBlocks.h.

◆ getImage()

template<typename H , int N, typename W >
auto o2::ctf::EncodedBlocks< H, N, W >::getImage ( const void newHead)
static

get const image of the container wrapper, with pointers in the image relocated to new head


get const image of the container wrapper, with pointers in the image relocated to new head

Definition at line 844 of file EncodedBlocks.h.

◆ getMetadata() [1/2]

template<typename H , int N, typename W = uint32_t>
const auto & o2::ctf::EncodedBlocks< H, N, W >::getMetadata ( ) const
inline

Definition at line 354 of file EncodedBlocks.h.

◆ getMetadata() [2/2]

template<typename H , int N, typename W = uint32_t>
auto & o2::ctf::EncodedBlocks< H, N, W >::getMetadata ( int  i) const
inline

Definition at line 356 of file EncodedBlocks.h.

◆ getMinAlignedSize()

template<typename H , int N, typename W = uint32_t>
static size_t o2::ctf::EncodedBlocks< H, N, W >::getMinAlignedSize ( )
inlinestatic

Definition at line 437 of file EncodedBlocks.h.

◆ getNBlocks()

template<typename H , int N, typename W = uint32_t>
static constexpr int o2::ctf::EncodedBlocks< H, N, W >::getNBlocks ( )
inlinestaticconstexpr

Definition at line 435 of file EncodedBlocks.h.

◆ getRegistry()

template<typename H , int N, typename W = uint32_t>
const auto & o2::ctf::EncodedBlocks< H, N, W >::getRegistry ( ) const
inline

Definition at line 352 of file EncodedBlocks.h.

◆ init()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::init ( size_t  sz)
protected

setup internal structure and registry for given buffer size (in bytes!!!)


setup internal structure and registry for given buffer size (in bytes!!!)

Definition at line 817 of file EncodedBlocks.h.

◆ pack() [1/2]

template<typename H , int N, typename W = uint32_t>
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::pack ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
buffer_T *  buffer = nullptr 
)
inlineprotected

Definition at line 608 of file EncodedBlocks.h.

◆ pack() [2/2]

template<typename H , int N, typename W >
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::pack ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
rans::Metrics< typename std::iterator_traits< input_IT >::value_type >  metrics,
buffer_T *  buffer = nullptr 
)
protected

Definition at line 1466 of file EncodedBlocks.h.

◆ print()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::print ( const std::string &  prefix = "",
int  verbosity = 1 
) const

print itself


print itself

Definition at line 884 of file EncodedBlocks.h.

◆ readFromTree() [1/2]

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::readFromTree ( TTree &  tree,
const std::string &  name,
int  ev = 0 
)

read from tree to non-flat object


read from tree to non-flat object

Definition at line 652 of file EncodedBlocks.h.

◆ readFromTree() [2/2]

template<typename H , int N, typename W >
template<typename VD >
void o2::ctf::EncodedBlocks< H, N, W >::readFromTree ( VD &  vec,
TTree &  tree,
const std::string &  name,
int  ev = 0 
)
static

read from tree to destination buffer vector


read from tree to destination buffer vector

Definition at line 664 of file EncodedBlocks.h.

◆ readTreeBranch()

template<typename H , int N, typename W >
template<typename D >
bool o2::ctf::EncodedBlocks< H, N, W >::readTreeBranch ( TTree &  tree,
const std::string &  brname,
D &  dt,
int  ev = 0 
)
staticprotected

read single branch


read single branch

Definition at line 701 of file EncodedBlocks.h.

◆ relocate()

template<typename H , int N, typename W >
void o2::ctf::EncodedBlocks< H, N, W >::relocate ( const char oldHead,
char newHead,
char wrapper,
size_t  newsize = 0 
)
staticprotected

relocate to different head position, newHead points on start of the dynamic buffer holding the data. the address of the static part might be actually different (wrapper). This different newHead and wrapper addresses must be used when the buffer pointed by newHead is const (e.g. received from the DPL input), in this case we create a wrapper, which points on these const data


relocate to different head position, newHead points on start of the dynamic buffer holding the data. the address of the static part might be actually different (wrapper). This different newHead and wrapper addresses must be used when the buffer pointed by newHead is const (e.g. received from the DPL input), in this case we create a wrapper, which points on these const data

Definition at line 800 of file EncodedBlocks.h.

◆ setANSHeader()

template<typename H , int N, typename W = uint32_t>
void o2::ctf::EncodedBlocks< H, N, W >::setANSHeader ( const ANSHeader h)
inline

Definition at line 428 of file EncodedBlocks.h.

◆ setHeader()

template<typename H , int N, typename W = uint32_t>
void o2::ctf::EncodedBlocks< H, N, W >::setHeader ( const H &  h)
inline

Definition at line 344 of file EncodedBlocks.h.

◆ size()

template<typename H , int N, typename W = uint32_t>
size_t o2::ctf::EncodedBlocks< H, N, W >::size ( ) const
inline

total allocated size in bytes

Definition at line 469 of file EncodedBlocks.h.

◆ store()

template<typename H , int N, typename W >
template<typename input_IT , typename buffer_T >
o2::ctf::CTFIOSize o2::ctf::EncodedBlocks< H, N, W >::store ( const input_IT  srcBegin,
const input_IT  srcEnd,
int  slot,
Metadata::OptStore  opt,
buffer_T *  buffer = nullptr 
)
protected

Definition at line 1499 of file EncodedBlocks.h.

Member Data Documentation

◆ FallbackStorageType

template<typename H , int N, typename W = uint32_t>
constexpr Metadata::OptStore o2::ctf::EncodedBlocks< H, N, W >::FallbackStorageType {Metadata::OptStore::NONE}
inlinestaticconstexprprotected

this is in fact stored, but to overcome TBuffer limits we have to define the branches per block!!!

Definition at line 532 of file EncodedBlocks.h.

◆ mANSHeader

template<typename H , int N, typename W = uint32_t>
ANSHeader o2::ctf::EncodedBlocks< H, N, W >::mANSHeader
protected

Definition at line 527 of file EncodedBlocks.h.

◆ mBlocks

template<typename H , int N, typename W = uint32_t>
std::array<Block<W>, N> o2::ctf::EncodedBlocks< H, N, W >::mBlocks
protected

Definition at line 530 of file EncodedBlocks.h.

◆ mHeader

template<typename H , int N, typename W = uint32_t>
H o2::ctf::EncodedBlocks< H, N, W >::mHeader
protected

Definition at line 528 of file EncodedBlocks.h.

◆ mMetadata

template<typename H , int N, typename W = uint32_t>
std::array<Metadata, N> o2::ctf::EncodedBlocks< H, N, W >::mMetadata
protected

Definition at line 529 of file EncodedBlocks.h.

◆ mRegistry

template<typename H , int N, typename W = uint32_t>
Registry o2::ctf::EncodedBlocks< H, N, W >::mRegistry
protected

Definition at line 526 of file EncodedBlocks.h.


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