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) {
54 fManager.
FillN(xN, weightN);
58 void FillN(
const std::array_view<CoordArray_t> xN) {
67 HIST&
GetHist() {
return fManager->GetHist(); }
70 static constexpr
int GetNDim() {
return HIST::GetNDim(); }
84 template <
class HIST,
int SIZE = 1024>
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
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()
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