Logo ROOT  
Reference Guide
ROOT::Experimental::RHistBufferedFill< HIST, SIZE > Class Template Reference

template<class HIST, int SIZE = 1024>
class ROOT::Experimental::RHistBufferedFill< HIST, SIZE >

Buffers calls to Fill().

Once the buffer is full, on destruction of when calling Flush(), it sends the buffers off as an ideally vectorizable FillN() operation. It also serves as a multi-threaded way of filling the same histogram, reducing the locking frequency.

The HIST template can be either a RHist instance, a RHistImpl instance, or a RHistLockedFill instance.

Definition at line 82 of file RHistBufferedFill.hxx.

Public Types

using CoordArray_t = typename HIST::CoordArray_t
 
using Hist_t = HIST
 
using Weight_t = typename HIST::Weight_t
 
- Public Types inherited from ROOT::Experimental::Internal::RHistBufferedFillBase< RHistBufferedFill< HIST, 1024 >, HIST, 1024 >
using CoordArray_t = typename HIST::CoordArray_t
 
using Weight_t = typename HIST::Weight_t
 

Public Member Functions

 RHistBufferedFill (Hist_t &hist)
 
void FillN (const std::span< const CoordArray_t > xN)
 
void FillN (const std::span< const CoordArray_t > xN, const std::span< const Weight_t > weightN)
 
HIST & GetHist ()
 
 operator HIST & ()
 
- Public Member Functions inherited from ROOT::Experimental::Internal::RHistBufferedFillBase< RHistBufferedFill< HIST, 1024 >, HIST, 1024 >
 RHistBufferedFillBase ()
 
 ~RHistBufferedFillBase ()
 
void Fill (const CoordArray_t &x, Weight_t weight=1.)
 
void Flush ()
 
std::span< const CoordArray_tGetCoords () const
 
std::span< const Weight_tGetWeights () const
 
RHistBufferedFill< HIST, 1024 > & toDerived ()
 
const RHistBufferedFill< HIST, 1024 > & toDerived () const
 

Static Public Member Functions

static constexpr int GetNDim ()
 

Private Member Functions

void FlushImpl ()
 

Private Attributes

size_t fCursor = 0
 
HIST & fHist
 
std::array< Weight_t, SIZE > fWBuf
 
std::array< CoordArray_t, SIZE > fXBuf
 

Friends

class Internal::RHistBufferedFillBase< RHistBufferedFill< HIST, SIZE >, HIST, SIZE >
 

#include <ROOT/RHistBufferedFill.hxx>

Inheritance diagram for ROOT::Experimental::RHistBufferedFill< HIST, SIZE >:
[legend]

Member Typedef Documentation

◆ CoordArray_t

template<class HIST , int SIZE = 1024>
using ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::CoordArray_t = typename HIST::CoordArray_t

Definition at line 85 of file RHistBufferedFill.hxx.

◆ Hist_t

template<class HIST , int SIZE = 1024>
using ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::Hist_t = HIST

Definition at line 84 of file RHistBufferedFill.hxx.

◆ Weight_t

template<class HIST , int SIZE = 1024>
using ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::Weight_t = typename HIST::Weight_t

Definition at line 86 of file RHistBufferedFill.hxx.

Constructor & Destructor Documentation

◆ RHistBufferedFill()

template<class HIST , int SIZE = 1024>
ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::RHistBufferedFill ( Hist_t hist)
inline

Definition at line 98 of file RHistBufferedFill.hxx.

Member Function Documentation

◆ FillN() [1/2]

template<class HIST , int SIZE = 1024>
void ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::FillN ( const std::span< const CoordArray_t xN)
inline

Definition at line 105 of file RHistBufferedFill.hxx.

◆ FillN() [2/2]

template<class HIST , int SIZE = 1024>
void ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::FillN ( const std::span< const CoordArray_t xN,
const std::span< const Weight_t weightN 
)
inline

Definition at line 100 of file RHistBufferedFill.hxx.

◆ FlushImpl()

template<class HIST , int SIZE = 1024>
void ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::FlushImpl ( )
inlineprivate

Definition at line 95 of file RHistBufferedFill.hxx.

◆ GetHist()

template<class HIST , int SIZE = 1024>
HIST & ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::GetHist ( )
inline

Definition at line 107 of file RHistBufferedFill.hxx.

◆ GetNDim()

template<class HIST , int SIZE = 1024>
static constexpr int ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::GetNDim ( )
inlinestaticconstexpr

Definition at line 114 of file RHistBufferedFill.hxx.

◆ operator HIST &()

template<class HIST , int SIZE = 1024>
ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::operator HIST & ( )
inline

Definition at line 112 of file RHistBufferedFill.hxx.

Friends And Related Function Documentation

◆ Internal::RHistBufferedFillBase< RHistBufferedFill< HIST, SIZE >, HIST, SIZE >

template<class HIST , int SIZE = 1024>
friend class Internal::RHistBufferedFillBase< RHistBufferedFill< HIST, SIZE >, HIST, SIZE >
friend

Definition at line 92 of file RHistBufferedFill.hxx.

Member Data Documentation

◆ fCursor

template<class HIST , int SIZE = 1024>
size_t ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::fCursor = 0
private

Definition at line 90 of file RHistBufferedFill.hxx.

◆ fHist

template<class HIST , int SIZE = 1024>
HIST& ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::fHist
private

Definition at line 89 of file RHistBufferedFill.hxx.

◆ fWBuf

template<class HIST , int SIZE = 1024>
std::array<Weight_t, SIZE> ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::fWBuf
private

Definition at line 92 of file RHistBufferedFill.hxx.

◆ fXBuf

template<class HIST , int SIZE = 1024>
std::array<CoordArray_t, SIZE> ROOT::Experimental::RHistBufferedFill< HIST, SIZE >::fXBuf
private

Definition at line 91 of file RHistBufferedFill.hxx.


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