57 #if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3) 70 #define POOLSIZE 1048576 84 std::list<POOLDATA>::iterator iter = _memPoolList.begin() ;
85 while(iter!=_memPoolList.end()) {
90 _memPoolList.clear() ;
103 void* RooDataSet::operator
new (
size_t bytes)
107 if (!_poolBegin || _poolCur + (
sizeof(
RooDataSet)) >= _poolEnd) {
109 if (_poolBegin != 0) {
114 if (_memPoolList.size() > 3) {
118 for (std::list<POOLDATA>::iterator poolIter = _memPoolList.begin(); poolIter != _memPoolList.end();
122 if ((*(
Int_t *)(poolIter->_base)) == 0) {
124 <<
"RooDataSet::operator new(), pruning empty memory pool " << (
void *)(poolIter->_base) << endl;
126 toFree = poolIter->_base;
127 _memPoolList.erase(poolIter);
138 _poolBegin = (
char *)mem;
140 _poolCur = _poolBegin +
sizeof(
Int_t);
144 *((
Int_t *)_poolBegin) = 0;
148 _memPoolList.push_back(p);
153 char* ptr = _poolCur ;
157 (*((
Int_t*)_poolBegin))++ ;
168 void RooDataSet::operator
delete (
void* ptr)
171 for (std::list<POOLDATA>::iterator poolIter = _memPoolList.begin() ; poolIter!=_memPoolList.end() ; ++poolIter) {
172 if ((
char*)ptr > (
char*)poolIter->_base && (
char*)ptr < (
char*)poolIter->_base +
POOLSIZE) {
173 (*(
Int_t*)(poolIter->_base))-- ;
241 RooAbsData(name,title,
RooArgSet(vars,(
RooAbsArg*)
RooCmdConfig::decodeObjOnTheFly(
"RooDataSet::RooDataSet",
"IndexCat",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)))
245 pc.
defineInt(
"ownLinked",
"OwnLinked",0) ;
257 pc.
defineInt(
"newWeight1",
"WeightVarName",0,0) ;
261 pc.
defineInt(
"newWeight2",
"WeightVar",0,0) ;
264 pc.
defineSet(
"errorSet",
"StoreError",0) ;
265 pc.
defineSet(
"asymErrSet",
"StoreAsymError",0) ;
266 pc.
defineMutex(
"ImportTree",
"ImportData",
"ImportDataSlice",
"LinkDataSlice",
"ImportFromFile") ;
288 TTree* impTree =
static_cast<TTree*
>(pc.
getObject(
"impTree")) ;
295 const char* impSliceNames = pc.
getString(
"impSliceState",
"",
kTRUE) ;
297 const char* lnkSliceNames = pc.
getString(
"lnkSliceState",
"",
kTRUE) ;
302 const char* fname = pc.
getString(
"fname") ;
303 const char* tname = pc.
getString(
"tname") ;
311 map<string,RooAbsData*> hmap ;
314 strlcpy(tmp, lnkSliceNames, 64000);
315 char *token = strtok(tmp,
",");
319 token = strtok(0,
",");
327 wgtVarName = wgtVar->
GetName() ;
335 map<string,RooAbsDataStore*> storeMap ;
338 throw std::string(
"RooDataSet::RooDataSet() ERROR in constructor, cannot find index category") ;
340 for (map<string,RooAbsData*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
342 if (indexCat && !indexCat->
lookupType(hiter->first.c_str())) {
346 if (icat && !icat->
lookupType(hiter->first.c_str())) {
349 icat->
setLabel(hiter->first.c_str()) ;
350 storeMap[icat->
getLabel()]=hiter->second->store() ;
364 wgtVarName = wgtVar->
GetName() ;
368 if (!wgtVar && !wgtVarName && impData && impData->
_wgtVar) {
382 if (wgtVarName && newWeight) {
396 map<string,RooDataSet*> hmap ;
399 strlcpy(tmp,impSliceNames,100000) ;
400 char* token = strtok(tmp,
",") ;
404 token = strtok(0,
",") ;
430 delete intAsymErrorSet ;
435 wgtVarName = wgtVar->
GetName() ;
442 if (wgtVarName && *wgtVarName) {
452 }
else if (indexCat) {
466 if (cutSpec && *cutSpec) {
473 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
475 if (!indexCat->
lookupType(hiter->first.c_str())) {
479 if (!icat->
lookupType(hiter->first.c_str())) {
482 icat->
setLabel(hiter->first.c_str()) ;
484 RooFormulaVar cutVarTmp(cutSpec,cutSpec,hiter->second->_vars) ;
488 }
else if (impData) {
493 }
else if (impTree) {
498 tstore->
loadValues(impTree,&cutVarTmp,cutRange);
501 tmpstore.
loadValues(impTree,&cutVarTmp,cutRange) ;
504 }
else if (fname && strlen(fname)) {
509 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
510 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
512 TTree* t =
dynamic_cast<TTree*
>(f->Get(tname)) ;
514 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
515 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
537 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
539 if (!indexCat->
lookupType(hiter->first.c_str())) {
543 if (!icat->
lookupType(hiter->first.c_str())) {
546 icat->
setLabel(hiter->first.c_str()) ;
551 }
else if (impData) {
554 }
else if (impTree) {
560 tmpstore.
loadValues(impTree,cutVar,cutRange) ;
563 }
else if (fname && strlen(fname)) {
567 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
568 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
570 TTree* t =
dynamic_cast<TTree*
>(f->Get(tname)) ;
572 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
573 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
592 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
594 if (!indexCat->
lookupType(hiter->first.c_str())) {
598 if (!icat->
lookupType(hiter->first.c_str())) {
601 icat->
setLabel(hiter->first.c_str()) ;
607 }
else if (impData) {
610 }
else if (impTree) {
619 }
else if (fname && strlen(fname)) {
623 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
624 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
626 TTree* t =
dynamic_cast<TTree*
>(f->Get(tname)) ;
628 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
629 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
683 const RooArgSet& vars,
const char *cuts,
const char* wgtVarName) :
804 const RooArgSet& vars,
const char *selExpr,
const char* wgtVarName) :
852 copyCache, wgtVarName))
859 nStop, copyCache, wgtVarName)));
876 if (wgtVar) tmp.
add(*wgtVar) ;
892 delete selCacheVars ;
908 if (wgtVarName && vars && !
_wgtVar) {
941 << wgtVarName <<
" not found in set of variables, no weighting will be assigned" << endl ;
942 }
else if (!dynamic_cast<RooRealVar*>(wgt)) {
944 << wgtVarName <<
" is not of type RooRealVar, no weighting will be assigned" << endl ;
996 TString title,
name ;
1083 carry = (t - sumw) - y;
1100 select =
new RooFormula(
"select",cutSpec,*
get()) ;
1113 if (select && select->
eval()==0.) continue ;
1117 carry = (t - sumw) - y;
1121 if (select)
delete select ;
1240 list<RooDataSet*> dsetList ;
1241 if (data1) dsetList.push_back(data1) ;
1242 if (data2) dsetList.push_back(data2) ;
1243 if (data3) dsetList.push_back(data3) ;
1244 if (data4) dsetList.push_back(data4) ;
1245 if (data5) dsetList.push_back(data5) ;
1246 if (data6) dsetList.push_back(data6) ;
1247 return merge(dsetList) ;
1263 for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; ++iter) {
1271 list<RooAbsDataStore*> dstoreList ;
1272 for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; ++iter) {
1274 dstoreList.push_back((*iter)->store()) ;
1367 static Int_t counter(0) ;
1376 <<
" is not in dataset and is also not dependent on data set" << endl ;
1382 ownPlotVarX =
kTRUE ;
1395 <<
" is not in dataset and is also not dependent on data set" << endl ;
1401 ownPlotVarY =
kTRUE ;
1409 if(0 != cuts && strlen(cuts)) {
1411 if (!select || !select->
ok()) {
1417 TString histName(name);
1418 histName.Prepend(
"_");
1419 histName.Prepend(
fName);
1420 histName.Append(
"_") ;
1421 histName.Append(
Form(
"%08x",counter++)) ;
1433 for(
Int_t i=0; i < nevent; ++i)
1437 if (select && select->
eval()==0)
continue ;
1441 if (ownPlotVarX)
delete plotVarX ;
1442 if (ownPlotVarY)
delete plotVarY ;
1443 if (select)
delete select ;
1495 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1496 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1497 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1498 pc.
defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1499 pc.
defineInt(
"markerStyle",
"MarkerStyle",0,8) ;
1501 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1502 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1503 pc.
defineInt(
"histInvisible",
"Invisible",0,0) ;
1516 const char* drawOptions = pc.
getString(
"drawOption") ;
1517 Int_t histInvisible = pc.
getInt(
"histInvisible") ;
1528 coutE(
InputArguments) <<
"RooDataSet::plotOnXY(" <<
GetName() <<
") ERROR: no YVar() argument specified and dataset is not weighted" << endl ;
1533 if (yvar && !dataY) {
1534 coutE(
InputArguments) <<
"RooDataSet::plotOnXY(" <<
GetName() <<
") ERROR on YVar() argument, dataset does not contain a variable named " << yvar->
GetName() << endl ;
1584 frame->
addPlotable(graph,drawOptions,histInvisible) ;
1639 const char *verbOpt,
const char* commonPath,
1640 const char* indexCatName) {
1648 blindState =
new RooCategory(
"blindState",
"Blinding State") ;
1649 variables.
add(*blindState) ;
1654 <<
"a non-RooCategory blindState member" << endl ;
1658 <<
"blindState category in variable list" << endl ;
1668 TString opts= verbOpt;
1670 Bool_t verbose= !opts.Contains(
"q");
1671 Bool_t debug= opts.Contains(
"d");
1674 if (ownIsBlind) { variables.
remove(*blindState) ;
delete blindState ; }
1692 << indexCatName <<
" in supplied variable list" << endl ;
1697 <<
" is not a RooCategory" << endl ;
1707 Int_t outOfRange(0) ;
1710 char fileList2[64000];
1711 strlcpy(fileList2, fileList, 64000);
1714 char *filename = strtok(fileList2,
", ") ;
1715 Int_t fileSeqNum(0) ;
1721 char *catname = strchr(filename,
':') ;
1739 char newLabel[128] ;
1740 snprintf(newLabel,128,
"file%03d",fileSeqNum) ;
1741 if (indexCat->
defineType(newLabel,fileSeqNum)) {
1743 <<
" in index category " << indexCat->
GetName() << endl ;
1754 TString fullName(commonPath) ;
1755 fullName.Append(filename) ;
1756 ifstream
file(fullName) ;
1760 << filename <<
"', skipping" << endl;
1765 Bool_t haveBlindString(
false) ;
1767 while(file.good() && !file.eof()) {
1772 if (file.peek() ==
'#')
1787 if(file.eof())
break ;
1797 blindCat->
setIndex(haveBlindString) ;
1805 filename = strtok(0,
" ,") ;
1819 <<
" events (ignored " << outOfRange <<
" out of range events)" << endl;
1837 ofstream ofs(filename) ;
1852 coutW(
DataHandling) <<
"RooDataSet::write(" <<
GetName() <<
"): WARNING error(s) have occured in writing" << endl ;
1870 os << indent <<
" Dataset variable \"" <<
_wgtVar->
GetName() <<
"\" is interpreted as the event weight" << endl ;
1939 void RooDataSet::Streamer(
TBuffer &R__b)
1962 RooAbsData::Streamer(R__b);
1963 TTree* X_tree(0) ; R__b >> X_tree;
1964 RooArgSet X_truth ; X_truth.Streamer(R__b);
1965 TString X_blindString ; X_blindString.Streamer(R__b);
1976 RooDirItem::Streamer(R__b);
virtual Double_t getMin(const char *name=0) const
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
void SetName(const char *name)
Change the name of this dataset into the given name.
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 Double_t getMax(const char *name=0) const
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...
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 Double_t weight() const =0
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
virtual RooArgSet * addColumns(const RooArgList &varList)
Add a column with the values of the given list of (function) argument to this dataset.
virtual const RooArgSet * get() const
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...
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
static std::list< POOLDATA > _memPoolList
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set value by specifying the index code of the desired state.
Double_t getVal(const RooArgSet *set=0) const
static const UInt_t kObjectAllocMemValue
virtual RooArgSet * addColumns(const RooArgList &varList)=0
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void loadValues(const RooAbsDataStore *tds, const RooFormulaVar *select=0, const char *rangeName=0, Int_t nStart=0, Int_t nStop=2000000000)=0
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read the contents of the argset in ASCII form from given stream.
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
virtual Double_t sumEntries() const
Buffer base class used for serializing objects.
Bool_t defineSet(const char *name, const char *argName, Int_t setNum, const RooArgSet *set=0)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
RooDataSet()
Default constructor for persistence.
virtual RooAbsData * emptyClone(const char *newName=0, const char *newTitle=0, const RooArgSet *vars=0, const char *wgtVarName=0) const
Return an empty clone of this dataset.
virtual RooPlot * plotOnXY(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Special plot method for 'X-Y' datasets used in Chi^2 fitting.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
static RooDataSet * read(const char *filename, const RooArgList &variables, const char *opts="", const char *commonPath="", const char *indexCatName=0)
Read given list of ascii files, and construct a data set, using the given ArgList as structure defini...
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
RooTreeDataStore is the abstract base class for data collection that use a TTree as internal storage ...
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Iterator abstract base class.
void attachToStore(RooAbsDataStore &store)
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE)
Set value by specifying the name of the desired state If printError is set, a message will be printed...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual Bool_t isNonPoissonWeighted() const
Returns true if histogram contains bins with entries with a non-integer weight.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
void appendToDir(TObject *obj, Bool_t forceMemoryResident=kFALSE)
Append object to directory.
Double_t getErrorLo() const
const RooArgSet & cachedVars() const
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class...
RooDataSet is a container class to hold N-dimensional binned data.
RooDataHist * binnedClone(const char *newName=0, const char *newTitle=0) const
Return binned clone of this dataset.
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions...
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)
Add a column with the values of the given (function) argument to this dataset.
virtual void SetName(const char *name="")
Set graph name.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range...
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
virtual void writeToStream(std::ostream &os, Bool_t compact)
Write the contents of the argset in ASCII form to given stream.
static char * _poolEnd
Next free slot in memory pool.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
virtual void append(RooAbsDataStore &other)=0
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
void setAsymError(Double_t lo, Double_t hi)
void assignFast(const RooAbsCollection &other, Bool_t setValDirty=kTRUE)
Functional equivalent of operator=() but assumes this and other collection have same layout...
virtual TList * GetList() const
virtual Bool_t isWeighted() const =0
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
RooCompositeDataStore is the abstract base class for data collection that use a TTree as internal sto...
virtual void weightError(Double_t &lo, Double_t &hi, ErrorType etype=SumW2) const
Return asymmetric error on weight. (Dummy implementation returning zero)
void defineDependency(const char *refArgName, const char *neededArgName)
Define that processing argument name refArgName requires processing of argument named neededArgName t...
virtual Double_t weight() const
Return event weight of current event.
virtual RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore *> dstoreList)=0
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
RooAbsData * reduceEng(const RooArgSet &varSubset, const RooFormulaVar *cutVar, const char *cutRange=0, Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyCache=kTRUE)
Implementation of RooAbsData virtual method that drives the RooAbsData::reduce() methods.
virtual Bool_t isWeighted() const
Return true if dataset contains weighted events.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void Add(TObject *arg)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
virtual void checkInit() const
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
static char * _poolCur
Start of memory pool.
void setAttribAll(const Text_t *name, Bool_t value=kTRUE)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
TIterator * typeIterator() const
Return iterator over all defined states.
virtual const Text_t * GetName() const
Returns name of object.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
2-D histogram with a float per channel (see TH1 documentation)}
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
const RooCatType * lookupType(Int_t index, Bool_t printError=kFALSE) const
Find our type corresponding to the specified index, or return 0 for no match.
TH2F * createHistogram(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2, const char *cuts="", const char *name="hist") const
Create a TH2F histogram of the distribution of the specified variable using this dataset.
virtual RooAbsData * cacheClone(const RooAbsArg *newCacheOwner, const RooArgSet *newCacheVars, const char *newName=0)
Return a clone of this dataset containing only the cached variables.
void initialize(const char *wgtVarName)
Initialize the dataset.
char * Form(const char *fmt,...)
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooAbsDataStore * store()
void removeFromDir(TObject *obj)
Remove object from directory it was added to.
RooDataSet is a container class to hold unbinned data.
RooCategory represents a fundamental (non-derived) discrete value object.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set...
virtual void addFast(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set...
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual void printValue(std::ostream &os) const
Print value of the dataset, i.e. the sum of weights contained in the dataset.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooArgSet * getSet(const char *name, RooArgSet *set=0)
Return RooArgSet property registered with name 'name'.
virtual Double_t sumEntries() const
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
RooArgSet addWgtVar(const RooArgSet &origVars, const RooAbsArg *wgtVar)
Helper function for constructor that adds optional weight variable to construct total set of observab...
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual const RooArgSet * get() const
Return a RooArgSet with the coordinates of the current event.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Bool_t write(const char *filename)
Write the contents of this dataset to an ASCII file with the specified name Each event will be writte...
RooDirItem is a utility base class for RooFit objects that are to be attached to ROOT directories...
RooAbsDataStore * _dstore
Iterator over cached variables.
void append(RooDataSet &data)
Add all data points of given data set to this data set.
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual const char * getLabel() const
Return label string of current state.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
void SetNameTitle(const char *name, const char *title)
Change the title of this dataset into the given name.
static StorageType defaultStorageType
Mother of all ROOT objects.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
virtual Double_t weightSquared() const
Return event weight of current event.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Bool_t merge(RooDataSet *data1, RooDataSet *data2=0, RooDataSet *data3=0, RooDataSet *data4=0, RooDataSet *data5=0, RooDataSet *data6=0)
virtual void Add(TObject *obj)
RooAbsRealLValue * getPlotVar() const
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
virtual TObject * Next()=0
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print info about this dataset to the specified output stream.
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const =0
void addBinWithXYError(Axis_t binCenter, Double_t n, Double_t exlow, Double_t exhigh, Double_t eylow, Double_t eyhigh, Double_t scaleFactor=1.0)
Add a bin to this histogram with the specified bin contents and error.
virtual ~RooDataSet()
Destructor.
Bool_t defineType(const char *label)
Define a state with given name, the lowest available positive integer is assigned as index...
static constexpr double pc
float type_of_call hi(const int &, const int &)
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
virtual Int_t getBins(const char *name=0) const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Int_t Fill(Double_t)
Invalid Fill method.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)=0
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Iterator over _clientListValue.
Double_t getErrorHi() const
void variables(TString dataset, TString fin="TMVA.root", TString dirName="InputVariables_Id", TString title="TMVA Input Variables", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)
virtual void printArgs(std::ostream &os) const
Print argument of dataset, i.e. the observable names.
virtual Int_t numEntries() const
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
static void cleanup()
Clear memoery pool on exit to avoid reported memory leaks.
virtual const char * GetTitle() const
Returns title of object.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
void setError(Double_t value)