Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
THnSparseCompactBinCoord Class Reference

THnSparseCompactBinCoord is a class used by THnSparse internally.

It maps between an n-dimensional array of bin coordinates (indices) and its compact version, the THnSparseCoordCompression.

Definition at line 351 of file THnSparse.cxx.

Public Member Functions

 THnSparseCompactBinCoord (Int_t dim, const Int_t *nbins)
 Initialize a THnSparseCompactBinCoord object with "dim" dimensions and "bins" holding the number of bins for each dimension.
 ~THnSparseCompactBinCoord ()
 destruct a THnSparseCompactBinCoord
const Char_tGetBuffer () const
Int_t GetBufferSize () const
Int_tGetCoord ()
ULong64_t GetHash () const
ULong64_t GetHashFromBuffer (const Char_t *buf) const
 Calculate hash from compact bin index.
Int_t GetNdimensions () const
void SetBuffer (const Char_t *buf)
ULong64_t SetBufferFromCoord (const Int_t *coord_in, Char_t *buf_out) const
 Given the cbin coordinates coord_in, calculate ("compact") the bin coordinates and return them in buf_in.
void SetCoord (const Int_t *coord)
void SetCoordFromBuffer (const Char_t *buf_in, Int_t *coord_out) const
 Given the compressed coordinate buffer buf_in, calculate ("decompact") the bin coordinates and return them in coord_out.
void UpdateCoord ()

Protected Member Functions

Int_t GetNumBits (Int_t n) const

Private Member Functions

 THnSparseCompactBinCoord (const THnSparseCompactBinCoord &)=delete
THnSparseCompactBinCoordoperator= (const THnSparseCompactBinCoord &)=delete

Private Attributes

Int_tfBitOffsets
Char_tfCoordBuffer
Int_t fCoordBufferSize
Int_tfCurrentBin
ULong64_t fHash
Int_t fNdimensions
Inheritance diagram for THnSparseCompactBinCoord:
THnSparseCoordCompression

Constructor & Destructor Documentation

◆ THnSparseCompactBinCoord() [1/2]

THnSparseCompactBinCoord::THnSparseCompactBinCoord ( Int_t dim,
const Int_t * nbins )

Initialize a THnSparseCompactBinCoord object with "dim" dimensions and "bins" holding the number of bins for each dimension.

Definition at line 391 of file THnSparse.cxx.

◆ ~THnSparseCompactBinCoord()

THnSparseCompactBinCoord::~THnSparseCompactBinCoord ( )

destruct a THnSparseCompactBinCoord

Definition at line 406 of file THnSparse.cxx.

◆ THnSparseCompactBinCoord() [2/2]

THnSparseCompactBinCoord::THnSparseCompactBinCoord ( const THnSparseCompactBinCoord & )
privatedelete

Member Function Documentation

◆ GetBuffer()

const Char_t * THnSparseCompactBinCoord::GetBuffer ( ) const
inline

Definition at line 356 of file THnSparse.cxx.

◆ GetBufferSize()

Int_t THnSparseCoordCompression::GetBufferSize ( ) const
inlineinherited

Definition at line 121 of file THnSparse.cxx.

◆ GetCoord()

Int_t * THnSparseCompactBinCoord::GetCoord ( )
inline

Definition at line 355 of file THnSparse.cxx.

◆ GetHash()

ULong64_t THnSparseCompactBinCoord::GetHash ( ) const
inline

Definition at line 357 of file THnSparse.cxx.

◆ GetHashFromBuffer()

ULong64_t THnSparseCoordCompression::GetHashFromBuffer ( const Char_t * buf) const
inherited

Calculate hash from compact bin index.

Definition at line 317 of file THnSparse.cxx.

◆ GetNdimensions()

Int_t THnSparseCoordCompression::GetNdimensions ( ) const
inlineinherited

Definition at line 122 of file THnSparse.cxx.

◆ GetNumBits()

Int_t THnSparseCoordCompression::GetNumBits ( Int_t n) const
inlineprotectedinherited

Definition at line 127 of file THnSparse.cxx.

◆ operator=()

THnSparseCompactBinCoord & THnSparseCompactBinCoord::operator= ( const THnSparseCompactBinCoord & )
privatedelete

◆ SetBuffer()

void THnSparseCompactBinCoord::SetBuffer ( const Char_t * buf)
inline

Definition at line 365 of file THnSparse.cxx.

◆ SetBufferFromCoord()

ULong64_t THnSparseCoordCompression::SetBufferFromCoord ( const Int_t * coord_in,
Char_t * buf_out ) const
inherited

Given the cbin coordinates coord_in, calculate ("compact") the bin coordinates and return them in buf_in.

Return the hash value.

Definition at line 233 of file THnSparse.cxx.

◆ SetCoord()

void THnSparseCompactBinCoord::SetCoord ( const Int_t * coord)
inline

Definition at line 361 of file THnSparse.cxx.

◆ SetCoordFromBuffer()

void THnSparseCoordCompression::SetCoordFromBuffer ( const Char_t * buf_in,
Int_t * coord_out ) const
inherited

Given the compressed coordinate buffer buf_in, calculate ("decompact") the bin coordinates and return them in coord_out.

Definition at line 205 of file THnSparse.cxx.

◆ UpdateCoord()

void THnSparseCompactBinCoord::UpdateCoord ( )
inline

Definition at line 358 of file THnSparse.cxx.

Member Data Documentation

◆ fBitOffsets

Int_t* THnSparseCoordCompression::fBitOffsets
privateinherited

Definition at line 136 of file THnSparse.cxx.

◆ fCoordBuffer

Char_t* THnSparseCompactBinCoord::fCoordBuffer
private

Definition at line 378 of file THnSparse.cxx.

◆ fCoordBufferSize

Int_t THnSparseCoordCompression::fCoordBufferSize
privateinherited

Definition at line 135 of file THnSparse.cxx.

◆ fCurrentBin

Int_t* THnSparseCompactBinCoord::fCurrentBin
private

Definition at line 379 of file THnSparse.cxx.

◆ fHash

ULong64_t THnSparseCompactBinCoord::fHash
private

Definition at line 377 of file THnSparse.cxx.

◆ fNdimensions

Int_t THnSparseCoordCompression::fNdimensions
privateinherited

Definition at line 134 of file THnSparse.cxx.


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