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
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 39 of file RHistConcurrentFiller.hxx.

Public Member Functions

 RHistConcurrentFiller (const RHistConcurrentFiller< BinContentType > &)=delete
 
 RHistConcurrentFiller (RHistConcurrentFiller< BinContentType > &&)=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
 
RHistConcurrentFiller< BinContentType > & operator= (const RHistConcurrentFiller< BinContentType > &)=delete
 
RHistConcurrentFiller< BinContentType > & operator= (RHistConcurrentFiller< BinContentType > &&)=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]

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 52 of file RHistConcurrentFiller.hxx.

◆ RHistConcurrentFiller() [2/3]

◆ RHistConcurrentFiller() [3/3]

◆ ~RHistConcurrentFiller()

Member Function Documentation

◆ CreateFillContext()

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

Create a new context for concurrent filling.

Definition at line 78 of file RHistConcurrentFiller.hxx.

◆ GetHist()

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

Definition at line 75 of file RHistConcurrentFiller.hxx.

◆ operator=() [1/2]

◆ operator=() [2/2]

Member Data Documentation

◆ fFillContexts

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 46 of file RHistConcurrentFiller.hxx.

◆ fHist

A pointer to the filled histogram.

Definition at line 41 of file RHistConcurrentFiller.hxx.

◆ fMutex

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

Definition at line 44 of file RHistConcurrentFiller.hxx.

  • hist/histv7/inc/ROOT/RHistConcurrentFiller.hxx