HROOT-hist-0.10.0.1: csrc/HROOTHistTF1.h
#ifdef __cplusplus
extern "C" {
#endif
#pragma once
#include "HROOT-histType.h"
#include "HROOTCoreTAttLine.h"
#include "HROOTCoreTAttFill.h"
#include "HROOTCoreTAttMarker.h"
#include "STDDeletable.h"
#include "HROOT-coreType.h"
#define TF1_DECL_VIRT(Type) \
double Type##_Derivative ( Type##_p p, double x, double* params, double epsilon );\
double Type##_Derivative2 ( Type##_p p, double x, double* params, double epsilon );\
double Type##_Derivative3 ( Type##_p p, double x, double* params, double epsilon );\
Type##_p Type##_drawCopyTF1 ( Type##_p p, const char* option );\
TObject_p Type##_DrawDerivative ( Type##_p p, const char* option );\
TObject_p Type##_DrawIntegral ( Type##_p p, const char* option );\
void Type##_FixParameter ( Type##_p p, int ipar, double value );\
double Type##_getMaximumTF1 ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx );\
double Type##_getMinimumTF1 ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx );\
double Type##_GetMaximumX ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx );\
double Type##_GetMinimumX ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx );\
int Type##_GetNDF ( Type##_p p );\
int Type##_GetNpx ( Type##_p p );\
int Type##_GetNumberFreeParameters ( Type##_p p );\
int Type##_GetNumberFitPoints ( Type##_p p );\
double Type##_GetParError ( Type##_p p, int ipar );\
double Type##_GetProb ( Type##_p p );\
int Type##_getQuantilesTF1 ( Type##_p p, int nprobSum, double* q, double* probSum );\
double Type##_getRandomTF1 ( Type##_p p, double xmin, double xmax );\
double Type##_GetSave ( Type##_p p, double* x );\
double Type##_GetX ( Type##_p p, double y, double xmin, double xmax, double epsilon, int maxiter );\
double Type##_GetXmin ( Type##_p p );\
double Type##_GetXmax ( Type##_p p );\
double Type##_GradientPar ( Type##_p p, int ipar, double* x, double eps );\
void Type##_InitArgs ( Type##_p p, double* x, double* params );\
double Type##_IntegralTF1 ( Type##_p p, double a, double b, double epsilon );\
double Type##_IntegralError ( Type##_p p, double a, double b, double* params, double* covmat, double epsilon );\
double Type##_IntegralFast ( Type##_p p, int num, double* x, double* w, double a, double b, double* params, double epsilon );\
bool Type##_IsInside ( Type##_p p, double* x );\
void Type##_ReleaseParameter ( Type##_p p, int ipar );\
void Type##_SetChisquare ( Type##_p p, double chi2 );\
void Type##_setMaximumTF1 ( Type##_p p, double maximum );\
void Type##_setMinimumTF1 ( Type##_p p, double minimum );\
void Type##_SetNDF ( Type##_p p, int ndf );\
void Type##_SetNumberFitPoints ( Type##_p p, int npfits );\
void Type##_SetNpx ( Type##_p p, int npx );\
void Type##_SetParError ( Type##_p p, int ipar, double error );\
void Type##_SetParErrors ( Type##_p p, double* errors );\
void Type##_SetParLimits ( Type##_p p, int ipar, double parmin, double parmax );\
void Type##_SetParent ( Type##_p p, TObject_p parent );\
void Type##_setRange1 ( Type##_p p, double xmin, double xmax );\
void Type##_setRange2 ( Type##_p p, double xmin, double xmax, double ymin, double ymax );\
void Type##_setRange3 ( Type##_p p, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax );\
void Type##_SetSavedPoint ( Type##_p p, int point, double value );\
double Type##_Moment ( Type##_p p, double n, double a, double b, double* params, double epsilon );\
double Type##_CentralMoment ( Type##_p p, double n, double a, double b, double* params, double epsilon );\
double Type##_Mean ( Type##_p p, double a, double b, double* params, double epsilon );\
double Type##_Variance ( Type##_p p, double a, double b, double* params, double epsilon );
#define TF1_DECL_NONVIRT(Type) \
Type##_p Type##_newTF1 ( const char* name, const char* formula, double xmin, double xmax );\
double Type##_tF1_DerivativeError ( );\
double Type##_tF1_GetChisquare ( Type##_p p );\
TH1_p Type##_tF1_GetHistogram ( Type##_p p );\
TObject_p Type##_tF1_GetParent ( Type##_p p );\
TAxis_p Type##_tF1_GetXaxis ( Type##_p p );\
TAxis_p Type##_tF1_GetYaxis ( Type##_p p );\
TAxis_p Type##_tF1_GetZaxis ( Type##_p p );\
void Type##_tF1_InitStandardFunctions ( );\
TF1_p Type##_tF1_GetCurrent ( );\
void Type##_tF1_AbsValue ( bool reject );\
void Type##_tF1_RejectPoint ( bool reject );\
bool Type##_tF1_RejectedPoint ( );\
void Type##_tF1_SetCurrent ( TF1_p f1 );\
void Type##_tF1_CalcGaussLegendreSamplingPoints ( int num, double* x, double* w, double eps );
#define TF1_DECL_ACCESSOR(Type) \
#define TF1_DEF_VIRT(Type) \
double Type##_Derivative ( Type##_p p, double x, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Derivative, TF1))(p))->Derivative(x, params, epsilon);\
}\
\
double Type##_Derivative2 ( Type##_p p, double x, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Derivative2, TF1))(p))->Derivative2(x, params, epsilon);\
}\
\
double Type##_Derivative3 ( Type##_p p, double x, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Derivative3, TF1))(p))->Derivative3(x, params, epsilon);\
}\
\
Type##_p Type##_drawCopyTF1 ( Type##_p p, const char* option ) {\
return from_nonconst_to_nonconst<Type##_t, Type>((Type*)((TYPECASTMETHOD(Type, drawCopyTF1, TF1))(p))->DrawCopy(option));\
}\
\
TObject_p Type##_DrawDerivative ( Type##_p p, const char* option ) {\
return from_nonconst_to_nonconst<TObject_t, TObject>((TObject*)((TYPECASTMETHOD(Type, DrawDerivative, TF1))(p))->DrawDerivative(option));\
}\
\
TObject_p Type##_DrawIntegral ( Type##_p p, const char* option ) {\
return from_nonconst_to_nonconst<TObject_t, TObject>((TObject*)((TYPECASTMETHOD(Type, DrawIntegral, TF1))(p))->DrawIntegral(option));\
}\
\
void Type##_FixParameter ( Type##_p p, int ipar, double value ) {\
((TYPECASTMETHOD(Type, FixParameter, TF1))(p))->FixParameter(ipar, value);\
}\
\
double Type##_getMaximumTF1 ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx ) {\
return ((TYPECASTMETHOD(Type, getMaximumTF1, TF1))(p))->GetMaximum(xmin, xmax, epsilon, maxiter, logx);\
}\
\
double Type##_getMinimumTF1 ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx ) {\
return ((TYPECASTMETHOD(Type, getMinimumTF1, TF1))(p))->GetMinimum(xmin, xmax, epsilon, maxiter, logx);\
}\
\
double Type##_GetMaximumX ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx ) {\
return ((TYPECASTMETHOD(Type, GetMaximumX, TF1))(p))->GetMaximumX(xmin, xmax, epsilon, maxiter, logx);\
}\
\
double Type##_GetMinimumX ( Type##_p p, double xmin, double xmax, double epsilon, double maxiter, bool logx ) {\
return ((TYPECASTMETHOD(Type, GetMinimumX, TF1))(p))->GetMinimumX(xmin, xmax, epsilon, maxiter, logx);\
}\
\
int Type##_GetNDF ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetNDF, TF1))(p))->GetNDF();\
}\
\
int Type##_GetNpx ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetNpx, TF1))(p))->GetNpx();\
}\
\
int Type##_GetNumberFreeParameters ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetNumberFreeParameters, TF1))(p))->GetNumberFreeParameters();\
}\
\
int Type##_GetNumberFitPoints ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetNumberFitPoints, TF1))(p))->GetNumberFitPoints();\
}\
\
double Type##_GetParError ( Type##_p p, int ipar ) {\
return ((TYPECASTMETHOD(Type, GetParError, TF1))(p))->GetParError(ipar);\
}\
\
double Type##_GetProb ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetProb, TF1))(p))->GetProb();\
}\
\
int Type##_getQuantilesTF1 ( Type##_p p, int nprobSum, double* q, double* probSum ) {\
return ((TYPECASTMETHOD(Type, getQuantilesTF1, TF1))(p))->GetQuantiles(nprobSum, q, probSum);\
}\
\
double Type##_getRandomTF1 ( Type##_p p, double xmin, double xmax ) {\
return ((TYPECASTMETHOD(Type, getRandomTF1, TF1))(p))->GetRandom(xmin, xmax);\
}\
\
double Type##_GetSave ( Type##_p p, double* x ) {\
return ((TYPECASTMETHOD(Type, GetSave, TF1))(p))->GetSave(x);\
}\
\
double Type##_GetX ( Type##_p p, double y, double xmin, double xmax, double epsilon, int maxiter ) {\
return ((TYPECASTMETHOD(Type, GetX, TF1))(p))->GetX(y, xmin, xmax, epsilon, maxiter);\
}\
\
double Type##_GetXmin ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetXmin, TF1))(p))->GetXmin();\
}\
\
double Type##_GetXmax ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, GetXmax, TF1))(p))->GetXmax();\
}\
\
double Type##_GradientPar ( Type##_p p, int ipar, double* x, double eps ) {\
return ((TYPECASTMETHOD(Type, GradientPar, TF1))(p))->GradientPar(ipar, x, eps);\
}\
\
void Type##_InitArgs ( Type##_p p, double* x, double* params ) {\
((TYPECASTMETHOD(Type, InitArgs, TF1))(p))->InitArgs(x, params);\
}\
\
double Type##_IntegralTF1 ( Type##_p p, double a, double b, double epsilon ) {\
return ((TYPECASTMETHOD(Type, IntegralTF1, TF1))(p))->Integral(a, b, epsilon);\
}\
\
double Type##_IntegralError ( Type##_p p, double a, double b, double* params, double* covmat, double epsilon ) {\
return ((TYPECASTMETHOD(Type, IntegralError, TF1))(p))->IntegralError(a, b, params, covmat, epsilon);\
}\
\
double Type##_IntegralFast ( Type##_p p, int num, double* x, double* w, double a, double b, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, IntegralFast, TF1))(p))->IntegralFast(num, x, w, a, b, params, epsilon);\
}\
\
bool Type##_IsInside ( Type##_p p, double* x ) {\
return ((TYPECASTMETHOD(Type, IsInside, TF1))(p))->IsInside(x);\
}\
\
void Type##_ReleaseParameter ( Type##_p p, int ipar ) {\
((TYPECASTMETHOD(Type, ReleaseParameter, TF1))(p))->ReleaseParameter(ipar);\
}\
\
void Type##_SetChisquare ( Type##_p p, double chi2 ) {\
((TYPECASTMETHOD(Type, SetChisquare, TF1))(p))->SetChisquare(chi2);\
}\
\
void Type##_setMaximumTF1 ( Type##_p p, double maximum ) {\
((TYPECASTMETHOD(Type, setMaximumTF1, TF1))(p))->SetMaximum(maximum);\
}\
\
void Type##_setMinimumTF1 ( Type##_p p, double minimum ) {\
((TYPECASTMETHOD(Type, setMinimumTF1, TF1))(p))->SetMinimum(minimum);\
}\
\
void Type##_SetNDF ( Type##_p p, int ndf ) {\
((TYPECASTMETHOD(Type, SetNDF, TF1))(p))->SetNDF(ndf);\
}\
\
void Type##_SetNumberFitPoints ( Type##_p p, int npfits ) {\
((TYPECASTMETHOD(Type, SetNumberFitPoints, TF1))(p))->SetNumberFitPoints(npfits);\
}\
\
void Type##_SetNpx ( Type##_p p, int npx ) {\
((TYPECASTMETHOD(Type, SetNpx, TF1))(p))->SetNpx(npx);\
}\
\
void Type##_SetParError ( Type##_p p, int ipar, double error ) {\
((TYPECASTMETHOD(Type, SetParError, TF1))(p))->SetParError(ipar, error);\
}\
\
void Type##_SetParErrors ( Type##_p p, double* errors ) {\
((TYPECASTMETHOD(Type, SetParErrors, TF1))(p))->SetParErrors(errors);\
}\
\
void Type##_SetParLimits ( Type##_p p, int ipar, double parmin, double parmax ) {\
((TYPECASTMETHOD(Type, SetParLimits, TF1))(p))->SetParLimits(ipar, parmin, parmax);\
}\
\
void Type##_SetParent ( Type##_p p, TObject_p parent ) {\
((TYPECASTMETHOD(Type, SetParent, TF1))(p))->SetParent(from_nonconst_to_nonconst<TObject, TObject_t>(parent));\
}\
\
void Type##_setRange1 ( Type##_p p, double xmin, double xmax ) {\
((TYPECASTMETHOD(Type, setRange1, TF1))(p))->SetRange(xmin, xmax);\
}\
\
void Type##_setRange2 ( Type##_p p, double xmin, double xmax, double ymin, double ymax ) {\
((TYPECASTMETHOD(Type, setRange2, TF1))(p))->SetRange(xmin, xmax, ymin, ymax);\
}\
\
void Type##_setRange3 ( Type##_p p, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax ) {\
((TYPECASTMETHOD(Type, setRange3, TF1))(p))->SetRange(xmin, xmax, ymin, ymax, zmin, zmax);\
}\
\
void Type##_SetSavedPoint ( Type##_p p, int point, double value ) {\
((TYPECASTMETHOD(Type, SetSavedPoint, TF1))(p))->SetSavedPoint(point, value);\
}\
\
double Type##_Moment ( Type##_p p, double n, double a, double b, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Moment, TF1))(p))->Moment(n, a, b, params, epsilon);\
}\
\
double Type##_CentralMoment ( Type##_p p, double n, double a, double b, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, CentralMoment, TF1))(p))->CentralMoment(n, a, b, params, epsilon);\
}\
\
double Type##_Mean ( Type##_p p, double a, double b, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Mean, TF1))(p))->Mean(a, b, params, epsilon);\
}\
\
double Type##_Variance ( Type##_p p, double a, double b, double* params, double epsilon ) {\
return ((TYPECASTMETHOD(Type, Variance, TF1))(p))->Variance(a, b, params, epsilon);\
}
#define TF1_DEF_NONVIRT(Type) \
Type##_p Type##_newTF1 ( const char* name, const char* formula, double xmin, double xmax ) {\
Type* newp=new Type(name, formula, xmin, xmax);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\
}\
\
double Type##_tF1_DerivativeError ( ) {\
return TF1::DerivativeError();\
}\
\
double Type##_tF1_GetChisquare ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tF1_GetChisquare, TF1))(p))->GetChisquare();\
}\
\
TH1_p Type##_tF1_GetHistogram ( Type##_p p ) {\
return from_nonconst_to_nonconst<TH1_t, TH1>((TH1*)((TYPECASTMETHOD(Type, tF1_GetHistogram, TF1))(p))->GetHistogram());\
}\
\
TObject_p Type##_tF1_GetParent ( Type##_p p ) {\
return from_nonconst_to_nonconst<TObject_t, TObject>((TObject*)((TYPECASTMETHOD(Type, tF1_GetParent, TF1))(p))->GetParent());\
}\
\
TAxis_p Type##_tF1_GetXaxis ( Type##_p p ) {\
return from_nonconst_to_nonconst<TAxis_t, TAxis>((TAxis*)((TYPECASTMETHOD(Type, tF1_GetXaxis, TF1))(p))->GetXaxis());\
}\
\
TAxis_p Type##_tF1_GetYaxis ( Type##_p p ) {\
return from_nonconst_to_nonconst<TAxis_t, TAxis>((TAxis*)((TYPECASTMETHOD(Type, tF1_GetYaxis, TF1))(p))->GetYaxis());\
}\
\
TAxis_p Type##_tF1_GetZaxis ( Type##_p p ) {\
return from_nonconst_to_nonconst<TAxis_t, TAxis>((TAxis*)((TYPECASTMETHOD(Type, tF1_GetZaxis, TF1))(p))->GetZaxis());\
}\
\
void Type##_tF1_InitStandardFunctions ( ) {\
TF1::InitStandardFunctions();\
}\
\
TF1_p Type##_tF1_GetCurrent ( ) {\
return from_nonconst_to_nonconst<TF1_t, TF1>((TF1*)TF1::GetCurrent());\
}\
\
void Type##_tF1_AbsValue ( bool reject ) {\
TF1::AbsValue(reject);\
}\
\
void Type##_tF1_RejectPoint ( bool reject ) {\
TF1::RejectPoint(reject);\
}\
\
bool Type##_tF1_RejectedPoint ( ) {\
return TF1::RejectedPoint();\
}\
\
void Type##_tF1_SetCurrent ( TF1_p f1 ) {\
TF1::SetCurrent(from_nonconst_to_nonconst<TF1, TF1_t>(f1));\
}\
\
void Type##_tF1_CalcGaussLegendreSamplingPoints ( int num, double* x, double* w, double eps ) {\
TF1::CalcGaussLegendreSamplingPoints(num, x, w, eps);\
}
#define TF1_DEF_ACCESSOR(Type) \
TATTLINE_DECL_VIRT(TF1)
TATTFILL_DECL_VIRT(TF1)
TATTMARKER_DECL_VIRT(TF1)
DELETABLE_DECL_VIRT(TF1)
TF1_DECL_VIRT(TF1)
TF1_DECL_NONVIRT(TF1)
TF1_DECL_ACCESSOR(TF1)
#ifdef __cplusplus
}
#endif