Skip to content

Commit 3e94437

Browse files
committed
[hist] Remove CINT compatibility constructors from TF1, THF2, and TF3
The `TF1`, `TF2`, and `TF3` constructors for CINT compatibility can be removed. This concerns the templated constructors that additionally took the name of the used functor class and member function. With ROOT 6, these names can be omitted. See also commit 4e4cdfb from 2015, where these constructors were introduced. The idea is to clear a bit more the jungle of `TH1` constructors, of which there are too many. That makes it confusing for our uses and for cppyy overload resolution.
1 parent 2429af9 commit 3e94437

File tree

4 files changed

+1
-50
lines changed

4 files changed

+1
-50
lines changed

README/ReleaseNotes/v640/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The following people have contributed to this new version:
3838
* Comparing C++ `nullptr` objects with `None` in Python now raises a `TypeError`, as announced in the ROOT 6.38 release notes. Use truth-value checks like `if not x` or `x is None` instead.
3939
* The `TGLIncludes.h` and `TGLWSIncludes.h` that were deprecated in ROOT 6.38 and scheduled for removal are gone now. Please include your required headers like `<GL/gl.h>` or `<GL/glu.h>` directly.
4040
* The GLEW headers (`GL/eglew.h`, `GL/glew.h`, `GL/glxew.h`, and `GL/wglew.h`) that were installed when building ROOT with `builtin_glew=ON` are no longer installed. This is done because ROOT is moving away from GLEW for loading OpenGL extensions.
41+
* The `TF1`, `TF2`, and `TF3` constructors for CINT compatibility were removed. This concerns the templated constructors that additionally took the name of the used functor class and member function. With ROOT 6, these names can be omitted.
4142

4243
## Build System
4344

hist/hist/inc/TF1.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,6 @@ class TF1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
352352
ROOT::Internal::TF1Builder<Func>::Build(this, f);
353353
}
354354

355-
// backward compatible interface
356-
template <typename Func>
357-
TF1(const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, const char *, EAddToList addToGlobList = EAddToList::kDefault) :
358-
TF1(EFType::kTemplScalar, name, xmin, xmax, npar, 1, addToGlobList, new TF1Parameters(npar))
359-
{
360-
ROOT::Internal::TF1Builder<Func>::Build(this, f);
361-
}
362-
363-
364355
// Template constructors from a pointer to any C++ class of type PtrObj with a specific member function of type
365356
// MemFn.
366357
// The member function must have the signature of (double * , double *) and returning a double.
@@ -374,12 +365,6 @@ class TF1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
374365
TF1(EFType::kTemplScalar, name, xmin, xmax, npar, ndim, addToGlobList, new TF1Parameters(npar), new TF1FunctorPointerImpl<double>(ROOT::Math::ParamFunctor(p, memFn)))
375366
{}
376367

377-
// backward compatible interface
378-
template <class PtrObj, typename MemFn>
379-
TF1(const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Int_t npar, const char *, const char *, EAddToList addToGlobList = EAddToList::kDefault) :
380-
TF1(EFType::kTemplScalar, name, xmin, xmax, npar, 1, addToGlobList, new TF1Parameters(npar), new TF1FunctorPointerImpl<double>(ROOT::Math::ParamFunctor(p, memFn)))
381-
{}
382-
383368
TF1(const TF1 &f1);
384369
TF1 &operator=(const TF1 &rhs);
385370
~TF1() override;

hist/hist/inc/TF2.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ class TF2 : public TF1 {
5353
fNpx = 30;
5454
}
5555

56-
/// Backward compatible ctor
57-
template <class PtrObj, typename MemFn>
58-
TF2(const char *name, const PtrObj& p, MemFn memFn, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar, const char * , const char *) :
59-
TF1(name,p,memFn,xmin,xmax,npar,2),
60-
fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
61-
{
62-
fNpx = 30;
63-
}
64-
6556
/// Template constructors from any C++ callable object, defining the operator() (double * , double *) and returning a double.
6657
template <typename Func>
6758
TF2(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar,Int_t ndim = 2, EAddToList addToGlobList = EAddToList::kDefault) :
@@ -71,16 +62,6 @@ class TF2 : public TF1 {
7162
fNpx = 30;
7263
}
7364

74-
/// Backward compatible ctor
75-
template <typename Func>
76-
TF2(const char *name, Func f, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Int_t npar,const char *) :
77-
TF1(name,f,xmin,xmax,npar,2),
78-
fYmin(ymin), fYmax(ymax), fNpy(30), fContour(0)
79-
{
80-
fNpx = 30;
81-
}
82-
83-
8465
TF2(const TF2 &f2);
8566
TF2 &operator=(const TF2& rhs);
8667
~TF2() override;

hist/hist/inc/TF3.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ class TF3 : public TF2 {
5353
fZmin(zmin), fZmax(zmax), fNpz(30)
5454
{ }
5555

56-
/// Backward compatible ctor
57-
template <class PtrObj, typename MemFn>
58-
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,
59-
const char * , const char * ) :
60-
TF2(name,p,memFn,xmin,xmax,ymin,ymax,npar,3),
61-
fZmin(zmin), fZmax(zmax), fNpz(30)
62-
{ }
63-
6456
/// Template constructors from any C++ callable object, defining the operator() (double * , double *) and returning a double.
6557
template <typename Func>
6658
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,
@@ -69,14 +61,6 @@ class TF3 : public TF2 {
6961
fZmin(zmin), fZmax(zmax), fNpz(30)
7062
{ }
7163

72-
/// Backward compatible ctor
73-
template <typename Func>
74-
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,
75-
const char * ) :
76-
TF2(name,f,xmin,xmax,ymin,ymax,npar,3),
77-
fZmin(zmin), fZmax(zmax), fNpz(30)
78-
{ }
79-
8064
TF3(const TF3 &f3);
8165
TF3& operator=(const TF3 &rhs);
8266
~TF3() override;

0 commit comments

Comments
 (0)