ROOT
v6-20
Reference Guide
TFormulaPrimitive.h
Go to the documentation of this file.
1
// @(#)root/hist:$Id$
2
// Author: Marian Ivanov, 2005
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
// ---------------------------------- TFormulaPrimitive.h
12
13
#ifndef ROOT_v5_TFormulaPrimitive
14
#define ROOT_v5_TFormulaPrimitive
15
16
17
18
//////////////////////////////////////////////////////////////////////////
19
// //
20
// TFormulaPrimitive //
21
// //
22
// The formula primitive base class //
23
// //
24
//////////////////////////////////////////////////////////////////////////
25
26
#include "
TNamed.h
"
27
#include "
TBits.h
"
28
#include "
TObjArray.h
"
29
30
namespace
ROOT
{
31
32
namespace
v5 {
33
34
class
TFormula
;
35
36
class
TFormulaPrimitive
:
public
TNamed
37
{
38
friend
class
ROOT::v5::TFormula
;
39
public
:
40
typedef
Double_t
(*
GenFuncG
)(
const
Double_t
*,
const
Double_t
*);
41
typedef
Double_t
(*
GenFunc0
)();
42
typedef
Double_t
(*
GenFunc10
)(
Double_t
);
43
typedef
Double_t
(*
GenFunc110
)(
Double_t
,
Double_t
);
44
typedef
Double_t
(*
GenFunc1110
)(
Double_t
,
Double_t
,
Double_t
);
45
typedef
Double_t
(
TObject
::*
TFuncG
)(
const
Double_t
*,
const
Double_t
*)
const
;
46
typedef
Double_t
(
TObject
::*
TFunc0
)()
const
;
47
typedef
Double_t
(
TObject
::*
TFunc10
)(
Double_t
)
const
;
48
typedef
Double_t
(
TObject
::*
TFunc110
)(
Double_t
,
Double_t
)
const
;
49
typedef
Double_t
(
TObject
::*
TFunc1110
)(
Double_t
,
Double_t
,
Double_t
)
const
;
50
protected
:
51
static
TObjArray
*
fgListOfFunction
;
//!list of global primitive formulas
52
static
Int_t
BuildBasicFormulas
();
//build list of basic formulas
53
union
{
54
GenFuncG
fFuncG
;
//!pointer to the TFormula generic function
55
GenFunc0
fFunc0
;
//!pointer to the function
56
GenFunc10
fFunc10
;
//!pointer to the function
57
GenFunc110
fFunc110
;
//!pointer to the function
58
GenFunc1110
fFunc1110
;
//!pointer to the function
59
TFuncG
fTFuncG
;
//!pointer to the TFormula generic function
60
TFunc0
fTFunc0
;
//! pointer to member function
61
TFunc10
fTFunc10
;
//! pointer to member function
62
TFunc110
fTFunc110
;
//! pointer to member function
63
TFunc1110
fTFunc1110
;
//! pointer to member function
64
};
65
Int_t
fType
;
//type of the function
66
Int_t
fNArguments
;
//number of arguments
67
Int_t
fNParameters
;
//number of parameters
68
Bool_t
fIsStatic
;
// indication if the function is static
69
private
:
70
TFormulaPrimitive
(
const
TFormulaPrimitive
&);
// Not implemented
71
TFormulaPrimitive
&
operator=
(
const
TFormulaPrimitive
&);
// Not implemented
72
public
:
73
TFormulaPrimitive
();
74
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
GenFunc0
fpointer);
75
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
GenFunc10
fpointer);
76
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
GenFunc110
fpointer);
77
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
GenFunc1110
fpointer);
78
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
GenFuncG
fpointer,
Int_t
npar);
79
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
TFunc0
fpointer);
80
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
TFunc10
fpointer);
81
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
TFunc110
fpointer);
82
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
TFunc1110
fpointer);
83
TFormulaPrimitive
(
const
char
*
name
,
const
char
*formula,
TFuncG
fpointer);
84
static
Int_t
AddFormula
(
TFormulaPrimitive
* formula);
85
static
TFormulaPrimitive
*
FindFormula
(
const
char
*
name
);
86
static
TFormulaPrimitive
*
FindFormula
(
const
char
*
name
,
const
char
*args);
87
static
TFormulaPrimitive
*
FindFormula
(
const
char
*
name
,
UInt_t
nargs);
88
Double_t
Eval
(
Double_t
*
x
);
//eval primitive function
89
Double_t
Eval
(
TObject
*o,
Double_t
*
x
);
//eval member function
90
Double_t
Eval
(
Double_t
*
x
,
Double_t
*param);
//eval primitive parametric function
91
92
ClassDef
(
ROOT::v5::TFormulaPrimitive
,0)
//The primitive formula
93
};
94
95
}
// end namespace v5
96
97
}
// end namespace ROOT
98
99
100
#endif
Int_t
int Int_t
Definition:
RtypesCore.h:41
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
Double_t
double Double_t
Definition:
RtypesCore.h:55
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:326
TBits.h
name
char name[80]
Definition:
TGX11.cxx:109
TNamed.h
TObjArray.h
ROOT::v5::TFormulaPrimitive
The Formula Primitive class.
Definition:
TFormulaPrimitive.h:37
ROOT::v5::TFormulaPrimitive::fFunc1110
GenFunc1110 fFunc1110
pointer to the function
Definition:
TFormulaPrimitive.h:58
ROOT::v5::TFormulaPrimitive::fTFuncG
TFuncG fTFuncG
pointer to the function
Definition:
TFormulaPrimitive.h:59
ROOT::v5::TFormulaPrimitive::AddFormula
static Int_t AddFormula(TFormulaPrimitive *formula)
Add formula to the list of primitive formulas.
Definition:
TFormulaPrimitive_v5.cxx:194
ROOT::v5::TFormulaPrimitive::GenFuncG
Double_t(* GenFuncG)(const Double_t *, const Double_t *)
Definition:
TFormulaPrimitive.h:40
ROOT::v5::TFormulaPrimitive::TFormulaPrimitive
TFormulaPrimitive()
Default constructor.
Definition:
TFormulaPrimitive_v5.cxx:84
ROOT::v5::TFormulaPrimitive::fNParameters
Int_t fNParameters
Definition:
TFormulaPrimitive.h:67
ROOT::v5::TFormulaPrimitive::TFunc0
Double_t(TObject::* TFunc0)() const
Definition:
TFormulaPrimitive.h:46
ROOT::v5::TFormulaPrimitive::fType
Int_t fType
Definition:
TFormulaPrimitive.h:65
ROOT::v5::TFormulaPrimitive::fTFunc110
TFunc110 fTFunc110
pointer to member function
Definition:
TFormulaPrimitive.h:62
ROOT::v5::TFormulaPrimitive::fFunc10
GenFunc10 fFunc10
pointer to the function
Definition:
TFormulaPrimitive.h:56
ROOT::v5::TFormulaPrimitive::fNArguments
Int_t fNArguments
Definition:
TFormulaPrimitive.h:66
ROOT::v5::TFormulaPrimitive::GenFunc1110
Double_t(* GenFunc1110)(Double_t, Double_t, Double_t)
Definition:
TFormulaPrimitive.h:44
ROOT::v5::TFormulaPrimitive::GenFunc10
Double_t(* GenFunc10)(Double_t)
Definition:
TFormulaPrimitive.h:42
ROOT::v5::TFormulaPrimitive::FindFormula
static TFormulaPrimitive * FindFormula(const char *name)
Find the formula in the list of formulas.
Definition:
TFormulaPrimitive_v5.cxx:309
ROOT::v5::TFormulaPrimitive::fFuncG
GenFuncG fFuncG
Definition:
TFormulaPrimitive.h:54
ROOT::v5::TFormulaPrimitive::fTFunc10
TFunc10 fTFunc10
pointer to member function
Definition:
TFormulaPrimitive.h:61
ROOT::v5::TFormulaPrimitive::TFormulaPrimitive
TFormulaPrimitive(const TFormulaPrimitive &)
ROOT::v5::TFormulaPrimitive::TFuncG
Double_t(TObject::* TFuncG)(const Double_t *, const Double_t *) const
Definition:
TFormulaPrimitive.h:45
ROOT::v5::TFormulaPrimitive::fIsStatic
Bool_t fIsStatic
Definition:
TFormulaPrimitive.h:68
ROOT::v5::TFormulaPrimitive::fFunc110
GenFunc110 fFunc110
pointer to the function
Definition:
TFormulaPrimitive.h:57
ROOT::v5::TFormulaPrimitive::GenFunc0
Double_t(* GenFunc0)()
Definition:
TFormulaPrimitive.h:41
ROOT::v5::TFormulaPrimitive::TFunc10
Double_t(TObject::* TFunc10)(Double_t) const
Definition:
TFormulaPrimitive.h:47
ROOT::v5::TFormulaPrimitive::TFunc1110
Double_t(TObject::* TFunc1110)(Double_t, Double_t, Double_t) const
Definition:
TFormulaPrimitive.h:49
ROOT::v5::TFormulaPrimitive::fTFunc0
TFunc0 fTFunc0
pointer to the TFormula generic function
Definition:
TFormulaPrimitive.h:60
ROOT::v5::TFormulaPrimitive::BuildBasicFormulas
static Int_t BuildBasicFormulas()
list of global primitive formulas
Definition:
TFormulaPrimitive_v5.cxx:407
ROOT::v5::TFormulaPrimitive::fFunc0
GenFunc0 fFunc0
pointer to the TFormula generic function
Definition:
TFormulaPrimitive.h:55
ROOT::v5::TFormulaPrimitive::Eval
Double_t Eval(Double_t *x)
Eval primitive function at point x.
Definition:
TFormulaPrimitive_v5.cxx:209
ROOT::v5::TFormulaPrimitive::GenFunc110
Double_t(* GenFunc110)(Double_t, Double_t)
Definition:
TFormulaPrimitive.h:43
ROOT::v5::TFormulaPrimitive::fTFunc1110
TFunc1110 fTFunc1110
pointer to member function
Definition:
TFormulaPrimitive.h:63
ROOT::v5::TFormulaPrimitive::fgListOfFunction
static TObjArray * fgListOfFunction
Definition:
TFormulaPrimitive.h:51
ROOT::v5::TFormulaPrimitive::TFunc110
Double_t(TObject::* TFunc110)(Double_t, Double_t) const
Definition:
TFormulaPrimitive.h:48
ROOT::v5::TFormulaPrimitive::operator=
TFormulaPrimitive & operator=(const TFormulaPrimitive &)
ROOT::v5::TFormula
The FORMULA class (ROOT version 5)
Definition:
TFormula.h:65
TFormula
The Formula class.
Definition:
TFormula.h:84
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition:
TNamed.h:29
TObjArray
An array of TObjects.
Definition:
TObjArray.h:37
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
x
Double_t x[n]
Definition:
legend1.C:17
ROOT
VSD Structures.
Definition:
StringConv.hxx:21
hist
hist
inc
v5
TFormulaPrimitive.h
ROOT v6-20 - Reference Guide Generated on Fri Apr 1 2022 00:21:21 (GVA Time) using Doxygen 1.9.4