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_tGetCoord ()
 
ULong64_t GetHash () const
 
void SetBuffer (const Char_t *buf)
 
void SetCoord (const Int_t *coord)
 
void UpdateCoord ()
 
- Public Member Functions inherited from THnSparseCoordCompression
 THnSparseCoordCompression (const THnSparseCoordCompression &other)
 Construct a THnSparseCoordCompression from another one.
 
 THnSparseCoordCompression (Int_t dim, const Int_t *nbins)
 Initialize a THnSparseCoordCompression object with "dim" dimensions and "bins" holding the number of bins for each dimension; it stores the.
 
 ~THnSparseCoordCompression ()
 destruct a THnSparseCoordCompression
 
Int_t GetBufferSize () const
 
ULong64_t GetHashFromBuffer (const Char_t *buf) const
 Calculate hash from compact bin index.
 
Int_t GetNdimensions () const
 
THnSparseCoordCompressionoperator= (const THnSparseCoordCompression &other)
 Set this to other if different.
 
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 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.
 

Private Member Functions

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

Private Attributes

Char_tfCoordBuffer
 
Int_tfCurrentBin
 
ULong64_t fHash
 

Additional Inherited Members

- Protected Member Functions inherited from THnSparseCoordCompression
Int_t GetNumBits (Int_t n) const
 
Inheritance diagram for THnSparseCompactBinCoord:
[legend]

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.

◆ 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.

◆ operator=()

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

◆ SetBuffer()

void THnSparseCompactBinCoord::SetBuffer ( const Char_t buf)
inline

Definition at line 365 of file THnSparse.cxx.

◆ SetCoord()

void THnSparseCompactBinCoord::SetCoord ( const Int_t coord)
inline

Definition at line 361 of file THnSparse.cxx.

◆ UpdateCoord()

void THnSparseCompactBinCoord::UpdateCoord ( )
inline

Definition at line 358 of file THnSparse.cxx.

Member Data Documentation

◆ fCoordBuffer

Char_t* THnSparseCompactBinCoord::fCoordBuffer
private

Definition at line 378 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.

  • hist/hist/src/THnSparse.cxx