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

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

A histogram filler to concurrently fill an RHist.

auto hist = std::make_shared<ROOT::Experimental::RHist<int>>(10, std::make_pair(5, 15));
{
auto context = filler.CreateFillContext();
context->Fill(8.5);
}
// hist->GetBinContent(ROOT::Experimental::RBinIndex(3)) will return 1
A histogram filler to concurrently fill an RHist.
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 37 of file RHistConcurrentFiller.hxx.

Public Member Functions

 RHistConcurrentFiller (const RHistConcurrentFiller &)=delete
 RHistConcurrentFiller (RHistConcurrentFiller &&)=delete
 RHistConcurrentFiller (std::shared_ptr< RHist< BinContentType > > hist)
 Create a filler object.
 ~RHistConcurrentFiller ()
std::shared_ptr< RHistFillContext< BinContentType > > CreateFillContext ()
 Create a new context for concurrent filling.
const std::shared_ptr< RHist< BinContentType > > & GetHist () const
RHistConcurrentFilleroperator= (const RHistConcurrentFiller &)=delete
RHistConcurrentFilleroperator= (RHistConcurrentFiller &&)=delete

Private Attributes

std::vector< std::weak_ptr< RHistFillContext< BinContentType > > > fFillContexts
 The list of fill contexts, for checks during destruction.
std::shared_ptr< RHist< BinContentType > > fHist
 A pointer to the filled histogram.
std::mutex fMutex
 Mutex to protect access to the list of fill contexts (not for filling itself!).

#include <ROOT/RHistConcurrentFiller.hxx>

Constructor & Destructor Documentation

◆ RHistConcurrentFiller() [1/3]

template<typename BinContentType>
ROOT::Experimental::RHistConcurrentFiller< BinContentType >::RHistConcurrentFiller ( std::shared_ptr< RHist< BinContentType > > hist)
inlineexplicit

Create a filler object.

Parameters
[in]hista pointer to the histogram

Definition at line 50 of file RHistConcurrentFiller.hxx.

◆ RHistConcurrentFiller() [2/3]

template<typename BinContentType>
ROOT::Experimental::RHistConcurrentFiller< BinContentType >::RHistConcurrentFiller ( const RHistConcurrentFiller< BinContentType > & )
delete

◆ RHistConcurrentFiller() [3/3]

template<typename BinContentType>
ROOT::Experimental::RHistConcurrentFiller< BinContentType >::RHistConcurrentFiller ( RHistConcurrentFiller< BinContentType > && )
delete

◆ ~RHistConcurrentFiller()

template<typename BinContentType>
ROOT::Experimental::RHistConcurrentFiller< BinContentType >::~RHistConcurrentFiller ( )
inline

Definition at line 62 of file RHistConcurrentFiller.hxx.

Member Function Documentation

◆ CreateFillContext()

template<typename BinContentType>
std::shared_ptr< RHistFillContext< BinContentType > > ROOT::Experimental::RHistConcurrentFiller< BinContentType >::CreateFillContext ( )
inline

Create a new context for concurrent filling.

Definition at line 76 of file RHistConcurrentFiller.hxx.

◆ GetHist()

template<typename BinContentType>
const std::shared_ptr< RHist< BinContentType > > & ROOT::Experimental::RHistConcurrentFiller< BinContentType >::GetHist ( ) const
inline

Definition at line 73 of file RHistConcurrentFiller.hxx.

◆ operator=() [1/2]

template<typename BinContentType>
RHistConcurrentFiller & ROOT::Experimental::RHistConcurrentFiller< BinContentType >::operator= ( const RHistConcurrentFiller< BinContentType > & )
delete

◆ operator=() [2/2]

template<typename BinContentType>
RHistConcurrentFiller & ROOT::Experimental::RHistConcurrentFiller< BinContentType >::operator= ( RHistConcurrentFiller< BinContentType > && )
delete

Member Data Documentation

◆ fFillContexts

template<typename BinContentType>
std::vector<std::weak_ptr<RHistFillContext<BinContentType> > > ROOT::Experimental::RHistConcurrentFiller< BinContentType >::fFillContexts
private

The list of fill contexts, for checks during destruction.

Definition at line 44 of file RHistConcurrentFiller.hxx.

◆ fHist

template<typename BinContentType>
std::shared_ptr<RHist<BinContentType> > ROOT::Experimental::RHistConcurrentFiller< BinContentType >::fHist
private

A pointer to the filled histogram.

Definition at line 39 of file RHistConcurrentFiller.hxx.

◆ fMutex

template<typename BinContentType>
std::mutex ROOT::Experimental::RHistConcurrentFiller< BinContentType >::fMutex
private

Mutex to protect access to the list of fill contexts (not for filling itself!).

Definition at line 42 of file RHistConcurrentFiller.hxx.


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