HROOT-hist-0.10.0.1: csrc/HROOTHistTGraph.h
#ifdef __cplusplus
extern "C" {
#endif
#pragma once
#include "HROOT-histType.h"
#include "HROOTCoreTNamed.h"
#include "HROOTCoreTAttLine.h"
#include "HROOTCoreTAttFill.h"
#include "HROOTCoreTAttMarker.h"
#include "HROOTCoreTObject.h"
#include "STDDeletable.h"
#include "HROOT-coreType.h"
#define TGRAPH_DECL_VIRT(Type) \
void Type##_Apply ( Type##_p p, TF1_p f );\
double Type##_Chisquare ( Type##_p p, TF1_p f1 );\
void Type##_DrawGraph ( Type##_p p, int n, double* x, double* y, const char* option );\
void Type##_drawPanelTGraph ( Type##_p p );\
void Type##_Expand ( Type##_p p, int newsize, int step );\
void Type##_FitPanelTGraph ( Type##_p p );\
double Type##_getCorrelationFactorTGraph ( Type##_p p );\
double Type##_getCovarianceTGraph ( Type##_p p );\
double Type##_getMeanTGraph ( Type##_p p, int axis );\
double Type##_getRMSTGraph ( Type##_p p, int axis );\
double Type##_GetErrorX ( Type##_p p, int bin );\
double Type##_GetErrorY ( Type##_p p, int bin );\
double Type##_GetErrorXhigh ( Type##_p p, int bin );\
double Type##_GetErrorXlow ( Type##_p p, int bin );\
double Type##_GetErrorYhigh ( Type##_p p, int bin );\
double Type##_GetErrorYlow ( Type##_p p, int bin );\
void Type##_InitExpo ( Type##_p p, double xmin, double xmax );\
void Type##_InitGaus ( Type##_p p, double xmin, double xmax );\
void Type##_InitPolynom ( Type##_p p, double xmin, double xmax );\
int Type##_InsertPoint ( Type##_p p );\
double Type##_integralTGraph ( Type##_p p, int first, int last );\
bool Type##_IsEditable ( Type##_p p );\
int Type##_isInsideTGraph ( Type##_p p, double x, double y );\
void Type##_LeastSquareFit ( Type##_p p, int m, double* a, double xmin, double xmax );\
void Type##_PaintStats ( Type##_p p, TF1_p fit );\
int Type##_RemovePoint ( Type##_p p, int ipoint );\
void Type##_SetEditable ( Type##_p p, bool editable );\
void Type##_SetHistogram ( Type##_p p, TH1F_p h );\
void Type##_setMaximumTGraph ( Type##_p p, double maximum );\
void Type##_setMinimumTGraph ( Type##_p p, double minimum );\
void Type##_Set ( Type##_p p, int n );\
void Type##_SetPoint ( Type##_p p, int i, double x, double y );
#define TGRAPH_DECL_NONVIRT(Type) \
Type##_p Type##_newTGraph ( int n, double* x, double* y );\
bool Type##_tGraph_GetEditable ( Type##_p p );\
TF1_p Type##_tGraph_GetFunction ( Type##_p p, const char* name );\
TH1F_p Type##_tGraph_GetHistogram ( Type##_p p );\
int Type##_tGraph_GetMaxSize ( Type##_p p );\
int Type##_tGraph_GetN ( Type##_p p );\
double Type##_tGraph_GetMaximum ( Type##_p p );\
double Type##_tGraph_GetMinimum ( Type##_p p );\
TAxis_p Type##_tGraph_GetXaxis ( Type##_p p );\
TAxis_p Type##_tGraph_GetYaxis ( Type##_p p );\
void Type##_tGraph_PaintGraph ( Type##_p p, int npoints, double* x, double* y, const char* chopt );\
void Type##_tGraph_PaintGrapHist ( Type##_p p, int npoints, double* x, double* y, const char* chopt );
#define TGRAPH_DECL_ACCESSOR(Type) \
#define TGRAPH_DEF_VIRT(Type) \
void Type##_Apply ( Type##_p p, TF1_p f ) {\
((TYPECASTMETHOD(Type, Apply, TGraph))(p))->Apply(from_nonconst_to_nonconst<TF1, TF1_t>(f));\
}\
\
double Type##_Chisquare ( Type##_p p, TF1_p f1 ) {\
return ((TYPECASTMETHOD(Type, Chisquare, TGraph))(p))->Chisquare(from_nonconst_to_nonconst<TF1, TF1_t>(f1));\
}\
\
void Type##_DrawGraph ( Type##_p p, int n, double* x, double* y, const char* option ) {\
((TYPECASTMETHOD(Type, DrawGraph, TGraph))(p))->DrawGraph(n, x, y, option);\
}\
\
void Type##_drawPanelTGraph ( Type##_p p ) {\
((TYPECASTMETHOD(Type, drawPanelTGraph, TGraph))(p))->DrawPanel();\
}\
\
void Type##_Expand ( Type##_p p, int newsize, int step ) {\
((TYPECASTMETHOD(Type, Expand, TGraph))(p))->Expand(newsize, step);\
}\
\
void Type##_FitPanelTGraph ( Type##_p p ) {\
((TYPECASTMETHOD(Type, FitPanelTGraph, TGraph))(p))->FitPanel();\
}\
\
double Type##_getCorrelationFactorTGraph ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, getCorrelationFactorTGraph, TGraph))(p))->GetCorrelationFactor();\
}\
\
double Type##_getCovarianceTGraph ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, getCovarianceTGraph, TGraph))(p))->GetCovariance();\
}\
\
double Type##_getMeanTGraph ( Type##_p p, int axis ) {\
return ((TYPECASTMETHOD(Type, getMeanTGraph, TGraph))(p))->GetMean(axis);\
}\
\
double Type##_getRMSTGraph ( Type##_p p, int axis ) {\
return ((TYPECASTMETHOD(Type, getRMSTGraph, TGraph))(p))->GetRMS(axis);\
}\
\
double Type##_GetErrorX ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorX, TGraph))(p))->GetErrorX(bin);\
}\
\
double Type##_GetErrorY ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorY, TGraph))(p))->GetErrorY(bin);\
}\
\
double Type##_GetErrorXhigh ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorXhigh, TGraph))(p))->GetErrorXhigh(bin);\
}\
\
double Type##_GetErrorXlow ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorXlow, TGraph))(p))->GetErrorXlow(bin);\
}\
\
double Type##_GetErrorYhigh ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorYhigh, TGraph))(p))->GetErrorYhigh(bin);\
}\
\
double Type##_GetErrorYlow ( Type##_p p, int bin ) {\
return ((TYPECASTMETHOD(Type, GetErrorYlow, TGraph))(p))->GetErrorYlow(bin);\
}\
\
void Type##_InitExpo ( Type##_p p, double xmin, double xmax ) {\
((TYPECASTMETHOD(Type, InitExpo, TGraph))(p))->InitExpo(xmin, xmax);\
}\
\
void Type##_InitGaus ( Type##_p p, double xmin, double xmax ) {\
((TYPECASTMETHOD(Type, InitGaus, TGraph))(p))->InitGaus(xmin, xmax);\
}\
\
void Type##_InitPolynom ( Type##_p p, double xmin, double xmax ) {\
((TYPECASTMETHOD(Type, InitPolynom, TGraph))(p))->InitPolynom(xmin, xmax);\
}\
\
int Type##_InsertPoint ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, InsertPoint, TGraph))(p))->InsertPoint();\
}\
\
double Type##_integralTGraph ( Type##_p p, int first, int last ) {\
return ((TYPECASTMETHOD(Type, integralTGraph, TGraph))(p))->Integral(first, last);\
}\
\
bool Type##_IsEditable ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, IsEditable, TGraph))(p))->IsEditable();\
}\
\
int Type##_isInsideTGraph ( Type##_p p, double x, double y ) {\
return ((TYPECASTMETHOD(Type, isInsideTGraph, TGraph))(p))->IsInside(x, y);\
}\
\
void Type##_LeastSquareFit ( Type##_p p, int m, double* a, double xmin, double xmax ) {\
((TYPECASTMETHOD(Type, LeastSquareFit, TGraph))(p))->LeastSquareFit(m, a, xmin, xmax);\
}\
\
void Type##_PaintStats ( Type##_p p, TF1_p fit ) {\
((TYPECASTMETHOD(Type, PaintStats, TGraph))(p))->PaintStats(from_nonconst_to_nonconst<TF1, TF1_t>(fit));\
}\
\
int Type##_RemovePoint ( Type##_p p, int ipoint ) {\
return ((TYPECASTMETHOD(Type, RemovePoint, TGraph))(p))->RemovePoint(ipoint);\
}\
\
void Type##_SetEditable ( Type##_p p, bool editable ) {\
((TYPECASTMETHOD(Type, SetEditable, TGraph))(p))->SetEditable(editable);\
}\
\
void Type##_SetHistogram ( Type##_p p, TH1F_p h ) {\
((TYPECASTMETHOD(Type, SetHistogram, TGraph))(p))->SetHistogram(from_nonconst_to_nonconst<TH1F, TH1F_t>(h));\
}\
\
void Type##_setMaximumTGraph ( Type##_p p, double maximum ) {\
((TYPECASTMETHOD(Type, setMaximumTGraph, TGraph))(p))->SetMaximum(maximum);\
}\
\
void Type##_setMinimumTGraph ( Type##_p p, double minimum ) {\
((TYPECASTMETHOD(Type, setMinimumTGraph, TGraph))(p))->SetMinimum(minimum);\
}\
\
void Type##_Set ( Type##_p p, int n ) {\
((TYPECASTMETHOD(Type, Set, TGraph))(p))->Set(n);\
}\
\
void Type##_SetPoint ( Type##_p p, int i, double x, double y ) {\
((TYPECASTMETHOD(Type, SetPoint, TGraph))(p))->SetPoint(i, x, y);\
}
#define TGRAPH_DEF_NONVIRT(Type) \
Type##_p Type##_newTGraph ( int n, double* x, double* y ) {\
Type* newp=new Type(n, x, y);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\
}\
\
bool Type##_tGraph_GetEditable ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tGraph_GetEditable, TGraph))(p))->GetEditable();\
}\
\
TF1_p Type##_tGraph_GetFunction ( Type##_p p, const char* name ) {\
return from_nonconst_to_nonconst<TF1_t, TF1>((TF1*)((TYPECASTMETHOD(Type, tGraph_GetFunction, TGraph))(p))->GetFunction(name));\
}\
\
TH1F_p Type##_tGraph_GetHistogram ( Type##_p p ) {\
return from_nonconst_to_nonconst<TH1F_t, TH1F>((TH1F*)((TYPECASTMETHOD(Type, tGraph_GetHistogram, TGraph))(p))->GetHistogram());\
}\
\
int Type##_tGraph_GetMaxSize ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tGraph_GetMaxSize, TGraph))(p))->GetMaxSize();\
}\
\
int Type##_tGraph_GetN ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tGraph_GetN, TGraph))(p))->GetN();\
}\
\
double Type##_tGraph_GetMaximum ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tGraph_GetMaximum, TGraph))(p))->GetMaximum();\
}\
\
double Type##_tGraph_GetMinimum ( Type##_p p ) {\
return ((TYPECASTMETHOD(Type, tGraph_GetMinimum, TGraph))(p))->GetMinimum();\
}\
\
TAxis_p Type##_tGraph_GetXaxis ( Type##_p p ) {\
return from_nonconst_to_nonconst<TAxis_t, TAxis>((TAxis*)((TYPECASTMETHOD(Type, tGraph_GetXaxis, TGraph))(p))->GetXaxis());\
}\
\
TAxis_p Type##_tGraph_GetYaxis ( Type##_p p ) {\
return from_nonconst_to_nonconst<TAxis_t, TAxis>((TAxis*)((TYPECASTMETHOD(Type, tGraph_GetYaxis, TGraph))(p))->GetYaxis());\
}\
\
void Type##_tGraph_PaintGraph ( Type##_p p, int npoints, double* x, double* y, const char* chopt ) {\
((TYPECASTMETHOD(Type, tGraph_PaintGraph, TGraph))(p))->PaintGraph(npoints, x, y, chopt);\
}\
\
void Type##_tGraph_PaintGrapHist ( Type##_p p, int npoints, double* x, double* y, const char* chopt ) {\
((TYPECASTMETHOD(Type, tGraph_PaintGrapHist, TGraph))(p))->PaintGrapHist(npoints, x, y, chopt);\
}
#define TGRAPH_DEF_ACCESSOR(Type) \
TNAMED_DECL_VIRT(TGraph)
TATTLINE_DECL_VIRT(TGraph)
TATTFILL_DECL_VIRT(TGraph)
TATTMARKER_DECL_VIRT(TGraph)
TOBJECT_DECL_VIRT(TGraph)
DELETABLE_DECL_VIRT(TGraph)
TGRAPH_DECL_VIRT(TGraph)
TGRAPH_DECL_NONVIRT(TGraph)
TGRAPH_DECL_ACCESSOR(TGraph)
#ifdef __cplusplus
}
#endif