15 #ifndef ROOT7_THistConcurrentFill
16 #define ROOT7_THistConcurrentFill
34 template <
class HIST,
int SIZE>
52 fManager.FillN(xN, weightN);
65 HIST&
GetHist() {
return fManager->GetHist(); }
68 static constexpr
int GetNDim() {
return HIST::GetNDim(); }
82 template <
class HIST,
int SIZE = 1024>
83 class THistConcurrentFillManager {
105 std::lock_guard<std::mutex> lockGuard(fFillMutex);
106 fHist.FillN(xN, weightN);
111 std::lock_guard<std::mutex> lockGuard(fFillMutex);
std::array_view< Weight_t > GetWeights() const
Namespace for new ROOT classes and functions.
void FillN(const std::array_view< Coord_t > xN, const std::array_view< Weight_t > weightN)
Thread-specific HIST::FillN().
THistConcurrentFiller< HIST, SIZE > MakeFiller()
typename HIST::Weight_t Weight_t
THistConcurrentFillManager< HIST, SIZE > & fManager
void FillN(const std::array_view< Coord_t > xN)
Thread-specific HIST::FillN().
typename HIST::Coord_t Coord_t
THistConcurrentFiller(THistConcurrentFillManager< HIST, SIZE > &manager)
void FillN(const std::array_view< Coord_t > xN)
Thread-specific HIST::FillN().
std::array_view< Coord_t > GetCoords() const
Buffers a thread's Fill calls and submits them to the THistConcurrentFillManager. ...
void Flush()
The buffer is full, flush it out.
THistConcurrentFillManager(HIST &hist)
Manages the synchronization of calls to FillN().
void FillN(const std::array_view< Coord_t > xN, const std::array_view< Weight_t > weightN)
Thread-specific HIST::FillN().
typename HIST::Coord_t Coord_t
void Fill(const Coord_t &x, Weight_t weight=1.)
typename HIST::Weight_t Weight_t
static constexpr int GetNDim()