ROOT logo
ROOT » ROOFIT » ROOFITCORE » RooVectorDataStore

class RooVectorDataStore: public RooAbsDataStore



RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storage mechanism

Function Members (Methods)

public:
RooVectorDataStore()
RooVectorDataStore(const RooVectorDataStore& other, const char* newname = 0)
RooVectorDataStore(const RooTreeDataStore& other, const RooArgSet& vars, const char* newname = 0)
RooVectorDataStore(const RooVectorDataStore& other, const RooArgSet& vars, const char* newname = 0)
RooVectorDataStore(const char* name, const char* title, const RooArgSet& vars, const char* wgtVarName = 0)
RooVectorDataStore(const char* name, const char* title, RooAbsDataStore& tds, const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, Int_t nStart, Int_t nStop, Bool_t, const char* wgtVarName = 0)
virtual~RooVectorDataStore()
voidTObject::AbstractMethod(const char* method) const
virtual RooAbsArg*addColumn(RooAbsArg& var, Bool_t adjustRange = kTRUE)
virtual RooArgSet*addColumns(const RooArgList& varList)
virtual voidappend(RooAbsDataStore& other)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidattachBuffers(const RooArgSet& extObs)
virtual voidattachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
virtual voidTObject::Browse(TBrowser* b)
const RooVectorDataStore*cache() const
virtual voidcacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const RooArgSet* nset = 0, Bool_t skipZeroWeights = kTRUE)
const RooArgSet&RooAbsDataStore::cachedVars() const
virtual const RooAbsArg*cacheOwner()
virtual Bool_tchangeObservableName(const char* from, const char* to)
virtual voidRooAbsDataStore::checkInit() const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual RooAbsDataStore*clone(const char* newname = 0) const
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual RooAbsDataStore*clone(const RooArgSet& vars, const char* newname = 0) const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tRooAbsDataStore::defaultPrintContents(Option_t* opt) const
static ostream&RooPrintable::defaultPrintStream(ostream* os = 0)
virtual RooPrintable::StyleOptionRooPrintable::defaultPrintStyle(Option_t* opt) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Bool_tRooAbsDataStore::dirtyProp() const
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voiddump()
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual Int_tfill()
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual const RooArgSet*get(Int_t index) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual const RooArgSet*getNative(Int_t index) const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tisWeighted() const
Bool_tTObject::IsZombie() const
virtual voidloadValues(const RooAbsDataStore* tds, const RooFormulaVar* select = 0, const char* rangeName = 0, Int_t nStart = 0, Int_t nStop = 2000000000)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual RooAbsDataStore*merge(const RooArgSet& allvars, list<RooAbsDataStore*> dstoreList)
static voidRooPrintable::nameFieldLength(Int_t newLen)
virtual Bool_tTObject::Notify()
virtual Int_tnumEntries() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
RooVectorDataStore&operator=(const RooVectorDataStore&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidRooAbsDataStore::Print(Option_t* options = 0) const
virtual voidRooPrintable::printAddress(ostream& os) const
virtual voidRooAbsDataStore::printArgs(ostream& os) const
virtual voidRooAbsDataStore::printClassName(ostream& os) const
virtual voidRooPrintable::printExtras(ostream& os) const
virtual voidRooAbsDataStore::printMultiline(ostream& os, Int_t content, Bool_t verbose, TString indent) const
virtual voidRooAbsDataStore::printName(ostream& os) const
virtual voidRooPrintable::printStream(ostream& os, Int_t contents, RooPrintable::StyleOption style, TString indent = "") const
virtual voidRooAbsDataStore::printTitle(ostream& os) const
virtual voidRooPrintable::printTree(ostream& os, TString indent = "") const
virtual voidRooAbsDataStore::printValue(ostream& os) const
virtual Int_tTObject::Read(const char* name)
virtual voidrecalculateCache(const RooArgSet*, Int_t firstEvent, Int_t lastEvent, Int_t stepSize, Bool_t skipZeroWeights)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidreserve(Int_t nEvt)
virtual voidreset()
voidTObject::ResetBit(UInt_t f)
virtual voidresetBuffers()
virtual voidresetCache()
const RooArgSet&row()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidsetArgStatus(const RooArgSet& set, Bool_t active)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidsetDirtyProp(Bool_t flag)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidsetExternalWeightArray(Double_t* arrayWgt, Double_t* arrayWgtErrLo, Double_t* arrayWgtErrHi, Double_t* arraySumW2)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual Double_tsumEntries() const
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual const TTree*RooAbsDataStore::tree() const
virtual voidTObject::UseCurrentStyle()
virtual Bool_tvalid() const
RooArgSetvarsNoWeight(const RooArgSet& allVars, const char* wgtName)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Double_tweight() const
virtual Double_tweight(Int_t index) const
virtual Double_tweightError(RooAbsData::ErrorType etype = RooAbsData::Poisson) const
virtual voidweightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = RooAbsData::Poisson) const
RooRealVar*weightVar(const RooArgSet& allVars, const char* wgtName)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
RooVectorDataStore::CatVector*addCategory(RooAbsCategory* cat)
RooVectorDataStore::RealVector*addReal(RooAbsReal* real)
RooVectorDataStore::RealFullVector*addRealFull(RooAbsReal* real)
vector<CatVector*>&catStoreList()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidforceCacheUpdate()
Bool_thasAsymError(RooAbsReal* real)
Bool_thasError(RooAbsReal* real)
virtual Bool_thasFilledCache() const
Bool_tisFullReal(RooAbsReal* real)
voidTObject::MakeZombie()
vector<RealFullVector*>&realfStoreList()
vector<RealVector*>&realStoreList()
private:
voidsetAllBuffersNative()

Data Members

protected:
TIterator*RooAbsDataStore::_cacheIter! Iterator over cached variables
RooArgSetRooAbsDataStore::_cachedVars
Bool_tRooAbsDataStore::_doDirtyPropSwitch do (de)activate dirty state propagation when loading a data point
TIterator*RooAbsDataStore::_iterator! Iterator over dimension variables
static Int_tRooPrintable::_nameLength
RooArgSetRooAbsDataStore::_vars
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
RooVectorDataStore*_cache! Optimization cache
RooAbsArg*_cacheOwner! Cache owner
vector<CatVector*>_catStoreList
Double_t_curWgtWeight of current event
Double_t_curWgtErrWeight of current event
Double_t_curWgtErrHiWeight of current event
Double_t_curWgtErrLoWeight of current event
Double_t*_extSumW2Array! External sum of weights array
Double_t*_extWgtArray! External weight array
Double_t*_extWgtErrHiArray! External weight array - high error
Double_t*_extWgtErrLoArray! External weight array - low error
RooVectorDataStore::CatVector**_firstCat! do not persist
RooVectorDataStore::RealVector**_firstReal! do not persist
RooVectorDataStore::RealFullVector**_firstRealF! do not persist
Bool_t_forcedUpdate! Request for forced cache update
Int_t_nCat
Int_t_nEntries
Int_t_nReal
Int_t_nRealF
vector<RealVector*>_realStoreList
vector<RealFullVector*>_realfStoreList
Double_t_sumWeight
Double_t_sumWeightCarry
RooArgSet_varsww
RooRealVar*_wgtVarPointer to weight variable (if set)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RooVectorDataStore()
RooVectorDataStore(const char* name, const char* title, const RooArgSet& vars, const char* wgtVarName = 0)
void setAllBuffersNative()
RooArgSet varsNoWeight(const RooArgSet& allVars, const char* wgtName)
 Utility function for constructors
 Return RooArgSet that is copy of allVars minus variable matching wgtName if specified
RooRealVar* weightVar(const RooArgSet& allVars, const char* wgtName)
 Utility function for constructors
 Return pointer to weight variable if it is defined
RooVectorDataStore(const RooVectorDataStore& other, const char* newname = 0)
 Regular copy ctor
RooVectorDataStore(const RooTreeDataStore& other, const RooArgSet& vars, const char* newname = 0)
RooVectorDataStore(const RooVectorDataStore& other, const RooArgSet& vars, const char* newname = 0)
 Clone ctor, must connect internal storage to given new external set of vars
RooVectorDataStore(const char* name, const char* title, RooAbsDataStore& tds, const RooArgSet& vars, const RooFormulaVar* cutVar, const char* cutRange, Int_t nStart, Int_t nStop, Bool_t , const char* wgtVarName = 0)
~RooVectorDataStore()
 Destructor
Bool_t valid() const
 Return true if currently loaded coordinate is considered valid within
 the current range definitions of all observables
Int_t fill()
 Interface function to TTree::Fill
const RooArgSet* get(Int_t index) const
 Load the n-th data point (n='index') in memory
 and return a pointer to the internal RooArgSet
 holding its coordinates.
const RooArgSet* getNative(Int_t index) const
 Load the n-th data point (n='index') in memory
 and return a pointer to the internal RooArgSet
 holding its coordinates.
Double_t weight(Int_t index) const
 Return the weight of the n-th data point (n='index') in memory
Double_t weight() const
 Return the weight of the n-th data point (n='index') in memory
Double_t weightError(RooAbsData::ErrorType etype = RooAbsData::Poisson) const
void weightError(Double_t& lo, Double_t& hi, RooAbsData::ErrorType etype = RooAbsData::Poisson) const
void loadValues(const RooAbsDataStore* tds, const RooFormulaVar* select = 0, const char* rangeName = 0, Int_t nStart = 0, Int_t nStop = 2000000000)
   throw(std::string("RooVectorDataSore::loadValues() NOT IMPLEMENTED")) ;
Bool_t changeObservableName(const char* from, const char* to)
RooAbsArg* addColumn(RooAbsArg& var, Bool_t adjustRange = kTRUE)
 Add a new column to the data set which holds the pre-calculated values
 of 'newVar'. This operation is only meaningful if 'newVar' is a derived
 value.

 The return value points to the added element holding 'newVar's value
 in the data collection. The element is always the corresponding fundamental
 type of 'newVar' (e.g. a RooRealVar if 'newVar' is a RooFormulaVar)

 Note: This function is explicitly NOT intended as a speed optimization
       opportunity for the user. Components of complex PDFs that can be
       precalculated with the dataset are automatically identified as such
       and will be precalculated when fitting to a dataset

       By forcibly precalculating functions with non-trivial Jacobians,
       or functions of multiple variables occurring in the data set,
       using addColumn(), you may alter the outcome of the fit.

       Only in cases where such a modification of fit behaviour is intentional,
       this function should be used.
RooArgSet* addColumns(const RooArgList& varList)
 Utility function to add multiple columns in one call
 See addColumn() for details
RooAbsDataStore* merge(const RooArgSet& allvars, list<RooAbsDataStore*> dstoreList)
 Merge columns of supplied data set(s) with this data set.  All
 data sets must have equal number of entries.  In case of
 duplicate columns the column of the last dataset in the list
 prevails
void reserve(Int_t nEvt)
void append(RooAbsDataStore& other)
Int_t numEntries() const
void reset()
void cacheArgs(const RooAbsArg* owner, RooArgSet& varSet, const RooArgSet* nset = 0, Bool_t skipZeroWeights = kTRUE)
 Cache given RooAbsArgs with this tree: The tree is
 given direct write access of the args internal cache
 the args values is pre-calculated for all data points
 in this data collection. Upon a get() call, the
 internal cache of 'newVar' will be loaded with the
 precalculated value and it's dirty flag will be cleared.
void forceCacheUpdate()
void recalculateCache(const RooArgSet* , Int_t firstEvent, Int_t lastEvent, Int_t stepSize, Bool_t skipZeroWeights)
void attachCache(const RooAbsArg* newOwner, const RooArgSet& cachedVars)
 Initialize cache of dataset: attach variables of cache ArgSet
 to the corresponding TTree branches
void resetCache()
void setArgStatus(const RooArgSet& set, Bool_t active)
 Disabling of branches is (intentionally) not implemented in vector
 data stores (as the doesn't result in a net saving of time)
void attachBuffers(const RooArgSet& extObs)
void resetBuffers()
void dump()
void Streamer(TBuffer& )
 Stream an object of class RooVectorDataStore.
RooAbsDataStore* clone(const char* newname = 0) const
{ return new RooVectorDataStore(*this,newname) ; }
RooAbsDataStore* clone(const RooArgSet& vars, const char* newname = 0) const
{ return new RooVectorDataStore(*this,vars,newname) ; }
Bool_t isWeighted() const
{ return (_wgtVar!=0||_extWgtArray!=0) ; }
Double_t sumEntries() const
{ return _sumWeight ; }
const RooAbsArg* cacheOwner()
 Constant term  optimizer interface
{ return _cacheOwner ; }
const RooVectorDataStore* cache() const
{ return _cache ; }
void setExternalWeightArray(Double_t* arrayWgt, Double_t* arrayWgtErrLo, Double_t* arrayWgtErrHi, Double_t* arraySumW2)
void setDirtyProp(Bool_t flag)
const RooArgSet& row()
virtual void checkInit() const;
{ return _varsww ; }
RealVector& operator=(const RooVectorDataStore& )
std::vector<RealVector*>& realStoreList()
{ return _realStoreList ; }
std::vector<RealFullVector*>& realfStoreList()
{ return _realfStoreList ; }
std::vector<CatVector*>& catStoreList()
{ return _catStoreList ; }
CatVector* addCategory(RooAbsCategory* cat)
RealVector* addReal(RooAbsReal* real)
Bool_t isFullReal(RooAbsReal* real)
Bool_t hasError(RooAbsReal* real)
Bool_t hasAsymError(RooAbsReal* real)
RealFullVector* addRealFull(RooAbsReal* real)
Bool_t hasFilledCache() const
{ return _cache ? kTRUE : kFALSE ; }