#ifdef __cplusplus extern "C" { #endif #ifndef __HROOT_HIST__TGraph__ #define __HROOT_HIST__TGraph__ #include "HROOT-histType.h" #include "HROOTCoreTNamed.h" #include "HROOTCoreTAttLine.h" #include "HROOTCoreTAttFill.h" #include "HROOTCoreTAttMarker.h" #include "HROOTCoreTObject.h" #include "HROOTCoreDeletable.h" #include "HROOT-coreType.h" #undef TGRAPH_DECL_VIRT #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 ); \ int 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, int 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 ) #undef TGRAPH_DECL_NONVIRT #define TGRAPH_DECL_NONVIRT(Type) \ Type ## _p Type ## _newTGraph ( int n, double * x, double * y ); \ int Type ## _tGraphGetEditable ( Type ## _p p ); \ TF1_p Type ## _tGraphGetFunction ( Type ## _p p, const char* name ); \ TH1F_p Type ## _tGraphGetHistogram ( Type ## _p p ); \ int Type ## _tGraphGetMaxSize ( Type ## _p p ); \ int Type ## _tGraphGetN ( Type ## _p p ); \ double Type ## _tGraphGetMaximum ( Type ## _p p ); \ double Type ## _tGraphGetMinimum ( Type ## _p p ); \ TAxis_p Type ## _tGraphGetXaxis ( Type ## _p p ); \ TAxis_p Type ## _tGraphGetYaxis ( Type ## _p p ); \ void Type ## _tGraphPaintGraph ( Type ## _p p, int npoints, double * x, double * y, const char* chopt ); \ void Type ## _tGraphPaintGrapHist ( Type ## _p p, int npoints, double * x, double * y, const char* chopt ) #undef TGRAPH_DEF_VIRT #define TGRAPH_DEF_VIRT(Type)\ void Type ## _Apply ( Type ## _p p, TF1_p f )\ {\ TYPECASTMETHOD(Type,Apply,TGraph)(p)->Apply(to_nonconst(f));\ }\ double Type ## _Chisquare ( Type ## _p p, TF1_p f1 )\ {\ return TYPECASTMETHOD(Type,Chisquare,TGraph)(p)->Chisquare(to_nonconst(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);\ }\ int 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(to_nonconst(fit));\ }\ int Type ## _RemovePoint ( Type ## _p p, int ipoint )\ {\ return TYPECASTMETHOD(Type,RemovePoint,TGraph)(p)->RemovePoint(ipoint);\ }\ void Type ## _SetEditable ( Type ## _p p, int editable )\ {\ TYPECASTMETHOD(Type,SetEditable,TGraph)(p)->SetEditable(editable);\ }\ void Type ## _SetHistogram ( Type ## _p p, TH1F_p h )\ {\ TYPECASTMETHOD(Type,SetHistogram,TGraph)(p)->SetHistogram(to_nonconst(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);\ } #undef TGRAPH_DEF_NONVIRT #define TGRAPH_DEF_NONVIRT(Type)\ Type ## _p Type ## _newTGraph ( int n, double * x, double * y )\ {\ Type * newp = new Type (n, x, y); \ return to_nonconst(newp);\ }\ int Type ## _tGraphGetEditable ( Type ## _p p )\ {\ return TYPECASTMETHOD(Type,tGraphGetEditable,TGraph)(p)->GetEditable();\ }\ TF1_p Type ## _tGraphGetFunction ( Type ## _p p, const char* name )\ {\ return to_nonconst((TF1*)TYPECASTMETHOD(Type,tGraphGetFunction,TGraph)(p)->GetFunction(name));\ }\ TH1F_p Type ## _tGraphGetHistogram ( Type ## _p p )\ {\ return to_nonconst((TH1F*)TYPECASTMETHOD(Type,tGraphGetHistogram,TGraph)(p)->GetHistogram());\ }\ int Type ## _tGraphGetMaxSize ( Type ## _p p )\ {\ return TYPECASTMETHOD(Type,tGraphGetMaxSize,TGraph)(p)->GetMaxSize();\ }\ int Type ## _tGraphGetN ( Type ## _p p )\ {\ return TYPECASTMETHOD(Type,tGraphGetN,TGraph)(p)->GetN();\ }\ double Type ## _tGraphGetMaximum ( Type ## _p p )\ {\ return TYPECASTMETHOD(Type,tGraphGetMaximum,TGraph)(p)->GetMaximum();\ }\ double Type ## _tGraphGetMinimum ( Type ## _p p )\ {\ return TYPECASTMETHOD(Type,tGraphGetMinimum,TGraph)(p)->GetMinimum();\ }\ TAxis_p Type ## _tGraphGetXaxis ( Type ## _p p )\ {\ return to_nonconst((TAxis*)TYPECASTMETHOD(Type,tGraphGetXaxis,TGraph)(p)->GetXaxis());\ }\ TAxis_p Type ## _tGraphGetYaxis ( Type ## _p p )\ {\ return to_nonconst((TAxis*)TYPECASTMETHOD(Type,tGraphGetYaxis,TGraph)(p)->GetYaxis());\ }\ void Type ## _tGraphPaintGraph ( Type ## _p p, int npoints, double * x, double * y, const char* chopt )\ {\ TYPECASTMETHOD(Type,tGraphPaintGraph,TGraph)(p)->PaintGraph(npoints, x, y, chopt);\ }\ void Type ## _tGraphPaintGrapHist ( Type ## _p p, int npoints, double * x, double * y, const char* chopt )\ {\ TYPECASTMETHOD(Type,tGraphPaintGrapHist,TGraph)(p)->PaintGrapHist(npoints, x, y, chopt);\ } 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); #endif // __HROOT_HIST__TGraph__ #ifdef __cplusplus } #endif