Skip to content

Commit e8a9e1f

Browse files
ferdymercuryhageboeck
authored andcommitted
[hist] implement addToGloblist for TF3 constructors
1 parent 77af4f5 commit e8a9e1f

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

hist/hist/inc/TF3.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ class TF3 : public TF2 {
3838
TF3(const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1, Double_t ymin=0,
3939
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Option_t * opt = nullptr);
4040
TF3(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Double_t ymin=0,
41-
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0, Int_t ndim = 3);
41+
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0, Int_t ndim = 3, EAddToList addToGlobList = EAddToList::kDefault);
4242
TF3(const char *name, Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Double_t ymin=0,
43-
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0, Int_t ndim = 3);
43+
Double_t ymax=1, Double_t zmin=0, Double_t zmax=1, Int_t npar=0, Int_t ndim = 3, EAddToList addToGlobList = EAddToList::kDefault);
4444

4545
// Constructor using a functor
46-
TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin=0, Double_t zmax=1, Int_t npar = 0, Int_t ndim = 3);
46+
TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Double_t ymin = 0, Double_t ymax = 1, Double_t zmin=0, Double_t zmax=1, Int_t npar = 0, Int_t ndim = 3, EAddToList addToGlobList = EAddToList::kDefault);
4747

4848
/// Template constructors from a pointer to any C++ class of type PtrObj with a specific member function of type MemFn.
4949
template <class PtrObj, typename MemFn>
5050
TF3(const char *name, const PtrObj& p, MemFn memFn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar,
51-
Int_t ndim = 3) :
52-
TF2(name,p,memFn,xmin,xmax,ymin,ymax,npar,ndim),
51+
Int_t ndim = 3, EAddToList addToGlobList = EAddToList::kDefault) :
52+
TF2(name,p,memFn,xmin,xmax,ymin,ymax,npar,ndim,addToGlobList),
5353
fZmin(zmin), fZmax(zmax), fNpz(30)
5454
{ }
5555

@@ -64,8 +64,8 @@ class TF3 : public TF2 {
6464
/// Template constructors from any C++ callable object, defining the operator() (double * , double *) and returning a double.
6565
template <typename Func>
6666
TF3(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar,
67-
Int_t ndim = 3 ) :
68-
TF2(name,f,xmin,xmax,ymin,ymax,npar,ndim),
67+
Int_t ndim = 3, EAddToList addToGlobList = EAddToList::kDefault) :
68+
TF2(name,f,xmin,xmax,ymin,ymax,npar,ndim,addToGlobList),
6969
fZmin(zmin), fZmax(zmax), fNpz(30)
7070
{ }
7171

hist/hist/src/TF3.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ TF3::TF3(const char *name,const char *formula, Double_t xmin, Double_t xmax, Dou
8181
///
8282
/// \warning A function created with this constructor cannot be Cloned.
8383

84-
TF3::TF3(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar,Int_t ndim)
85-
:TF2(name,fcn,xmin,xmax,ymin,ymax,npar,ndim)
84+
TF3::TF3(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, Int_t ndim, EAddToList addToGlobList)
85+
:TF2(name,fcn,xmin,xmax,ymin,ymax,npar,ndim,addToGlobList)
8686
{
8787
fZmin = zmin;
8888
fZmax = zmax;
@@ -108,8 +108,8 @@ TF3::TF3(const char *name,Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin
108108
///
109109
/// WARNING! A function created with this constructor cannot be Cloned.
110110

111-
TF3::TF3(const char *name,Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, Int_t ndim)
112-
: TF2(name,fcn,xmin,xmax,ymin,ymax,npar,ndim),
111+
TF3::TF3(const char *name,Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, Int_t ndim, EAddToList addToGlobList)
112+
: TF2(name,fcn,xmin,xmax,ymin,ymax,npar,ndim,addToGlobList),
113113
fZmin(zmin),
114114
fZmax(zmax),
115115
fNpz(30)
@@ -131,8 +131,8 @@ TF3::TF3(const char *name,Double_t (*fcn)(const Double_t *, const Double_t *), D
131131
///
132132
/// \warning A function created with this constructor cannot be Cloned.
133133

134-
TF3::TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, Int_t ndim)
135-
: TF2(name, f, xmin, xmax, ymin, ymax, npar, ndim),
134+
TF3::TF3(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t npar, Int_t ndim, EAddToList addToGlobList)
135+
: TF2(name, f, xmin, xmax, ymin, ymax, npar, ndim, addToGlobList),
136136
fZmin(zmin),
137137
fZmax(zmax),
138138
fNpz(30)

0 commit comments

Comments
 (0)