128 vector<RealVector*>::const_iterator oiter =
_realStoreList.begin() ;
130 (*oiter)->setNativeBuffer() ;
133 vector<RealFullVector*>::const_iterator fiter =
_realfStoreList.begin() ;
135 (*fiter)->setNativeBuffer() ;
138 vector<CatVector*>::const_iterator citer =
_catStoreList.begin() ;
140 (*citer)->setNativeBuffer() ;
206 vector<RealVector*>::const_iterator oiter = other.
_realStoreList.begin() ;
212 vector<RealFullVector*>::const_iterator fiter = other.
_realfStoreList.begin() ;
218 vector<CatVector*>::const_iterator citer = other.
_catStoreList.begin() ;
305 vector<RealVector*>::const_iterator oiter = other.
_realStoreList.begin() ;
317 vector<RealFullVector*>::const_iterator fiter = other.
_realfStoreList.begin() ;
329 vector<CatVector*>::const_iterator citer = other.
_catStoreList.begin() ;
404 loadValues(&tds,cloneVar,cutRange,nStart,nStop);
421 for ( ; iter!=iend ; ++iter) {
426 for ( ; iter3!=iend3 ; ++iter3) {
431 for ( ; iter2!=iend2 ; ++iter2) {
687 throw string(
Form(
"RooDataHist::weightError(%s) error type Auto not allowed here",
GetName())) ;
691 throw string(
Form(
"RooDataHist::weightError(%s) error type Expected not allowed here",
GetName())) ;
787 for(
Int_t i=nStart; i < nevent ; ++i) {
791 if (selectClone && selectClone->
getVal()==0) {
874 << valHolder->
GetName() <<
"\"" << endl;
890 if (dynamic_cast<RooAbsReal*>(valHolder)) {
893 }
else if (dynamic_cast<RooAbsCategory*>((
RooAbsCategory*)valHolder)) {
904 if (rv) rv->
write(i) ;
905 if (cv) cv->
write(i) ;
933 holderSet->
add(*valHolder) ;
938 << valHolder->
GetName() <<
"\"" << endl;
944 if (!newVarCloneList) {
946 <<
") Couldn't deep-clone variable " << var->
GetName() <<
", abort." << endl ;
953 cloneSetList.
Add(newVarCloneList) ;
954 cloneSet.
add(*newVarClone) ;
969 if (dynamic_cast<RooAbsReal*>(holder)) {
989 if (dynamic_cast<RooAbsReal*>(holder)) {
1017 Int_t nevt = dstoreList.front()->numEntries() ;
1019 for (
int i=0 ; i<nevt ; i++) {
1022 mergedStore->
_vars = *
get(i) ;
1025 for (list<RooAbsDataStore*>::iterator iter = dstoreList.begin() ; iter!=dstoreList.end() ; ++iter) {
1026 const RooArgSet* partSet = (*iter)->get(i) ;
1027 mergedStore->
_vars = *partSet ;
1030 mergedStore->
fill() ;
1032 return mergedStore ;
1041 (*iter)->reserve(nEvts);
1045 (*iter3)->reserve(nEvts);
1047 vector<CatVector*>::iterator iter2 =
_catStoreList.begin() ;
1049 (*iter2)->reserve(nEvts);
1059 for (
int i=0 ; i<nevt ; i++) {
1094 vector<CatVector*>::iterator iter2 =
_catStoreList.begin() ;
1102 struct less_dep :
public binary_function<RooAbsArg*, RooAbsArg*, bool> {
1129 vector<RooAbsArg*> trackArgs ;
1130 while((arg=itern.
next())) {
1132 orderedArgs.
add(*arg) ;
1140 trackArgs.push_back(arg) ;
1148 if (trackArgs.size()>1) {
1149 sort(trackArgs.begin(),trackArgs.end(),less_dep()) ;
1153 for (vector<RooAbsArg*>::iterator viter = trackArgs.begin() ; viter!=trackArgs.end() ; ++viter) {
1154 orderedArgs.
add(**viter) ;
1167 list<RooArgSet*> vlist ;
1177 vlist.push_back(newVarCloneList) ;
1178 cloneSet.
add(*newVarClone) ;
1191 vector<RooArgSet*> nsetList ;
1192 list<RooArgSet*> argObsList ;
1201 argObsList.push_back(argObs) ;
1228 nsetList.push_back(normSet) ;
1236 if (
weight()!=0 || !skipZeroWeights) {
1238 vector<RooArgSet*>::iterator niter = nsetList.begin() ;
1242 cloneArg->
syncCache(argNset?argNset:nset) ;
1268 coutI(
Optimization) <<
"RooVectorDataStore::cacheArg() element " << arg->
GetName() <<
" has change tracking enabled on parameters " << *deps << endl ;
1276 for (list<RooArgSet*>::iterator iter = vlist.begin() ; iter!=vlist.end() ; ++iter) {
1279 for (list<RooArgSet*>::iterator iter = argObsList.begin() ; iter!=argObsList.end() ; ++iter) {
1301 std::vector<RooVectorDataStore::RealVector *> tv;
1308 tv.push_back(cacheElem);
1324 if (projectedArgs && projectedArgs->
getSize()>0) {
1327 usedNset = ownedNset ;
1334 for (
int i=firstEvent ; i<lastEvent ; i+=stepSize) {
1337 if (!zeroWeight || !skipZeroWeights) {
1338 for (std::vector<RooVectorDataStore::RealVector *>::iterator cacheIt = tv.begin(); cacheIt != tv.end();
1340 (*cacheIt)->_nativeReal->_valueDirty =
kTRUE;
1341 (*cacheIt)->_nativeReal->getValV((*cacheIt)->_nset ? (*cacheIt)->_nset : usedNset);
1342 (*cacheIt)->write(i);
1362 for (std::vector<RooVectorDataStore::RealVector *>::iterator cacheIt = tv.begin(); cacheIt != tv.end(); ++cacheIt) {
1448 while((arg=iter.
next())) {
1464 while((arg=iter.
next())) {
1475 cout <<
"RooVectorDataStor::dump()" << endl ;
1478 cout <<
"realVector list is" << endl ;
1479 std::vector<RealVector*>::iterator iter =
_realStoreList.begin() ;
1481 cout <<
"RealVector " << *iter <<
" _nativeReal = " << (*iter)->_nativeReal <<
" = " << (*iter)->_nativeReal->GetName() <<
" bufptr = " << (*iter)->_buf << endl ;
1482 cout <<
" values : " ;
1483 Int_t imax = (*iter)->_vec.size()>10 ? 10 : (*iter)->_vec.size() ;
1484 for (
Int_t i=0 ; i<imax ; i++) {
1485 cout << (*iter)->_vec[i] <<
" " ;
1489 std::vector<RealFullVector*>::iterator iter2 =
_realfStoreList.begin() ;
1491 cout <<
"RealFullVector " << *iter2 <<
" _nativeReal = " << (*iter2)->_nativeReal <<
" = " << (*iter2)->_nativeReal->GetName()
1492 <<
" bufptr = " << (*iter2)->_buf <<
" errbufptr = " << (*iter2)->_bufE << endl ;
1494 cout <<
" values : " ;
1495 Int_t imax = (*iter2)->_vec.size()>10 ? 10 : (*iter2)->_vec.size() ;
1496 for (
Int_t i=0 ; i<imax ; i++) {
1497 cout << (*iter2)->_vec[i] <<
" " ;
1500 if ((*iter2)->_vecE) {
1501 cout <<
" errors : " ;
1502 for (
Int_t i=0 ; i<imax ; i++) {
1503 cout << (*(*iter2)->_vecE)[i] <<
" " ;
1515 void RooVectorDataStore::Streamer(
TBuffer &R__b)
1550 void RooVectorDataStore::RealVector::Streamer(
TBuffer &R__b)
1554 _vec0 = _vec.size()>0 ? &_vec.front() : 0 ;
1563 void RooVectorDataStore::RealFullVector::Streamer(
TBuffer &R__b)
1571 if (_vecE && _vecE->empty()) {
delete _vecE ; _vecE = 0 ; }
1572 if (_vecEL && _vecEL->empty()) {
delete _vecEL ; _vecEL = 0 ; }
1573 if (_vecEH && _vecEH->empty()) {
delete _vecEH ; _vecEH = 0 ; }
1582 void RooVectorDataStore::CatVector::Streamer(
TBuffer &R__b)
1586 _vec0 = _vec.size()>0 ? &_vec.front() : 0 ;
CatVector * addCategory(RooAbsCategory *cat)
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual const char * GetName() const
Returns name of object.
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
virtual const RooArgSet * get() const
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t valid() const
Return true if currently loaded coordinate is considered valid within the current range definitions o...
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValueDirty=kTRUE)
Copy the cached value from given source and raise dirty flag.
void setAllBuffersNative()
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Double_t * _extSumW2Array
External weight array - high error.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
RooRealVar * weightVar(const RooArgSet &allVars, const char *wgtName)
Utility function for constructors Return pointer to weight variable if it is defined.
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
virtual Int_t fill()
Interface function to TTree::Fill.
virtual 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 cac...
virtual 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...
virtual Double_t weight() const =0
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Int_t index(const RooAbsArg *arg) const
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Double_t getVal(const RooArgSet *set=0) const
virtual void reserve(Int_t nEvt)
virtual void setDirtyProp(Bool_t flag)
void setDependents(const RooArgSet &deps)
virtual void attachToVStore(RooVectorDataStore &vstore)
Attach the category index and label to as branches to the given vector store.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)
Add a new column to the data set which holds the pre-calculated values of 'newVar'.
virtual 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...
virtual void recalculateCache(const RooArgSet *, Int_t firstEvent, Int_t lastEvent, Int_t stepSize, Bool_t skipZeroWeights)
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Initialize cache of dataset: attach variables of cache ArgSet to the corresponding TTree branches...
Buffer base class used for serializing objects.
virtual void append(RooAbsDataStore &other)
Double_t _sumWeight
do not persist
void setNameList(const char *givenList)
virtual const RooArgSet * get(Int_t index) const =0
Double_t * _extWgtErrLoArray
External weight array.
RooAbsArg * _cacheOwner
Optimization cache.
RooTreeDataStore is the abstract base class for data collection that use a TTree as internal storage ...
TRObject operator()(const T1 &t1) const
Double_t _curWgt
External sum of weights array.
Iterator abstract base class.
Bool_t _doDirtyProp
Iterator over cached variables.
virtual Bool_t inRange(const char *) const
void setValueDirty() const
virtual void syncCache(const RooArgSet *nset=0)=0
virtual RooArgSet * addColumns(const RooArgList &varList)
Utility function to add multiple columns in one call See addColumn() for details. ...
virtual Int_t numEntries() const =0
std::vector< RealFullVector * > _realfStoreList
RooArgSet varsNoWeight(const RooArgSet &allVars, const char *wgtName)
Utility function for constructors Return RooArgSet that is copy of allVars minus variable matching wg...
Bool_t _forcedUpdate
Cache owner.
Bool_t hasAsymError(Bool_t allowZero=kTRUE) 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")) ;
void setNset(RooArgSet *newNset)
std::vector< RealVector * > _realStoreList
virtual void resetBuffers()
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
virtual void attachToVStore(RooVectorDataStore &vstore)=0
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
Disabling of branches is (intentionally) not implemented in vector data stores (as the doesn't result...
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Bool_t hasError(Bool_t allowZero=kTRUE) const
virtual RooAbsArg * createFundamental(const char *newname=0) const =0
virtual Int_t numEntries() const
RooRealVar represents a fundamental (non-derived) real valued object.
virtual Bool_t isFundamental() const
CatVector ** _firstCat
do not persist
virtual void setVal(Double_t value)
Set value of variable to 'value'.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
RooNameSet is a utility class that stores the names the objects in a RooArget.
virtual void checkInit() const
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
Double_t getAsymErrorHi() const
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
virtual 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...
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
char * Form(const char *fmt,...)
static const RooHistError & instance()
Return a reference to a singleton object that is created the first time this method is called...
void attachDataStore(const RooAbsDataStore &set)
Replace server nodes with names matching the dataset variable names with those data set variables...
virtual Double_t weight() const
Return the weight of the n-th data point (n='index') in memory.
virtual Int_t numEntries() const
Double_t * _extWgtErrHiArray
External weight array - low error.
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
std::vector< CatVector * > _catStoreList
RooVectorDataStore * _cache
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, Bool_t oneSafe=kFALSE)
The assignment operator sets the value of any argument in our set that also appears in the other set...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooFIter fwdIterator() const
virtual void attachToVStore(RooVectorDataStore &vstore)
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RealVector * addReal(RooAbsReal *real)
Bool_t getPoissonInterval(Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const
Return a confidence interval for the expected number of events given n observed (unweighted) events...
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
RooArgSet _varsww
Was object constructed with default ctor?
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
virtual ~RooVectorDataStore()
Destructor.
virtual void Add(TObject *obj)
virtual TObject * Next()=0
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const
float type_of_call hi(const int &, const int &)
RealFullVector ** _firstRealF
do not persist
virtual void attachBuffers(const RooArgSet &extObs)
virtual Bool_t changeObservableName(const char *from, const char *to)
RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore *> dstoreList)
Merge columns of supplied data set(s) with this data set.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Double_t getError() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Double_t getAsymErrorLo() const
virtual void resetCache()
virtual const char * GetTitle() const
Returns title of object.