130 vector<RealVector*>::const_iterator oiter =
_realStoreList.begin() ;
132 (*oiter)->setNativeBuffer() ;
135 vector<RealFullVector*>::const_iterator fiter =
_realfStoreList.begin() ;
137 (*fiter)->setNativeBuffer() ;
140 vector<CatVector*>::const_iterator citer =
_catStoreList.begin() ;
142 (*citer)->setNativeBuffer() ;
208 vector<RealVector*>::const_iterator oiter = other.
_realStoreList.begin() ;
214 vector<RealFullVector*>::const_iterator fiter = other.
_realfStoreList.begin() ;
220 vector<CatVector*>::const_iterator citer = other.
_catStoreList.begin() ;
307 vector<RealVector*>::const_iterator oiter = other.
_realStoreList.begin() ;
319 vector<RealFullVector*>::const_iterator fiter = other.
_realfStoreList.begin() ;
331 vector<CatVector*>::const_iterator citer = other.
_catStoreList.begin() ;
406 loadValues(&tds,cloneVar,cutRange,nStart,nStop);
423 for ( ; iter!=iend ; ++iter) {
428 for ( ; iter3!=iend3 ; ++iter3) {
433 for ( ; iter2!=iend2 ; ++iter2) {
689 throw string(
Form(
"RooDataHist::weightError(%s) error type Auto not allowed here",
GetName())) ;
693 throw string(
Form(
"RooDataHist::weightError(%s) error type Expected not allowed here",
GetName())) ;
789 for(
Int_t i=nStart; i < nevent ; ++i) {
793 if (selectClone && selectClone->
getVal()==0) {
876 << valHolder->
GetName() <<
"\"" << endl;
892 if (dynamic_cast<RooAbsReal*>(valHolder)) {
895 }
else if (dynamic_cast<RooAbsCategory*>((
RooAbsCategory*)valHolder)) {
906 if (rv) rv->
write(i) ;
907 if (cv) cv->
write(i) ;
935 holderSet->
add(*valHolder) ;
940 << valHolder->
GetName() <<
"\"" << endl;
946 if (!newVarCloneList) {
948 <<
") Couldn't deep-clone variable " << var->
GetName() <<
", abort." << endl ;
955 cloneSetList.
Add(newVarCloneList) ;
956 cloneSet.
add(*newVarClone) ;
971 if (dynamic_cast<RooAbsReal*>(holder)) {
991 if (dynamic_cast<RooAbsReal*>(holder)) {
1019 Int_t nevt = dstoreList.front()->numEntries() ;
1021 for (
int i=0 ; i<nevt ; i++) {
1024 mergedStore->
_vars = *
get(i) ;
1027 for (list<RooAbsDataStore*>::iterator iter = dstoreList.begin() ; iter!=dstoreList.end() ; iter++) {
1028 const RooArgSet* partSet = (*iter)->get(i) ;
1029 mergedStore->
_vars = *partSet ;
1032 mergedStore->
fill() ;
1034 return mergedStore ;
1043 (*iter)->reserve(nEvts);
1047 (*iter3)->reserve(nEvts);
1049 vector<CatVector*>::iterator iter2 =
_catStoreList.begin() ;
1051 (*iter2)->reserve(nEvts);
1061 for (
int i=0 ; i<nevt ; i++) {
1096 vector<CatVector*>::iterator iter2 =
_catStoreList.begin() ;
1104 struct less_dep :
public binary_function<RooAbsArg*, RooAbsArg*, bool> {
1131 vector<RooAbsArg*> trackArgs ;
1132 while((arg=itern.
next())) {
1134 orderedArgs.
add(*arg) ;
1142 trackArgs.push_back(arg) ;
1150 if (trackArgs.size()>1) {
1151 sort(trackArgs.begin(),trackArgs.end(),less_dep()) ;
1155 for (vector<RooAbsArg*>::iterator viter = trackArgs.begin() ; viter!=trackArgs.end() ; ++viter) {
1156 orderedArgs.
add(**viter) ;
1169 list<RooArgSet*> vlist ;
1179 vlist.push_back(newVarCloneList) ;
1180 cloneSet.
add(*newVarClone) ;
1193 vector<RooArgSet*> nsetList ;
1194 list<RooArgSet*> argObsList ;
1203 argObsList.push_back(argObs) ;
1230 nsetList.push_back(normSet) ;
1238 if (
weight()!=0 || !skipZeroWeights) {
1240 vector<RooArgSet*>::iterator niter = nsetList.begin() ;
1244 cloneArg->
syncCache(argNset?argNset:nset) ;
1270 coutI(
Optimization) <<
"RooVectorDataStore::cacheArg() element " << arg->
GetName() <<
" has change tracking enabled on parameters " << *deps << endl ;
1278 for (list<RooArgSet*>::iterator iter = vlist.begin() ; iter!=vlist.end() ; ++iter) {
1281 for (list<RooArgSet*>::iterator iter = argObsList.begin() ; iter!=argObsList.end() ; ++iter) {
1303 std::vector<RooVectorDataStore::RealVector *> tv;
1310 tv.push_back(cacheElem);
1326 if (projectedArgs && projectedArgs->
getSize()>0) {
1329 usedNset = ownedNset ;
1336 for (
int i=firstEvent ; i<lastEvent ; i+=stepSize) {
1339 if (!zeroWeight || !skipZeroWeights) {
1340 for (std::vector<RooVectorDataStore::RealVector *>::iterator cacheIt = tv.begin(); cacheIt != tv.end();
1342 (*cacheIt)->_nativeReal->_valueDirty =
kTRUE;
1343 (*cacheIt)->_nativeReal->getValV((*cacheIt)->_nset ? (*cacheIt)->_nset : usedNset);
1344 (*cacheIt)->write(i);
1364 for (std::vector<RooVectorDataStore::RealVector *>::iterator cacheIt = tv.begin(); cacheIt != tv.end(); ++cacheIt) {
1450 while((arg=iter.
next())) {
1466 while((arg=iter.
next())) {
1477 cout <<
"RooVectorDataStor::dump()" << endl ;
1480 cout <<
"realVector list is" << endl ;
1481 std::vector<RealVector*>::iterator iter =
_realStoreList.begin() ;
1483 cout <<
"RealVector " << *iter <<
" _nativeReal = " << (*iter)->_nativeReal <<
" = " << (*iter)->_nativeReal->GetName() <<
" bufptr = " << (*iter)->_buf << endl ;
1484 cout <<
" values : " ;
1485 Int_t imax = (*iter)->_vec.size()>10 ? 10 : (*iter)->_vec.size() ;
1486 for (
Int_t i=0 ; i<imax ; i++) {
1487 cout << (*iter)->_vec[i] <<
" " ;
1491 std::vector<RealFullVector*>::iterator iter2 =
_realfStoreList.begin() ;
1493 cout <<
"RealFullVector " << *iter2 <<
" _nativeReal = " << (*iter2)->_nativeReal <<
" = " << (*iter2)->_nativeReal->GetName()
1494 <<
" bufptr = " << (*iter2)->_buf <<
" errbufptr = " << (*iter2)->_bufE << endl ;
1496 cout <<
" values : " ;
1497 Int_t imax = (*iter2)->_vec.size()>10 ? 10 : (*iter2)->_vec.size() ;
1498 for (
Int_t i=0 ; i<imax ; i++) {
1499 cout << (*iter2)->_vec[i] <<
" " ;
1502 if ((*iter2)->_vecE) {
1503 cout <<
" errors : " ;
1504 for (
Int_t i=0 ; i<imax ; i++) {
1505 cout << (*(*iter2)->_vecE)[i] <<
" " ;
1517 void RooVectorDataStore::Streamer(
TBuffer &R__b)
1552 void RooVectorDataStore::RealVector::Streamer(
TBuffer &R__b)
1556 _vec0 = _vec.size()>0 ? &_vec.front() : 0 ;
1565 void RooVectorDataStore::RealFullVector::Streamer(
TBuffer &R__b)
1573 if (_vecE && _vecE->empty()) {
delete _vecE ; _vecE = 0 ; }
1574 if (_vecEL && _vecEL->empty()) {
delete _vecEL ; _vecEL = 0 ; }
1575 if (_vecEH && _vecEH->empty()) {
delete _vecEH ; _vecEH = 0 ; }
1584 void RooVectorDataStore::CatVector::Streamer(
TBuffer &R__b)
1588 _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.