27#define USEMEMPOOLFORDATASET
28template <
class RooSet_t,
size_t>
34#ifdef USEMEMPOOLFORDATASET
35 void*
operator new (
size_t bytes);
36 void operator delete (
void *ptr);
53 const char *cuts=0,
const char* wgtVarName=0);
60 const char *cuts=0,
const char* wgtVarName=0);
67 return new RooDataSet(*
this, newname && newname[0] !=
'\0' ? newname :
GetName());
71 virtual RooAbsData*
emptyClone(
const char* newName=0,
const char* newTitle=0,
const RooArgSet* vars=0,
const char* wgtVarName=0)
const override;
76 virtual Double_t sumEntries(
const char* cutSpec,
const char* cutRange=0)
const override;
88 const char *opts=
"",
const char* commonPath=
"",
89 const char *indexCatName=0) ;
128 const char *
name=
"hist")
const;
130 const char* cuts=
"",
const char *
name=
"hist")
const;
133 virtual void printArgs(std::ostream& os)
const override;
134 virtual void printValue(std::ostream& os)
const override;
155 const RooArgSet& vars,
const RooFormulaVar* cutVar,
const char* cutRange,
int nStart,
int nStop,
Bool_t copyCache,
const char* wgtVarName=0);
163#ifdef USEMEMPOOLFORDATASET
#define ClassDefOverride(name, id)
static void indent(ostringstream &buf, int indent_level)
float type_of_call hi(const int &, const int &)
Memory pool for RooArgSet and RooDataSet.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooAbsData is the common abstract base class for binned and unbinned datasets.
TH1 * createHistogram(const char *name, const RooAbsRealLValue &xvar, 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
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
static const RooCmdArg & none()
Return reference to null argument.
The RooDataHist is a container class to hold N-dimensional binned data.
RooDataSet is a container class to hold unbinned data.
virtual TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
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.
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooProdGenContext is an efficient implementation of the generator context specific for RooProdPdf PDF...
RooRealVar represents a variable that can be changed from the outside.
A simple container to hold a batch of data values.
Describe directory structure in memory.
2-D histogram with a float per channel (see TH1 documentation)}
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
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)