56 for (std::size_t i = 0; i < events.size(); i += eventSize) {
60 double weightVal = 1.0;
68 for (std::size_t j = 0; j < eventSize; ++j) {
70 if (j < argSet.
size()) {
75 double sourceVal = events[i + j];
77 if (destArg && !destArg->
inRange(sourceVal,
nullptr)) {
80 const auto prefix = std::string(absData.
ClassName()) +
"Helper::FillAbsData(" + absData.
GetName() +
") ";
86 <<
" cannot accommodate the value " << sourceVal <<
"\n";
93 destArg->
setVal(sourceVal);
95 weightVal = sourceVal;
99 absData.
add(argSet, weightVar ? weightVar->
getVal() : weightVal);
115 const auto prefix = std::string(absData.
ClassName()) +
"Helper::Finalize(" + absData.
GetName() +
") ";
123 throw std::invalid_argument(std::string(
"RooAbsData can hold ") + std::to_string(
_eventSize) +
124 " variables per event (plus an optional weight in case of weighted data), but RDataFrame passed " +
125 std::to_string(nValues) +
" columns.");
131 const std::lock_guard<std::mutex> guard(
_mutexDataset, std::adopt_lock_t());
Storage_t::size_type size() const
Abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
virtual bool isWeighted() const
virtual void add(const RooArgSet &row, double weight=1)=0
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
virtual void setVal(double value)=0
Set the current value of the object. Needs to be overridden by implementations.
bool inRange(const char *name) const override
Check if current value is inside range with given name.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold unbinned data.
virtual RooAbsData & GetAbsData()=0
void Initialize()
RDataFrame interface method.
void FillAbsData(const std::vector< double > &events, unsigned int eventSize)
Append all events to the internal RooDataSet or increment the bins of a RooDataHist at the given loca...
std::vector< std::vector< double > > _events
void Finalize()
Empty all buffers into the dataset/hist to finish processing.
void ExecImpl(std::size_t nValues, std::vector< double > &vector)
Variable that can be changed from the outside.
const char * GetName() const override
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
UInt_t GetThreadPoolSize()
Returns the size of ROOT's thread pool.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...