Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RHistFillContext< BinContentType > Class Template Reference

template<typename BinContentType>
class ROOT::Experimental::RHistFillContext< BinContentType >

A context to concurrently fill an RHist.

See also
RHistConcurrentFiller
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 28 of file RHistFillContext.hxx.

Public Member Functions

 ~RHistFillContext ()
 
template<typename... A>
void Fill (const A &...args)
 Fill an entry into the histogram.
 
template<typename... A>
void Fill (const std::tuple< A... > &args)
 Fill an entry into the histogram.
 
template<typename... A>
void Fill (const std::tuple< A... > &args, RWeight weight)
 Fill an entry into the histogram with a weight.
 
void Flush ()
 Flush locally accumulated entries to the histogram.
 

Private Member Functions

 RHistFillContext (const RHistFillContext< BinContentType > &)=delete
 
 RHistFillContext (RHist< BinContentType > &hist)
 
 RHistFillContext (RHistFillContext< BinContentType > &&)=default
 
RHistFillContext< BinContentType > & operator= (const RHistFillContext< BinContentType > &)=delete
 
RHistFillContext< BinContentType > & operator= (RHistFillContext< BinContentType > &&)=default
 

Private Attributes

RHist< BinContentType > * fHist = nullptr
 A pointer to the filled histogram.
 
RHistStats fStats
 Local histogram statistics.
 

Friends

class RHistConcurrentFiller< BinContentType >
 

#include <ROOT/RHistFillContext.hxx>

Constructor & Destructor Documentation

◆ RHistFillContext() [1/3]

ROOT::Experimental::RHistFillContext< BinContentType >::RHistFillContext ( RHist< BinContentType > & hist)
inlineexplicitprivate
See also
RHistConcurrentFiller::CreateFillContent()

Definition at line 39 of file RHistFillContext.hxx.

◆ RHistFillContext() [2/3]

◆ RHistFillContext() [3/3]

◆ ~RHistFillContext()

Member Function Documentation

◆ Fill() [1/3]

template<typename... A>
void ROOT::Experimental::RHistFillContext< BinContentType >::Fill ( const A &... args)
inline

Fill an entry into the histogram.

For weighted filling, pass an RWeight as the last argument. This is not available for integral bin content types (see RHistEngine::SupportsWeightedFilling).

If one of the arguments is outside the corresponding axis and flow bins are disabled, the entry will be silently discarded.

Throws an exception if the number of arguments does not match the axis configuration, or if an argument cannot be converted for the axis type at run-time.

Parameters
[in]argsthe arguments for each axis
See also
RHist::Fill(const A &...args)

Definition at line 99 of file RHistFillContext.hxx.

◆ Fill() [2/3]

template<typename... A>
void ROOT::Experimental::RHistFillContext< BinContentType >::Fill ( const std::tuple< A... > & args)
inline

Fill an entry into the histogram.

If one of the arguments is outside the corresponding axis and flow bins are disabled, the entry will be silently discarded.

Throws an exception if the number of arguments does not match the axis configuration, or if an argument cannot be converted for the axis type at run-time.

Parameters
[in]argsthe arguments for each axis
See also
RHist::Fill(const std::tuple<A...> &args)

Definition at line 59 of file RHistFillContext.hxx.

◆ Fill() [3/3]

template<typename... A>
void ROOT::Experimental::RHistFillContext< BinContentType >::Fill ( const std::tuple< A... > & args,
RWeight weight )
inline

Fill an entry into the histogram with a weight.

This overload is not available for integral bin content types (see RHistEngine::SupportsWeightedFilling).

If one of the arguments is outside the corresponding axis and flow bins are disabled, the entry will be silently discarded.

Throws an exception if the number of arguments does not match the axis configuration, or if an argument cannot be converted for the axis type at run-time.

Parameters
[in]argsthe arguments for each axis
[in]weightthe weight for this entry
See also
RHist::Fill(const std::tuple<A...> &args, RWeight weight)

Definition at line 79 of file RHistFillContext.hxx.

◆ Flush()

Flush locally accumulated entries to the histogram.

Definition at line 106 of file RHistFillContext.hxx.

◆ operator=() [1/2]

◆ operator=() [2/2]

Friends And Related Symbol Documentation

◆ RHistConcurrentFiller< BinContentType >

Definition at line 28 of file RHistFillContext.hxx.

Member Data Documentation

◆ fHist

A pointer to the filled histogram.

Definition at line 33 of file RHistFillContext.hxx.

◆ fStats

Local histogram statistics.

Definition at line 36 of file RHistFillContext.hxx.

  • hist/histv7/inc/ROOT/RHist.hxx
  • hist/histv7/inc/ROOT/RHistFillContext.hxx