15 #ifndef ROOT7_THistConcurrentFill
16 #define ROOT7_THistConcurrentFill
18 #include "ROOT/RArrayView.hxx"
24 namespace Experimental {
36 template <
class HIST,
int SIZE>
52 void FillN(
const std::array_view<CoordArray_t> xN,
53 const std::array_view<Weight_t> weightN) {
58 void FillN(
const std::array_view<CoordArray_t> xN) {
70 static constexpr
int GetNDim() {
return HIST::GetNDim(); }
84 template <
class HIST,
int SIZE = 1024>
85 class THistConcurrentFillManager {
105 void FillN(
const std::array_view<CoordArray_t> xN,
106 const std::array_view<Weight_t> weightN) {
107 std::lock_guard<std::mutex> lockGuard(
fFillMutex);
108 fHist.FillN(xN, weightN);
112 void FillN(
const std::array_view<CoordArray_t> xN) {
113 std::lock_guard<std::mutex> lockGuard(
fFillMutex);
void Fill(const CoordArray_t &x, Weight_t weight=1.)
std::array< double, DIMENSIONS > CoordArray_t
void FillN(const std::array_view< CoordArray_t > xN, const std::array_view< Weight_t > weightN)
Thread-specific HIST::FillN().
std::array_view< CoordArray_t > GetCoords() const
THistConcurrentFillManager< HIST, SIZE > & fManager
static constexpr int GetNDim()
typename HIST::CoordArray_t CoordArray_t
Buffers a thread's Fill calls and submits them to the THistConcurrentFillManager. ...
typename HIST::Weight_t Weight_t
typename HIST::Weight_t Weight_t
void FillN(const std::array_view< CoordArray_t > xN)
Thread-specific HIST::FillN().
THistConcurrentFiller(THistConcurrentFillManager< HIST, SIZE > &manager)
THistConcurrentFiller< HIST, SIZE > MakeFiller()
THistConcurrentFillManager(HIST &hist)
void Flush()
The buffer is full, flush it out.
Manages the synchronization of calls to FillN().
void FillN(const std::array_view< CoordArray_t > xN, const std::array_view< Weight_t > weightN)
Thread-specific HIST::FillN().
void FillN(const std::array_view< CoordArray_t > xN)
Thread-specific HIST::FillN().
typename HIST::CoordArray_t CoordArray_t
std::array_view< Weight_t > GetWeights() const