164 if (selExpr && *selExpr) {
221 if (selExpr && *selExpr) {
273 loadValues(&tds,cloneVar,cutRange,nStart,nStop);
275 if (cloneVar)
delete cloneVar ;
432 Bool_t notInMemNow= (pwd!=memDir) ;
476 Bool_t notInMemNow= (pwd!=memDir) ;
483 if (dynamic_cast<const TChain*>(t)) {
517 Int_t numInvalid(0) ;
519 for(
Int_t i=0; i < nevent; ++i) {
521 if (entryNumber<0)
break;
526 sourceIter->
Reset() ;
540 if (!allOK || (selectClone && selectClone->
getVal()==0)) {
549 coutI(
Eval) <<
"RooTreeDataStore::loadValues(" <<
GetName() <<
") Ignored " << numInvalid <<
" out of range events" << endl ;
555 delete sourceArgSet ;
571 const char* rangeName,
Int_t nStart,
Int_t nStop)
594 for(
Int_t i=nStart; i < nevent ; ++i) {
598 if (selectClone && selectClone->
getVal()==0) {
783 throw string(
Form(
"RooDataHist::weightError(%s) error type Auto not allowed here",
GetName())) ;
787 throw string(
Form(
"RooDataHist::weightError(%s) error type Expected not allowed here",
GetName())) ;
847 coutE(
InputArguments) <<
"RooTreeDataStore::changeObservableName(" <<
GetName() <<
" no observable " << from <<
" in this dataset" << endl ;
919 << valHolder->
GetName() <<
"\"" << endl;
988 holderSet->
add(*valHolder) ;
993 << valHolder->
GetName() <<
"\"" << endl;
999 if (!newVarCloneList) {
1001 <<
") Couldn't deep-clone variable " << var->
GetName() <<
", abort." << endl ;
1008 cloneSetList.
Add(newVarCloneList) ;
1009 cloneSet.
add(*newVarClone) ;
1059 Int_t nevt = dstoreList.front()->numEntries() ;
1060 for (
int i=0 ; i<nevt ; i++) {
1063 mergedStore->
_vars = *
get(i) ;
1066 for (list<RooAbsDataStore*>::iterator iter = dstoreList.begin() ; iter!=dstoreList.end() ; iter++) {
1067 const RooArgSet* partSet = (*iter)->get(i) ;
1068 mergedStore->
_vars = *partSet ;
1071 mergedStore->
fill() ;
1073 return mergedStore ;
1085 for (
int i=0 ; i<nevt ; i++) {
1104 for (
int i=0 ; i<nevt ; i++) {
1109 carry = (t -
sum) - y;
1118 for (
int i=0 ; i<nevt ; i++) {
1122 carry = (t -
sum) - y;
1208 delete constExprVarSet ;
1220 TIterator* iter =
set.createIterator() ;
1226 <<
") dataset doesn't contain variable " << arg->
GetName() << endl ;
1263 while((arg=iter.
next())) {
1286 while((arg=iter.
next())) {
1299 while((arg=iter.
next())) {
1353 if (!ret1)
return 0 ;
1369 void RooTreeDataStore::Streamer(
TBuffer &R__b)
virtual Bool_t changeObservableName(const char *from, const char *to)
Change name of internal observable named 'from' into 'to'.
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
virtual const char * GetTitle() const
Returns title of object.
virtual RooArgSet * addColumns(const RooArgList &varList)
Utility function to add multiple columns in one call See addColumn() for details. ...
static long int sum(long int i)
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.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
virtual void attachBuffers(const RooArgSet &extObs)
void loadValues(const TTree *t, const RooFormulaVar *select=0, const char *rangeName=0, Int_t nStart=0, Int_t nStop=2000000000)
Load values from tree 't' into this data collection, optionally selecting events using 'select' RooFo...
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
RooFIter fwdIterator() const
virtual Int_t Fill()
Fill all branches.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Bool_t isFundamental() const
virtual const RooArgSet * get() const
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
Buffer base class used for serializing objects.
void Reset(Option_t *option=0)
Interface function to TTree::Reset.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Bool_t _defCtor
Object owning cache contents.
Int_t GetEntry(Int_t entry=0, Int_t getall=0)
Interface function to TTree::GetEntry.
virtual void fillTreeBranch(TTree &t)=0
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
RooTreeDataStore is the abstract base class for data collection that use a TTree as internal storage ...
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Iterator abstract base class.
Bool_t _doDirtyProp
Iterator over cached variables.
virtual void attachToTree(TTree &t, Int_t bufSize=32000)=0
Overloadable function for derived classes to implement attachment as branch to a TTree.
virtual void syncCache(const RooArgSet *nset=0)=0
const char * Data() const
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'.
Double_t * _extWgtErrLoArray
External weight array.
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="")
Copy nentries from given tree to this tree.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add element to an owning set.
virtual Double_t sumEntries() const
virtual Bool_t valid() const
Return true if currently loaded coordinate is considered valid within the current range definitions o...
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...
TIterator * _cacheIter
Iterator over dimension variables.
TIterator * createIterator(Bool_t dir=kIterForward) const
if on multiple lines(like in C++).**The" * configuration fragment. * * The "import myobject continue
Parses the configuration file.
TString & Append(const char *cs)
Double_t * _extWgtErrHiArray
External weight array - low error.
Double_t getVal(const RooArgSet *set=0) const
const RooAbsArg * _cacheOwner
TTree holding the cached function values.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual ~RooTreeDataStore()
Destructor.
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
Activate or deactivate the branch status of the TTree branch associated with the given set of dataset...
virtual void append(RooAbsDataStore &other)
RooRealVar represents a fundamental (non-derived) real valued object.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
void restoreAlternateBuffers()
virtual void setTreeBranchStatus(TTree &t, Bool_t active)=0
virtual void setVal(Double_t value)
Set value of variable to 'value'.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual const RooArgSet * get(Int_t index) const =0
Bool_t hasAsymError(Bool_t allowZero=kTRUE) const
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
virtual Int_t fill()
Interface function to TTree::Fill.
static Int_t _defTreeBufSize
void SetName(const char *name)
Set the name of the TNamed.
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 const char * GetName() const
Returns name of object.
virtual Bool_t inRange(const char *) const
Int_t Fill()
Interface function to TTree::Fill.
Double_t getAsymErrorHi() const
virtual Int_t numEntries() const
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Double_t * _extSumW2Array
External weight array - high error.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
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...
RooArgSet varsNoWeight(const RooArgSet &allVars, const char *wgtName=0)
Utility function for constructors Return RooArgSet that is copy of allVars minus variable matching wg...
RooArgSet _attachedBuffers
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
void initialize()
One-time initialization common to all constructor forms.
virtual Double_t weight() const =0
void setValueDirty() const
RooArgSet _varsww
Was object constructed with default ctor?
Double_t _curWgt
External sum of weights array.
virtual Bool_t isValid() const
WVE (08/21/01) Probably obsolete now.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Initialize cache of dataset: attach variables of cache ArgSet to the corresponding TTree branches...
Double_t getAsymErrorLo() const
virtual void Add(TObject *obj)
Stat_t GetEntries() const
Interface function to TTree::GetEntries.
virtual TObject * Next()=0
RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore * > dstoreList)
Merge columns of supplied data set(s) with this data set.
virtual void resetCache()
Remove tree with values of cached observables and clear list of cached observables.
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=0, Bool_t skipZeroWeights=kFALSE)
Cache given RooAbsArgs with this tree: The tree is given direct write access of the args internal cac...
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
float type_of_call hi(const int &, const int &)
void clearValueDirty() const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual void checkInit() const
void createTree(const char *name, const char *title)
Create TTree object that lives in memory, independent of current location of gDirectory.
void Draw(Option_t *option="")
Default Draw method for all objects.
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
virtual Double_t weight() const
Return the weight of the n-th data point (n='index') in memory.
virtual Int_t numEntries() const =0
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
RooRealVar * weightVar(const RooArgSet &allVars, const char *wgtName=0)
Utility function for constructors Return pointer to weight variable if it is defined.
virtual void resetBuffers()
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
virtual RooAbsArg * createFundamental(const char *newname=0) const =0
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
Double_t getError() const