Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooVectorDataStore.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_VECTOR_DATA_STORE
17#define ROO_VECTOR_DATA_STORE
18
19#include "RooAbsDataStore.h"
20#include "RooAbsCategory.h"
21#include "RooAbsReal.h"
22#include "RooChangeTracker.h"
23#include "RooRealVar.h"
24
25#include <string_view>
26#include "Rtypes.h"
27
28#include <list>
29#include <vector>
30#include <algorithm>
31
32class RooAbsArg ;
33class RooArgList ;
34class TTree ;
35class RooFormulaVar ;
36class RooArgSet ;
37class RooTreeDataStore ;
38
39#define VECTOR_BUFFER_SIZE 1024
40
42public:
43
45
46 // Empty constructor
47 RooVectorDataStore(RooStringView name, RooStringView title, const RooArgSet& vars, const char* wgtVarName=nullptr) ;
48
49 RooAbsDataStore* clone(const char* newname=nullptr) const override { return new RooVectorDataStore(*this,newname) ; }
50 RooAbsDataStore* clone(const RooArgSet& vars, const char* newname=nullptr) const override { return new RooVectorDataStore(*this,vars,newname) ; }
51
52 std::unique_ptr<RooAbsDataStore> reduce(RooStringView name, RooStringView title,
53 const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange,
54 std::size_t nStart, std::size_t nStop) override;
55
56 RooVectorDataStore(const RooVectorDataStore& other, const char* newname=nullptr) ;
57 RooVectorDataStore(const RooTreeDataStore& other, const RooArgSet& vars, const char* newname=nullptr) ;
58 RooVectorDataStore(const RooVectorDataStore& other, const RooArgSet& vars, const char* newname=nullptr) ;
59
60
62 const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange,
63 std::size_t nStart, std::size_t nStop, const char* wgtVarName=nullptr) ;
64
65 ~RooVectorDataStore() override ;
66
67 /// \class ArraysStruct
68 /// Output struct for the RooVectorDataStore::getArrays() helper function.
69 /// Meant to be used for RooFit internal use and might change without warning.
70 struct ArraysStruct {
71
72 template<class T>
73 struct ArrayInfo {
74 ArrayInfo(RooStringView n, T const* d) : name{n}, data{d} {}
75 std::string name;
76 T const* data;
77 };
78
79 std::vector<ArrayInfo<double>> reals;
80 std::vector<ArrayInfo<RooAbsCategory::value_type>> cats;
81
82 std::size_t size;
83 };
84
85 /// \name Internal RooFit interface.
86 /// The classes and functions in the internal RooFit interface are
87 /// implementation details and not part of the public user interface.
88 /// Everything in this group might change without warning.
89 /// @{
90 ArraysStruct getArrays() const;
91 void recomputeSumWeight();
92 /// @}
93
94private:
95 RooArgSet varsNoWeight(const RooArgSet& allVars, const char* wgtName);
96 RooRealVar* weightVar(const RooArgSet& allVars, const char* wgtName);
97
98 // reserve storage for nEvt entries
99 void reserve(Int_t nEvt);
100
101public:
102 // Write current row
103 Int_t fill() override;
104
105 // Retrieve a row
107 const RooArgSet* get(Int_t index) const override;
108
110 /// Return the weight of the last-retrieved data point.
111 double weight() const override
112 {
113 if (_extWgtArray)
115 if (_wgtVar)
116 return _wgtVar->getVal();
117
118 return 1.0;
119 }
120 double weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const override;
121 void weightError(double& lo, double& hi, RooAbsData::ErrorType etype=RooAbsData::Poisson) const override;
122 bool isWeighted() const override { return _wgtVar || _extWgtArray; }
123
124 RooAbsData::RealSpans getBatches(std::size_t first, std::size_t len) const override;
125 RooAbsData::CategorySpans getCategoryBatches(std::size_t /*first*/, std::size_t len) const override;
126 std::span<const double> getWeightBatch(std::size_t first, std::size_t len) const override;
127
128 // Change observable name
129 bool changeObservableName(const char* from, const char* to) override;
130
131 // Add one column
132 RooAbsArg* addColumn(RooAbsArg& var, bool adjustRange=true) override;
133
134 // Merge column-wise
135 RooAbsDataStore* merge(const RooArgSet& allvars, std::list<RooAbsDataStore*> dstoreList) override;
136
137 // Add rows
138 void append(RooAbsDataStore& other) override;
139
140 // General & bookkeeping methods
141 Int_t numEntries() const override { return static_cast<int>(size()); }
142 double sumEntries() const override { return _sumWeight ; }
143 /// Get size of stored dataset.
144 std::size_t size() const {
145 if (!_realStoreList.empty()) {
146 return _realStoreList.front()->size();
147 } else if (!_realfStoreList.empty()) {
148 return _realfStoreList.front()->size();
149 } else if (!_catStoreList.empty()) {
150 return _catStoreList.front()->size();
151 }
152
153 return 0;
154 }
155 void reset() override;
156
157 // Buffer redirection routines used in inside RooAbsOptTestStatistics
158 void attachBuffers(const RooArgSet& extObs) override;
159 void resetBuffers() override;
160
161 void loadValues(const RooAbsDataStore *tds, const RooFormulaVar* select=nullptr, const char* rangeName=nullptr, std::size_t nStart=0, std::size_t nStop = std::numeric_limits<std::size_t>::max()) override;
162
163 void dump() override;
164
165 void setExternalWeightArray(const double* arrayWgt, const double* arrayWgtErrLo,
166 const double* arrayWgtErrHi, const double* arraySumW2) override {
171 }
172
173 const RooArgSet& row() { return _varsww ; }
174
176 public:
177
179 _vec.reserve(initialCapacity);
180 }
181
183 _nativeReal(arg) {
184 _vec.reserve(initialCapacity);
185 }
186
187 virtual ~RealVector() {
188 delete _tracker;
189 if (_nset) delete _nset ;
190 }
191
194 if (other._tracker) {
195 _tracker = new RooChangeTracker(Form("track_%s",_nativeReal->GetName()),"tracker",other._tracker->parameters()) ;
196 } else {
197 _tracker = nullptr ;
198 }
199 if (other._nset) {
200 _nset = new RooArgSet(*other._nset) ;
201 }
202 }
203
205 if (&other==this) return *this;
206 _nativeReal = other._nativeReal;
207 _real = other._real;
208 _buf = other._buf;
209 _nativeBuf = other._nativeBuf;
210 if (other._vec.size() <= _vec.capacity() / 2 && _vec.capacity() > (VECTOR_BUFFER_SIZE / sizeof(double))) {
211 std::vector<double> tmp;
212 tmp.reserve(std::max(other._vec.size(), VECTOR_BUFFER_SIZE / sizeof(double)));
213 tmp.assign(other._vec.begin(), other._vec.end());
214 _vec.swap(tmp);
215 } else {
216 _vec = other._vec;
217 }
218
219 return *this;
220 }
221
222 void setNset(RooArgSet* newNset) { _nset = newNset ? new RooArgSet(*newNset) : nullptr ; }
223
224 RooArgSet* nset() const { return _nset ; }
225
226 void setBufArg(RooAbsReal* arg) { _nativeReal = arg ; }
227 const RooAbsReal* bufArg() const { return _nativeReal ; }
228
229 void setBuffer(RooAbsReal* real, double* newBuf) {
230 _real = real ;
231 _buf = newBuf ;
232 if (_nativeBuf==nullptr) {
234 }
235 }
236
237 void setNativeBuffer(double* newBuf=nullptr) {
239 }
240
241 void setDependents(const RooArgSet& deps) {
242 if (_tracker) {
243 delete _tracker ;
244 }
245 _tracker = new RooChangeTracker(Form("track_%s",_nativeReal->GetName()),"tracker",deps) ;
246 }
247
248 bool needRecalc() {
249 if (!_tracker) return false ;
250 return _tracker->hasChanged(true) ;
251 }
252
253 void fill() {
254 _vec.push_back(*_buf);
255 }
256
257 void write(Int_t i) {
258 assert(static_cast<std::size_t>(i) < _vec.size());
259 _vec[i] = *_buf ;
260 }
261
262 void reset() {
263 _vec.clear();
264 }
265
266 inline void load(std::size_t idx) const {
267 assert(idx < _vec.size());
268 *_buf = *(_vec.begin() + idx) ;
269 *_nativeBuf = *_buf ;
270 }
271
272 std::span<const double> getRange(std::size_t first, std::size_t last) const {
273 auto beg = std::min(_vec.cbegin() + first, _vec.cend());
274 auto end = std::min(_vec.cbegin() + last, _vec.cend());
275
276 return std::span<const double>(_vec.data(), std::distance(beg, end));
277 }
278
279 std::size_t size() const { return _vec.size() ; }
280
282 if (newSize < Int_t(_vec.capacity()) / 2 && _vec.capacity() > (VECTOR_BUFFER_SIZE / sizeof(double))) {
283 // do an expensive copy, if we save at least a factor 2 in size
284 std::vector<double> tmp;
285 tmp.reserve(std::max(newSize, Int_t(VECTOR_BUFFER_SIZE / sizeof(double))));
286 if (!_vec.empty())
287 tmp.assign(_vec.begin(), std::min(_vec.end(), _vec.begin() + newSize));
288 if (Int_t(tmp.size()) != newSize)
289 tmp.resize(newSize);
290 _vec.swap(tmp);
291 } else {
292 _vec.resize(newSize);
293 }
294 }
295
297 _vec.reserve(newSize);
298 }
299
300 const std::vector<double>& data() const {
301 return _vec;
302 }
303
304 std::vector<double>& data() { return _vec; }
305
306 protected:
307 std::vector<double> _vec;
308
309 private:
310 friend class RooVectorDataStore ;
311 RooAbsReal* _nativeReal = nullptr; ///< Instance which our data belongs to. This is the variable in the dataset.
312 RooAbsReal* _real = nullptr; ///< Instance where we should write data into when load() is called.
313 double* _buf = nullptr; ///<!
314 double* _nativeBuf = nullptr; ///<!
316 RooArgSet* _nset = nullptr; ///<!
317 ClassDef(RealVector,1) // STL-vector-based Data Storage class
318 } ;
319
320
321 class RealFullVector : public RealVector {
322 public:
324
327
333
335
337
338 void setErrorBuffer(double* newBuf) {
339 _bufE = newBuf ;
340 _vecE.reserve(_vec.capacity()) ;
341 }
342 void setAsymErrorBuffer(double* newBufL, double* newBufH) {
343 _bufEL = newBufL;
344 _bufEH = newBufH;
345 _vecEL.reserve(_vec.capacity()) ;
346 _vecEH.reserve(_vec.capacity()) ;
347 }
348
349 void fill() {
351 if (_bufE) _vecE.push_back(*_bufE) ;
352 if (_bufEL) _vecEL.push_back(*_bufEL) ;
353 if (_bufEH) _vecEH.push_back(*_bufEH) ;
354 } ;
355
356 void write(Int_t i) {
358 if (_bufE) _vecE[i] = *_bufE ;
359 if (_bufEL) _vecEL[i] = *_bufEL ;
360 if (_bufEH) _vecEH[i] = *_bufEH ;
361 }
362
363 void reset() {
365 _vecE.clear();
366 _vecEL.clear();
367 _vecEH.clear();
368 }
369
370 inline void load(Int_t idx) const {
371 RealVector::load(idx) ;
372 if (_bufE) *_bufE = _vecE[idx];
373 if (_bufEL) *_bufEL = _vecEL[idx];
374 if (_bufEH) *_bufEH = _vecEH[idx];
375 }
376
379 if(_bufE) _vecE.resize(newSize);
380 if(_bufEL) _vecEL.resize(newSize);
381 if(_bufEH) _vecEH.resize(newSize);
382 }
383
386 if(_bufE) _vecE.reserve(newSize);
387 if(_bufEL) _vecEL.reserve(newSize);
388 if(_bufEH) _vecEH.reserve(newSize);
389 }
390
391 double* bufE() const { return _bufE; }
392 double* bufEL() const { return _bufEL; }
393 double* bufEH() const { return _bufEH; }
394
395 std::vector<double> const& dataE() const { return _vecE; }
396 std::vector<double> const& dataEL() const { return _vecEL; }
397 std::vector<double> const& dataEH() const { return _vecEH; }
398
399 private:
400
401 double *_bufE = nullptr; ///<!
402 double *_bufEL = nullptr; ///<!
403 double *_bufEH = nullptr; ///<!
404 std::vector<double> _vecE;
405 std::vector<double> _vecEL;
406 std::vector<double> _vecEH;
407 ClassDefOverride(RealFullVector,2); // STL-vector-based Data Storage class
408 };
409
410
411 class CatVector {
412 public:
417
423
424 virtual ~CatVector() {
425 }
426
427 CatVector(const CatVector& other, RooAbsCategory* cat = nullptr) :
429 {
430
431 }
432
434 if (&other==this) return *this;
435 _cat = other._cat;
436 _buf = other._buf;
437 _nativeBuf = other._nativeBuf;
438 if (other._vec.size() <= _vec.capacity() / 2 && _vec.capacity() > VECTOR_BUFFER_SIZE) {
439 std::vector<RooAbsCategory::value_type> tmp;
440 tmp.reserve(std::max(other._vec.size(), std::size_t(VECTOR_BUFFER_SIZE)));
441 tmp.assign(other._vec.begin(), other._vec.end());
442 _vec.swap(tmp);
443 } else {
444 _vec = other._vec;
445 }
446
447 return *this;
448 }
449
454
458
459 void fill() {
460 _vec.push_back(*_buf) ;
461 }
462
463 void write(std::size_t i) {
464 _vec[i] = *_buf;
465 }
466
467 void reset() {
468 // make sure the vector releases the underlying memory
469 std::vector<RooAbsCategory::value_type> tmp;
470 _vec.swap(tmp);
471 }
472
473 inline void load(std::size_t idx) const {
474 *_buf = _vec[idx];
475 *_nativeBuf = *_buf;
476 }
477
478 std::span<const RooAbsCategory::value_type> getRange(std::size_t first, std::size_t last) const {
479 auto beg = std::min(_vec.cbegin() + first, _vec.cend());
480 auto end = std::min(_vec.cbegin() + last, _vec.cend());
481
482 return std::span<const RooAbsCategory::value_type>(_vec.data(), std::distance(beg, end));
483 }
484
485
486 std::size_t size() const { return _vec.size() ; }
487
489 if (newSize < Int_t(_vec.capacity()) / 2 && _vec.capacity() > VECTOR_BUFFER_SIZE) {
490 // do an expensive copy, if we save at least a factor 2 in size
491 std::vector<RooAbsCategory::value_type> tmp;
492 tmp.reserve(std::max(newSize, VECTOR_BUFFER_SIZE));
493 if (!_vec.empty())
494 tmp.assign(_vec.begin(), std::min(_vec.end(), _vec.begin() + newSize));
495 if (Int_t(tmp.size()) != newSize)
496 tmp.resize(newSize);
497 _vec.swap(tmp);
498 } else {
499 _vec.resize(newSize);
500 }
501 }
502
504 _vec.reserve(newSize);
505 }
506
507 void setBufArg(RooAbsCategory* arg) { _cat = arg; }
508 const RooAbsCategory* bufArg() const { return _cat; }
509
510 std::vector<RooAbsCategory::value_type>& data() { return _vec; }
511
512 private:
513 friend class RooVectorDataStore ;
517 std::vector<RooAbsCategory::value_type> _vec;
518 ClassDef(CatVector,2) // STL-vector-based Data Storage class
519 } ;
520
521 std::vector<RealVector*>& realStoreList() { return _realStoreList ; }
522 std::vector<RealFullVector*>& realfStoreList() { return _realfStoreList ; }
523 std::vector<CatVector*>& catStoreList() { return _catStoreList ; }
524
525 protected:
526
527 friend class RooAbsReal ;
528 friend class RooAbsCategory ;
529 friend class RooRealVar ;
530
532
534
536
537 bool hasError(RooAbsReal* real);
538
540
542
543 private:
545 RooRealVar* _wgtVar = nullptr; ///< Pointer to weight variable (if set)
546
547 std::vector<RealVector*> _realStoreList ;
548 std::vector<RealFullVector*> _realfStoreList ;
549 std::vector<CatVector*> _catStoreList ;
550
551 void setAllBuffersNative() ;
552
553 double _sumWeight = 0.0;
554 double _sumWeightCarry = 0.0;
555
556 const double* _extWgtArray = nullptr; ///<! External weight array
557 const double* _extWgtErrLoArray = nullptr; ///<! External weight array - low error
558 const double* _extWgtErrHiArray = nullptr; ///<! External weight array - high error
559 const double* _extSumW2Array = nullptr; ///<! External sum of weights array
560
562
563 ClassDefOverride(RooVectorDataStore, 7) // STL-vector-based Data Storage class
564};
565
566
567#endif
#define d(i)
Definition RSha256.hxx:102
#define VECTOR_BUFFER_SIZE
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
#define ClassDef(name, id)
Definition Rtypes.h:343
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
char name[80]
Definition TGX11.cxx:142
#define hi
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2570
const_iterator begin() const
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:76
A space to attach TBranches.
Abstract base class for a data collection.
virtual double weight() const =0
virtual const RooArgSet * get() const
std::map< RooFit::Detail::DataKey, std::span< const double > > RealSpans
Definition RooAbsData.h:131
std::map< RooFit::Detail::DataKey, std::span< const RooAbsCategory::value_type > > CategorySpans
Definition RooAbsData.h:132
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:63
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition RooAbsReal.h:107
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Meta object that tracks value changes in a given set of RooAbsArgs by registering itself as value cli...
bool hasChanged(bool clearState)
Returns true if state has changed since last call with clearState=true.
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
Variable that can be changed from the outside.
Definition RooRealVar.h:37
The RooStringView is a wrapper around a C-style string that can also be constructed from a std::strin...
TTree-backed data storage.
void setBufArg(RooAbsCategory *arg)
void setBuffer(RooAbsCategory::value_type *newBuf)
CatVector(UInt_t initialCapacity=1024)
RooAbsCategory::value_type * _buf
!
std::span< const RooAbsCategory::value_type > getRange(std::size_t first, std::size_t last) const
RooAbsCategory::value_type * _nativeBuf
!
CatVector & operator=(const CatVector &other)
void load(std::size_t idx) const
std::vector< RooAbsCategory::value_type > _vec
void setNativeBuffer(RooAbsCategory::value_type *newBuf=nullptr)
CatVector(RooAbsCategory *cat, UInt_t initialCapacity=1024)
const RooAbsCategory * bufArg() const
std::vector< RooAbsCategory::value_type > & data()
CatVector(const CatVector &other, RooAbsCategory *cat=nullptr)
RealFullVector(RooAbsReal *arg, UInt_t initialCapacity=(1024/sizeof(double)))
RealFullVector(const RealFullVector &other, RooAbsReal *real=nullptr)
std::vector< double > const & dataE() const
RealFullVector & operator=(RealFullVector const &other)=delete
std::vector< double > const & dataEL() const
RealFullVector(UInt_t initialCapacity=(1024/sizeof(double)))
RealFullVector(const RealVector &other, RooAbsReal *real=nullptr)
std::vector< double > const & dataEH() const
void setAsymErrorBuffer(double *newBufL, double *newBufH)
std::span< const double > getRange(std::size_t first, std::size_t last) const
RealVector & operator=(const RealVector &other)
RealVector(const RealVector &other, RooAbsReal *real=nullptr)
const RooAbsReal * bufArg() const
void setNset(RooArgSet *newNset)
std::vector< double > & data()
RooAbsReal * _nativeReal
Instance which our data belongs to. This is the variable in the dataset.
void setDependents(const RooArgSet &deps)
RealVector(UInt_t initialCapacity=(1024/sizeof(double)))
RooAbsReal * _real
Instance where we should write data into when load() is called.
void setBuffer(RooAbsReal *real, double *newBuf)
RealVector(RooAbsReal *arg, UInt_t initialCapacity=(1024/sizeof(double)))
void load(std::size_t idx) const
void setNativeBuffer(double *newBuf=nullptr)
const std::vector< double > & data() const
Uses std::vector to store data columns.
const RooArgSet & row()
RooAbsDataStore * clone(const RooArgSet &vars, const char *newname=nullptr) const override
std::vector< CatVector * > & catStoreList()
std::vector< RealFullVector * > _realfStoreList
void setExternalWeightArray(const double *arrayWgt, const double *arrayWgtErrLo, const double *arrayWgtErrHi, const double *arraySumW2) override
Int_t numEntries() const override
RooAbsDataStore * clone(const char *newname=nullptr) const override
RooAbsArg * addColumn(RooAbsArg &var, bool adjustRange=true) override
Add a new column to the data set which holds the pre-calculated values of 'newVar'.
const double * _extWgtErrHiArray
! External weight array - high error
std::span< const double > getWeightBatch(std::size_t first, std::size_t len) const override
Return the weights of all events in the range [first, first+len).
~RooVectorDataStore() override
Destructor.
void resetBuffers() override
RooRealVar * weightVar(const RooArgSet &allVars, const char *wgtName)
Utility function for constructors Return pointer to weight variable if it is defined.
RooRealVar * _wgtVar
Pointer to weight variable (if set)
std::vector< RealVector * > _realStoreList
CatVector * addCategory(RooAbsCategory *cat)
void loadValues(const RooAbsDataStore *tds, const RooFormulaVar *select=nullptr, const char *rangeName=nullptr, std::size_t nStart=0, std::size_t nStop=std::numeric_limits< std::size_t >::max()) override
RealFullVector * addRealFull(RooAbsReal *real)
double weight() const override
Return the weight of the last-retrieved data point.
RooAbsData::RealSpans getBatches(std::size_t first, std::size_t len) const override
Return batches of the data columns for the requested events.
bool isFullReal(RooAbsReal *real)
bool isWeighted() const override
double sumEntries() const override
Int_t fill() override
Interface function to TTree::Fill.
std::vector< RealFullVector * > & realfStoreList()
const double * _extWgtErrLoArray
! External weight array - low error
void append(RooAbsDataStore &other) override
bool hasError(RooAbsReal *real)
std::vector< CatVector * > _catStoreList
double weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const override
Return the error of the current weight.
void attachBuffers(const RooArgSet &extObs) override
ArraysStruct getArrays() const
Exports all arrays in this RooVectorDataStore into a simple datastructure to be used by RooFit intern...
RooAbsData::CategorySpans getCategoryBatches(std::size_t, std::size_t len) const override
RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore * > dstoreList) override
Merge columns of supplied data set(s) with this data set.
RealVector * addReal(RooAbsReal *real)
bool hasAsymError(RooAbsReal *real)
bool changeObservableName(const char *from, const char *to) override
const double * _extSumW2Array
! External sum of weights array
void recomputeSumWeight()
Trigger a recomputation of the cached weight sums.
std::vector< RealVector * > & realStoreList()
std::size_t size() const
Get size of stored dataset.
std::unique_ptr< RooAbsDataStore > reduce(RooStringView name, RooStringView title, const RooArgSet &vars, const RooFormulaVar *cutVar, const char *cutRange, std::size_t nStart, std::size_t nStop) override
virtual const RooArgSet * get() const
const double * _extWgtArray
! External weight array
RooArgSet varsNoWeight(const RooArgSet &allVars, const char *wgtName)
Utility function for constructors Return RooArgSet that is copy of allVars minus variable matching wg...
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
A TTree represents a columnar dataset.
Definition TTree.h:89
const Int_t n
Definition legend1.C:16
Output struct for the RooVectorDataStore::getArrays() helper function.
std::vector< ArrayInfo< double > > reals
std::vector< ArrayInfo< RooAbsCategory::value_type > > cats