HROOT-0.7: csrc/HROOTTFormula.h
#ifdef __cplusplus
extern "C" {
#endif
#include "HROOTType.h"
#include "HROOTTNamed.h"
#include "HROOTTObject.h"
#include "HROOTDeletable.h"
#undef ROOT_TFORMULA_DECLARATIONVIRT
#define ROOT_TFORMULA_DECLARATIONVIRT(Type) \
int Type ## _Compile ( Type ## _p p, const char * expression ); \
void Type ## _Clear ( Type ## _p p, const char * option ); \
double Type ## _DefinedValue ( Type ## _p p, int code ); \
double Type ## _Eval ( Type ## _p p, double x, double y, double z, double t ); \
double Type ## _EvalParOld ( Type ## _p p, double * x, double * params ); \
double Type ## _EvalPar ( Type ## _p p, double * x, double * params ); \
int Type ## _GetNdim ( Type ## _p p ); \
int Type ## _GetNpar ( Type ## _p p ); \
int Type ## _GetNumber ( Type ## _p p ); \
int Type ## _GetParNumber ( Type ## _p p, const char * name ); \
int Type ## _IsLinear ( Type ## _p p ); \
int Type ## _IsNormalized ( Type ## _p p ); \
void Type ## _SetNumber ( Type ## _p p, int number ); \
void Type ## _SetParameter ( Type ## _p p, const char * name, double parvalue ); \
void Type ## _SetParameters ( Type ## _p p, double * params ); \
void Type ## _SetParName ( Type ## _p p, int ipar, const char * name ); \
void Type ## _SetParNames ( Type ## _p p, const char * name0, const char * name1, const char * name2, const char * name3, const char * name4, const char * name5, const char * name6, const char * name7, const char * name8, const char * name9, const char * name10 ); \
void Type ## _Update ( Type ## _p p )
#undef ROOT_TFORMULA_DECLARATIONNONVIRT
#define ROOT_TFORMULA_DECLARATIONNONVIRT(Type) \
Type ## _p Type ## _newTFormula ( const char * name, const char * formula ); \
void Type ## _tFormulaOptimize ( Type ## _p p ); \
double Type ## _tFormulaGetParameter ( Type ## _p p, const char * name )
#undef ROOT_TFORMULA_DEFINITIONVIRT
#define ROOT_TFORMULA_DEFINITIONVIRT(Type)\
int Type ## _Compile ( Type ## _p p, const char * expression )\
{\
return to_nonconst<Type,Type ## _t>(p)->Compile(expression);\
}\
void Type ## _Clear ( Type ## _p p, const char * option )\
{\
to_nonconst<Type,Type ## _t>(p)->Clear(option);\
}\
double Type ## _DefinedValue ( Type ## _p p, int code )\
{\
return to_nonconst<Type,Type ## _t>(p)->DefinedValue(code);\
}\
double Type ## _Eval ( Type ## _p p, double x, double y, double z, double t )\
{\
return to_nonconst<Type,Type ## _t>(p)->Eval(x, y, z, t);\
}\
double Type ## _EvalParOld ( Type ## _p p, double * x, double * params )\
{\
return to_nonconst<Type,Type ## _t>(p)->EvalParOld(x, params);\
}\
double Type ## _EvalPar ( Type ## _p p, double * x, double * params )\
{\
return to_nonconst<Type,Type ## _t>(p)->EvalPar(x, params);\
}\
int Type ## _GetNdim ( Type ## _p p )\
{\
return to_nonconst<Type,Type ## _t>(p)->GetNdim();\
}\
int Type ## _GetNpar ( Type ## _p p )\
{\
return to_nonconst<Type,Type ## _t>(p)->GetNpar();\
}\
int Type ## _GetNumber ( Type ## _p p )\
{\
return to_nonconst<Type,Type ## _t>(p)->GetNumber();\
}\
int Type ## _GetParNumber ( Type ## _p p, const char * name )\
{\
return to_nonconst<Type,Type ## _t>(p)->GetParNumber(name);\
}\
int Type ## _IsLinear ( Type ## _p p )\
{\
return to_nonconst<Type,Type ## _t>(p)->IsLinear();\
}\
int Type ## _IsNormalized ( Type ## _p p )\
{\
return to_nonconst<Type,Type ## _t>(p)->IsNormalized();\
}\
void Type ## _SetNumber ( Type ## _p p, int number )\
{\
to_nonconst<Type,Type ## _t>(p)->SetNumber(number);\
}\
void Type ## _SetParameter ( Type ## _p p, const char * name, double parvalue )\
{\
to_nonconst<Type,Type ## _t>(p)->SetParameter(name, parvalue);\
}\
void Type ## _SetParameters ( Type ## _p p, double * params )\
{\
to_nonconst<Type,Type ## _t>(p)->SetParameters(params);\
}\
void Type ## _SetParName ( Type ## _p p, int ipar, const char * name )\
{\
to_nonconst<Type,Type ## _t>(p)->SetParName(ipar, name);\
}\
void Type ## _SetParNames ( Type ## _p p, const char * name0, const char * name1, const char * name2, const char * name3, const char * name4, const char * name5, const char * name6, const char * name7, const char * name8, const char * name9, const char * name10 )\
{\
to_nonconst<Type,Type ## _t>(p)->SetParNames(name0, name1, name2, name3, name4, name5, name6, name7, name8, name9, name10);\
}\
void Type ## _Update ( Type ## _p p )\
{\
to_nonconst<Type,Type ## _t>(p)->Update();\
}
#undef ROOT_TFORMULA_DEFINITIONNONVIRT
#define ROOT_TFORMULA_DEFINITIONNONVIRT(Type)\
Type ## _p Type ## _newTFormula ( const char * name, const char * formula )\
{\
Type * newp = new Type (name, formula); \
return to_nonconst<Type ## _t, Type >(newp);\
}\
void Type ## _tFormulaOptimize ( Type ## _p p )\
{\
to_nonconst<Type,Type ## _t>(p)->Optimize();\
}\
double Type ## _tFormulaGetParameter ( Type ## _p p, const char * name )\
{\
return to_nonconst<Type,Type ## _t>(p)->GetParameter(name);\
}
ROOT_TNAMED_DECLARATIONVIRT(TFormula);
ROOT_TOBJECT_DECLARATIONVIRT(TFormula);
ROOT_DELETABLE_DECLARATIONVIRT(TFormula);
ROOT_TFORMULA_DECLARATIONVIRT(TFormula);
ROOT_TFORMULA_DECLARATIONNONVIRT(TFormula);
#ifdef __cplusplus
}
#endif