81#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
89#ifndef USEMEMPOOLFORDATASET
118void* RooDataSet::operator
new (
size_t bytes)
123 return memPool()->allocate(bytes);
131void RooDataSet::operator
delete (
void* ptr)
134 if (memPool()->deallocate(ptr))
137 std::cerr << __func__ <<
" " << ptr <<
" is not in any of the pools." << std::endl;
140 ::operator
delete(ptr);
197 RooAbsData(
name,title,
RooArgSet(vars,(
RooAbsArg*)
RooCmdConfig::decodeObjOnTheFly(
"RooDataSet::RooDataSet",
"IndexCat",0,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)))
201 pc.defineInt(
"ownLinked",
"OwnLinked",0) ;
202 pc.defineObject(
"impTree",
"ImportTree",0) ;
203 pc.defineObject(
"impData",
"ImportData",0) ;
204 pc.defineObject(
"indexCat",
"IndexCat",0) ;
205 pc.defineObject(
"impSliceData",
"ImportDataSlice",0,0,
kTRUE) ;
206 pc.defineString(
"impSliceState",
"ImportDataSlice",0,
"",
kTRUE) ;
207 pc.defineObject(
"lnkSliceData",
"LinkDataSlice",0,0,
kTRUE) ;
208 pc.defineString(
"lnkSliceState",
"LinkDataSlice",0,
"",
kTRUE) ;
209 pc.defineString(
"cutSpec",
"CutSpec",0,
"") ;
210 pc.defineObject(
"cutVar",
"CutVar",0) ;
211 pc.defineString(
"cutRange",
"CutRange",0,
"") ;
212 pc.defineString(
"wgtVarName",
"WeightVarName",0,
"") ;
213 pc.defineInt(
"newWeight1",
"WeightVarName",0,0) ;
214 pc.defineString(
"fname",
"ImportFromFile",0,
"") ;
215 pc.defineString(
"tname",
"ImportFromFile",1,
"") ;
216 pc.defineObject(
"wgtVar",
"WeightVar",0) ;
217 pc.defineInt(
"newWeight2",
"WeightVar",0,0) ;
218 pc.defineObject(
"dummy1",
"ImportDataSliceMany",0) ;
219 pc.defineObject(
"dummy2",
"LinkDataSliceMany",0) ;
220 pc.defineSet(
"errorSet",
"StoreError",0) ;
221 pc.defineSet(
"asymErrSet",
"StoreAsymError",0) ;
222 pc.defineMutex(
"ImportTree",
"ImportData",
"ImportDataSlice",
"LinkDataSlice",
"ImportFromFile") ;
223 pc.defineMutex(
"CutSpec",
"CutVar") ;
224 pc.defineMutex(
"WeightVarName",
"WeightVar") ;
225 pc.defineDependency(
"ImportDataSlice",
"IndexCat") ;
226 pc.defineDependency(
"LinkDataSlice",
"IndexCat") ;
227 pc.defineDependency(
"OwnLinked",
"LinkDataSlice") ;
244 TTree* impTree =
static_cast<TTree*
>(
pc.getObject(
"impTree")) ;
247 const char* cutSpec =
pc.getString(
"cutSpec",
"",
kTRUE) ;
248 const char* cutRange =
pc.getString(
"cutRange",
"",
kTRUE) ;
249 const char* wgtVarName =
pc.getString(
"wgtVarName",
"",
kTRUE) ;
251 const char* impSliceNames =
pc.getString(
"impSliceState",
"",
kTRUE) ;
253 const char* lnkSliceNames =
pc.getString(
"lnkSliceState",
"",
kTRUE) ;
257 RooArgSet* asymErrorSet =
pc.getSet(
"asymErrSet") ;
258 const char* fname =
pc.getString(
"fname") ;
259 const char* tname =
pc.getString(
"tname") ;
260 Int_t ownLinked =
pc.getInt(
"ownLinked") ;
261 Int_t newWeight =
pc.getInt(
"newWeight1") +
pc.getInt(
"newWeight2") ;
267 map<string,RooAbsData*> hmap ;
270 strlcpy(tmp, lnkSliceNames, 64000);
271 char *token = strtok(tmp,
",");
275 token = strtok(0,
",");
283 wgtVarName = wgtVar->
GetName() ;
291 map<string,RooAbsDataStore*> storeMap ;
294 throw std::string(
"RooDataSet::RooDataSet() ERROR in constructor, cannot find index category") ;
296 for (map<string,RooAbsData*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
298 if (indexCat && !indexCat->
lookupType(hiter->first.c_str())) {
302 if (icat && !icat->
lookupType(hiter->first.c_str())) {
305 icat->
setLabel(hiter->first.c_str()) ;
306 storeMap[icat->
getLabel()]=hiter->second->store() ;
320 wgtVarName = wgtVar->
GetName() ;
324 if (!wgtVar && !wgtVarName && impData && impData->
_wgtVar) {
338 if (wgtVarName && newWeight) {
352 map<string,RooDataSet*> hmap ;
355 strlcpy(tmp,impSliceNames,100000) ;
356 char* token = strtok(tmp,
",") ;
360 token = strtok(0,
",") ;
386 delete intAsymErrorSet ;
391 wgtVarName = wgtVar->
GetName() ;
398 if (wgtVarName && *wgtVarName) {
408 }
else if (indexCat) {
422 if (cutSpec && *cutSpec) {
429 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
431 if (!indexCat->
lookupType(hiter->first.c_str())) {
435 if (!icat->
lookupType(hiter->first.c_str())) {
438 icat->
setLabel(hiter->first.c_str()) ;
440 RooFormulaVar cutVarTmp(cutSpec,cutSpec,hiter->second->_vars) ;
444 }
else if (impData) {
449 }
else if (impTree) {
454 tstore->
loadValues(impTree,&cutVarTmp,cutRange);
457 tmpstore.
loadValues(impTree,&cutVarTmp,cutRange) ;
460 }
else if (fname && strlen(fname)) {
465 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
466 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
470 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
471 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
493 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
495 if (!indexCat->
lookupType(hiter->first.c_str())) {
499 if (!icat->
lookupType(hiter->first.c_str())) {
502 icat->
setLabel(hiter->first.c_str()) ;
507 }
else if (impData) {
510 }
else if (impTree) {
516 tmpstore.
loadValues(impTree,cutVar,cutRange) ;
519 }
else if (fname && strlen(fname)) {
523 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
524 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
528 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
529 throw string(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
548 for (map<string,RooDataSet*>::iterator hiter = hmap.begin() ; hiter!=hmap.end() ; ++hiter) {
550 if (!indexCat->
lookupType(hiter->first.c_str())) {
554 if (!icat->
lookupType(hiter->first.c_str())) {
557 icat->
setLabel(hiter->first.c_str()) ;
563 }
else if (impData) {
567 }
else if (impTree || (fname && strlen(fname))) {
569 std::unique_ptr<TFile>
file;
571 if (impTree ==
nullptr) {
574 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' cannot be opened or does not exist" << endl ;
575 throw std::invalid_argument(
Form(
"RooDataSet::ctor(%s) ERROR file %s cannot be opened or does not exist",
GetName(),fname)) ;
578 file->GetObject(tname, impTree);
580 coutE(
InputArguments) <<
"RooDataSet::ctor(" <<
GetName() <<
") ERROR file '" << fname <<
"' does not contain a TTree named '" << tname <<
"'" << endl ;
581 throw std::invalid_argument(
Form(
"RooDataSet::ctor(%s) ERROR file %s does not contain a TTree named %s",
GetName(),fname,tname)) ;
638 const RooArgSet& vars,
const char *cuts,
const char* wgtVarName) :
767 const RooArgSet& vars,
const char* cuts,
const char* wgtVarName) :
815 copyCache, wgtVarName))
822 nStop, copyCache, wgtVarName)));
839 if (wgtVar) tmp.
add(*wgtVar) ;
855 delete selCacheVars ;
871 if (wgtVarName && vars && !
_wgtVar) {
904 << wgtVarName <<
" not found in set of variables, no weighting will be assigned" << endl ;
907 << wgtVarName <<
" is not of type RooRealVar, no weighting will be assigned" << endl ;
1052 carry = (t - sumw) -
y;
1068 if (cutSpec && strlen(cutSpec) > 0) {
1082 if (select && select->
eval()==0.) continue ;
1086 carry = (t - sumw) -
y;
1090 if (select)
delete select ;
1164 }
else if ((wgt != 1. || wgtError != 0.) &&
_errorMsgCount < 5) {
1165 ccoutE(
DataHandling) <<
"An event weight/error was passed but no weight variable was defined"
1166 <<
" in the dataset '" <<
GetName() <<
"'. The weight will be ignored." << std::endl;
1172 &&
fabs(wgt*wgt - wgtError)/wgtError > 1.E-15
1173 && _errorMsgCount < 5 && !_wgtVar->getAttribute(
"StoreError")) {
1176 <<
"' does not store errors. Check `StoreError` in the RooDataSet constructor." << std::endl;
1214 ccoutE(
DataHandling) <<
"An event weight was given but no weight variable was defined"
1215 <<
" in the dataset '" <<
GetName() <<
"'. The weight will be ignored." << std::endl;
1220 && _errorMsgCount < 5 && !_wgtVar->getAttribute(
"StoreAsymError")) {
1223 <<
"' does not store errors. Check `StoreAsymError` in the RooDataSet constructor." << std::endl;
1266 ccoutE(
DataHandling) <<
"An event weight was given but no weight variable was defined"
1267 <<
" in the dataset '" <<
GetName() <<
"'. The weight will be ignored." << std::endl;
1274 && wgtError != 0. && wgtError != wgt*wgt
1275 && _errorMsgCount < 5 && !_wgtVar->getAttribute(
"StoreError")) {
1278 <<
"' does not store errors. Check `StoreError` in the RooDataSet constructor." << std::endl;
1299 list<RooDataSet*> dsetList ;
1300 if (data1) dsetList.push_back(data1) ;
1301 if (data2) dsetList.push_back(data2) ;
1302 if (data3) dsetList.push_back(data3) ;
1303 if (data4) dsetList.push_back(data4) ;
1304 if (data5) dsetList.push_back(data5) ;
1305 if (data6) dsetList.push_back(data6) ;
1306 return merge(dsetList) ;
1322 for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; ++iter) {
1330 list<RooAbsDataStore*> dstoreList ;
1331 for (list<RooDataSet*>::iterator iter = dsetList.begin() ; iter != dsetList.end() ; ++iter) {
1333 dstoreList.push_back((*iter)->store()) ;
1426 static Int_t counter(0) ;
1435 <<
" is not in dataset and is also not dependent on data set" << endl ;
1441 ownPlotVarX =
kTRUE ;
1454 <<
" is not in dataset and is also not dependent on data set" << endl ;
1460 ownPlotVarY =
kTRUE ;
1468 if(0 != cuts && strlen(cuts)) {
1470 if (!select || !select->
ok()) {
1492 for(
Int_t i=0; i < nevent; ++i)
1496 if (select && select->
eval()==0) continue ;
1500 if (ownPlotVarX)
delete plotVarX ;
1501 if (ownPlotVarY)
delete plotVarY ;
1502 if (select)
delete select ;
1547 pc.defineString(
"drawOption",
"DrawOption",0,
"P") ;
1548 pc.defineString(
"histName",
"Name",0,
"") ;
1549 pc.defineInt(
"lineColor",
"LineColor",0,-999) ;
1550 pc.defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1551 pc.defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1552 pc.defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1553 pc.defineInt(
"markerStyle",
"MarkerStyle",0,8) ;
1554 pc.defineDouble(
"markerSize",
"MarkerSize",0,-999) ;
1555 pc.defineInt(
"fillColor",
"FillColor",0,-999) ;
1556 pc.defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1557 pc.defineInt(
"histInvisible",
"Invisible",0,0) ;
1558 pc.defineDouble(
"scaleFactor",
"Rescale",0,1.) ;
1559 pc.defineObject(
"xvar",
"XVar",0,0) ;
1560 pc.defineObject(
"yvar",
"YVar",0,0) ;
1564 pc.process(argList) ;
1570 const char* drawOptions =
pc.getString(
"drawOption") ;
1571 Int_t histInvisible =
pc.getInt(
"histInvisible") ;
1572 const char* histName =
pc.getString(
"histName",0,
kTRUE) ;
1573 Double_t scaleFactor =
pc.getDouble(
"scaleFactor") ;
1582 coutE(
InputArguments) <<
"RooDataSet::plotOnXY(" <<
GetName() <<
") ERROR: no YVar() argument specified and dataset is not weighted" << endl ;
1587 if (yvar && !dataY) {
1588 coutE(
InputArguments) <<
"RooDataSet::plotOnXY(" <<
GetName() <<
") ERROR on YVar() argument, dataset does not contain a variable named " << yvar->
GetName() << endl ;
1596 graph->SetName(histName) ;
1615 graph->addBinWithXYError(
x,
y,-1*exlo,exhi,-1*eylo,eyhi,scaleFactor) ;
1619 Int_t lineColor =
pc.getInt(
"lineColor") ;
1620 Int_t lineStyle =
pc.getInt(
"lineStyle") ;
1621 Int_t lineWidth =
pc.getInt(
"lineWidth") ;
1622 Int_t markerColor =
pc.getInt(
"markerColor") ;
1623 Int_t markerStyle =
pc.getInt(
"markerStyle") ;
1624 Size_t markerSize =
pc.getDouble(
"markerSize") ;
1625 Int_t fillColor =
pc.getInt(
"fillColor") ;
1626 Int_t fillStyle =
pc.getInt(
"fillStyle") ;
1628 if (lineColor!=-999)
graph->SetLineColor(lineColor) ;
1629 if (lineStyle!=-999)
graph->SetLineStyle(lineStyle) ;
1630 if (lineWidth!=-999)
graph->SetLineWidth(lineWidth) ;
1631 if (markerColor!=-999)
graph->SetMarkerColor(markerColor) ;
1632 if (markerStyle!=-999)
graph->SetMarkerStyle(markerStyle) ;
1633 if (markerSize!=-999)
graph->SetMarkerSize(markerSize) ;
1634 if (fillColor!=-999)
graph->SetFillColor(fillColor) ;
1635 if (fillStyle!=-999)
graph->SetFillStyle(fillStyle) ;
1695 const char *verbOpt,
const char* commonPath,
1696 const char* indexCatName) {
1704 blindState =
new RooCategory(
"blindState",
"Blinding State") ;
1710 <<
"a non-RooCategory blindState member" << endl ;
1714 <<
"blindState category in variable list" << endl ;
1730 if (ownIsBlind) {
variables.remove(*blindState) ;
delete blindState ; }
1748 << indexCatName <<
" in supplied variable list" << endl ;
1753 <<
" is not a RooCategory" << endl ;
1763 Int_t outOfRange(0) ;
1766 char fileList2[64000];
1767 strlcpy(fileList2, fileList, 64000);
1770 char *filename = strtok(fileList2,
", ") ;
1771 Int_t fileSeqNum(0) ;
1777 char *catname = strchr(filename,
':') ;
1795 char newLabel[128] ;
1796 snprintf(newLabel,128,
"file%03d",fileSeqNum) ;
1797 if (indexCat->
defineType(newLabel,fileSeqNum)) {
1799 <<
" in index category " << indexCat->
GetName() << endl ;
1810 TString fullName(commonPath) ;
1811 fullName.
Append(filename) ;
1812 ifstream
file(fullName) ;
1816 << filename <<
"', skipping" << endl;
1821 Bool_t haveBlindString(
false) ;
1823 while(
file.good() && !
file.eof()) {
1828 if (
file.peek() ==
'#')
1843 if(
file.eof()) break ;
1853 blindCat->
setIndex(haveBlindString) ;
1861 filename = strtok(0,
" ,") ;
1868 for (
const auto type : *indexCat) {
1873 <<
" events (ignored " << outOfRange <<
" out of range events)" << endl;
1889 ofstream ofs(filename) ;
1914 coutW(
DataHandling) <<
"RooDataSet::write(" <<
GetName() <<
"): WARNING error(s) have occured in writing" << endl ;
1932 os <<
indent <<
" Dataset variable \"" <<
_wgtVar->
GetName() <<
"\" is interpreted as the event weight" << endl ;
2001void RooDataSet::Streamer(
TBuffer &R__b)
2024 RooAbsData::Streamer(R__b);
2025 TTree* X_tree(0) ; R__b >> X_tree;
2026 RooArgSet X_truth ; X_truth.Streamer(R__b);
2027 TString X_blindString ; X_blindString.Streamer(R__b);
2038 RooDirItem::Streamer(R__b);
static void indent(ostringstream &buf, int indent_level)
float type_of_call hi(const int &, const int &)
char * Form(const char *fmt,...)
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
Memory pool for RooArgSet and RooDataSet.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void attachToStore(RooAbsDataStore &store)
Attach this argument to the data store such that it reads data from there.
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Substitute our servers with those listed in newSet.
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 TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
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.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
void assignFast(const RooAbsCollection &other, Bool_t setValDirty=kTRUE)
Functional equivalent of operator=() but assumes this and other collection have same layout.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
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...
TIterator * createIterator(Bool_t dir=kIterForward) const R__SUGGEST_ALTERNATIVE("begin()
TIterator-style iteration over contained elements.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
const RooArgSet & cachedVars() const
virtual void append(RooAbsDataStore &other)=0
virtual Double_t sumEntries() const
virtual void checkInit() const
virtual void loadValues(const RooAbsDataStore *tds, const RooFormulaVar *select=0, const char *rangeName=0, Int_t nStart=0, Int_t nStop=2000000000)=0
virtual Double_t weight() const =0
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const =0
virtual RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore * > dstoreList)=0
virtual RooArgSet * addColumns(const RooArgList &varList)=0
virtual Bool_t isWeighted() const =0
virtual RooSpan< const double > getWeightBatch(std::size_t first, std::size_t last) const
Get the weights of the events in the range [first, last[.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)=0
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
RooAbsDataStore * store()
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for detailed printing of object.
static StorageType defaultStorageType
void addOwnedComponent(const char *idxlabel, RooAbsData &data)
virtual void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Internal method – Attach dataset copied with cache contents to copied instances of functions.
virtual Int_t numEntries() const
RooAbsDataStore * _dstore
External variables cached with this data set.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual Int_t getBins(const char *name=0) const
Get number of bins of currently defined range.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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 writeToStream(std::ostream &os, Bool_t compact, const char *section=0) const
Write the contents of the argset in ASCII form to given stream.
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...
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...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
RooCategory represents a fundamental (non-derived) discrete value object.
virtual const char * getLabel() const
Return label string of current state.
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...
Bool_t defineType(const char *label)
Define a state with given name, the lowest available positive integer is assigned as index.
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set value by specifying the index code of the desired state.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooCompositeDataStore combines several disjunct datasets into one.
The RooDataHist is a container class to hold N-dimensional binned data.
RooDataSet is a container class to hold unbinned data.
virtual void weightError(Double_t &lo, Double_t &hi, ErrorType etype=SumW2) const override
Return asymmetric error on weight. (Dummy implementation returning zero)
virtual Bool_t isNonPoissonWeighted() const override
Returns true if histogram contains bins with entries with a non-integer weight.
virtual Bool_t isWeighted() const override
Return true if dataset contains weighted events.
bool _doWeightErrorCheck
Counter to silence error messages when filling dataset.
virtual RooSpan< const double > getWeightBatch(std::size_t first, std::size_t last) const override
Return event weights of all events in range.
virtual RooAbsData * emptyClone(const char *newName=0, const char *newTitle=0, const RooArgSet *vars=0, const char *wgtVarName=0) const override
Return an empty clone of this dataset.
virtual const RooArgSet * get() const override
Return a RooArgSet with the coordinates of the current event.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)
Add a column with the values of the given (function) argument to this dataset.
virtual Double_t sumEntries() const override
Bool_t write(const char *filename) const
Write the contents of this dataset to an ASCII file with the specified name.
RooArgSet addWgtVar(const RooArgSet &origVars, const RooAbsArg *wgtVar)
Helper function for constructor that adds optional weight variable to construct total set of observab...
void initialize(const char *wgtVarName)
Initialize the dataset.
MemPoolForRooSets< RooDataSet, 5 *150 > MemPool
virtual void printArgs(std::ostream &os) const override
Print argument of dataset, i.e. the observable names.
void SetName(const char *name) override
Change the name of this dataset into the given name.
virtual Double_t weightSquared() const override
Return squared event weight of current event.
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...
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 RooArgSet * addColumns(const RooArgList &varList)
Add a column with the values of the given list of (function) argument to this dataset.
void SetNameTitle(const char *name, const char *title) override
Change the title of this dataset into the given name.
virtual void printValue(std::ostream &os) const override
Print value of the dataset, i.e. the sum of weights contained in the dataset.
void append(RooDataSet &data)
Add all data points of given data set to this data set.
RooDataSet()
Default constructor for persistence.
Bool_t merge(RooDataSet *data1, RooDataSet *data2=0, RooDataSet *data3=0, RooDataSet *data4=0, RooDataSet *data5=0, RooDataSet *data6=0)
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const override
Print info about this dataset to the specified output stream.
virtual ~RooDataSet()
Destructor.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0) override
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
unsigned short _errorMsgCount
RooDataHist * binnedClone(const char *newName=0, const char *newTitle=0) const
Return binned clone of this dataset.
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.
static MemPool * memPool()
void convertToTreeStore() override
Convert vector-based storage to tree-based storage.
virtual RooAbsData * cacheClone(const RooAbsArg *newCacheOwner, const RooArgSet *newCacheVars, const char *newName=0) override
Return a clone of this dataset containing only the cached variables.
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 fitting.
RooAbsData * reduceEng(const RooArgSet &varSubset, const RooFormulaVar *cutVar, const char *cutRange=0, Int_t nStart=0, Int_t nStop=2000000000, Bool_t copyCache=kTRUE) override
Implementation of RooAbsData virtual method that drives the RooAbsData::reduce() methods.
virtual Double_t weight() const override
Return event weight of current event.
RooDirItem is a utility base class for RooFit objects that are to be attached to ROOT directories.
void appendToDir(TObject *obj, Bool_t forceMemoryResident=kFALSE)
Append object to directory.
void removeFromDir(TObject *obj)
Remove object from directory it was added to.
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TIterator * MakeIterator(Bool_t forward=kTRUE) const
Create a TIterator for this list.
virtual void Add(TObject *arg)
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooAbsRealLValue * getPlotVar() const
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
RooRealVar represents a variable that can be changed from the outside.
Double_t getErrorHi() const
Double_t getErrorLo() const
void setError(Double_t value)
void setAsymError(Double_t lo, Double_t hi)
virtual void setVal(Double_t value)
Set value of variable to 'value'.
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
A simple container to hold a batch of data values.
RooTreeDataStore is a TTree-backed data storage.
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...
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual TList * GetList() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
2-D histogram with a float per channel (see TH1 documentation)}
Int_t Fill(Double_t)
Invalid Fill method.
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Mother of all ROOT objects.
void ToLower()
Change string to lower-case.
const char * Data() const
TString & Prepend(const char *cs)
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static constexpr double pc
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)