16 #ifndef ROOT7_THistConcurrentFill 17 #define ROOT7_THistConcurrentFill 25 namespace Experimental {
27 template <
class HIST,
int SIZE>
36 template <
class HIST,
int SIZE>
50 void FillN(
const std::array_view<CoordArray_t> xN,
const std::array_view<Weight_t> weightN)
52 fManager.
FillN(xN, weightN);
56 void FillN(
const std::array_view<CoordArray_t> xN) { fManager.
FillN(xN); }
61 HIST &
GetHist() {
return fManager->GetHist(); }
64 static constexpr
int GetNDim() {
return HIST::GetNDim(); }
78 template <
class HIST,
int SIZE = 1024>
97 void FillN(
const std::array_view<CoordArray_t> xN,
const std::array_view<Weight_t> weightN)
99 std::lock_guard<std::mutex> lockGuard(fFillMutex);
100 fHist.FillN(xN, weightN);
104 void FillN(
const std::array_view<CoordArray_t> xN)
106 std::lock_guard<std::mutex> lockGuard(fFillMutex);
void Fill(const CoordArray_t &x, Weight_t weight=1.)
Namespace for new ROOT classes and functions.
void FillN(const std::array_view< CoordArray_t > xN, const std::array_view< Weight_t > weightN)
Thread-specific HIST::FillN().
THistConcurrentFillManager< HIST, SIZE > & fManager
static constexpr int GetNDim()
TCoordArray< DIMENSIONS > CoordArray_t
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)
std::array_view< CoordArray_t > GetCoords() const
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