HROOT-hist-0.9: csrc/HROOTHistTH2.h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __HROOT_HIST__TH2__
#define __HROOT_HIST__TH2__
#include "HROOT-histType.h"
#include "HROOTHistTH1.h"
#include "HROOTCoreTNamed.h"
#include "HROOTCoreTAttLine.h"
#include "HROOTCoreTAttFill.h"
#include "HROOTCoreTAttMarker.h"
#include "HROOTCoreTObject.h"
#include "HROOTCoreDeletable.h"
#include "HROOT-coreType.h"
#undef TH2_DECL_VIRT
#define TH2_DECL_VIRT(Type) \
int Type ## _fill2 ( Type ## _p p, double x, double y ); \
int Type ## _fill2w ( Type ## _p p, double x, double y, double w ); \
void Type ## _fillN2 ( Type ## _p p, int ntimes, double * x, double * y, double * w, int stride ); \
void Type ## _fillRandom2 ( Type ## _p p, TH1_p h, int ntimes ); \
int Type ## _findFirstBinAbove2 ( Type ## _p p, double threshold, int axis ); \
int Type ## _findLastBinAbove2 ( Type ## _p p, double threshold, int axis ); \
void Type ## _FitSlicesX ( Type ## _p p, TF1_p f1, int firstybin, int lastybin, int cut, const char* option, TObjArray_p arr ); \
void Type ## _FitSlicesY ( Type ## _p p, TF1_p f1, int firstxbin, int lastxbin, int cut, const char* option, TObjArray_p arr ); \
double Type ## _getCorrelationFactor2 ( Type ## _p p, int axis1, int axis2 ); \
double Type ## _getCovariance2 ( Type ## _p p, int axis1, int axis2 ); \
double Type ## _integral2 ( Type ## _p p, int binx1, int binx2, int biny1, int biny2, const char* option ); \
TH2_p Type ## _rebinX2 ( Type ## _p p, int ngroup, const char* newname ); \
TH2_p Type ## _rebinY2 ( Type ## _p p, int ngroup, const char* newname ); \
TH2_p Type ## _Rebin2D ( Type ## _p p, int nxgroup, int nygroup, const char* newname ); \
void Type ## _SetShowProjectionX ( Type ## _p p, int nbins ); \
void Type ## _SetShowProjectionY ( Type ## _p p, int nbins )
#undef TH2_DECL_NONVIRT
#define TH2_DECL_NONVIRT(Type) \
TH1D_p Type ## _tH2ProjectionX ( Type ## _p p, const char* name, int firstybin, int lastybin, const char* option ); \
TH1D_p Type ## _tH2ProjectionY ( Type ## _p p, const char* name, int firstxbin, int lastxbin, const char* option )
#undef TH2_DEF_VIRT
#define TH2_DEF_VIRT(Type)\
int Type ## _fill2 ( Type ## _p p, double x, double y )\
{\
return TYPECASTMETHOD(Type,fill2,TH2)(p)->Fill(x, y);\
}\
int Type ## _fill2w ( Type ## _p p, double x, double y, double w )\
{\
return TYPECASTMETHOD(Type,fill2w,TH2)(p)->Fill(x, y, w);\
}\
void Type ## _fillN2 ( Type ## _p p, int ntimes, double * x, double * y, double * w, int stride )\
{\
TYPECASTMETHOD(Type,fillN2,TH2)(p)->FillN(ntimes, x, y, w, stride);\
}\
void Type ## _fillRandom2 ( Type ## _p p, TH1_p h, int ntimes )\
{\
TYPECASTMETHOD(Type,fillRandom2,TH2)(p)->FillRandom(to_nonconst<TH1,TH1_t>(h), ntimes);\
}\
int Type ## _findFirstBinAbove2 ( Type ## _p p, double threshold, int axis )\
{\
return TYPECASTMETHOD(Type,findFirstBinAbove2,TH2)(p)->FindFirstBinAbove(threshold, axis);\
}\
int Type ## _findLastBinAbove2 ( Type ## _p p, double threshold, int axis )\
{\
return TYPECASTMETHOD(Type,findLastBinAbove2,TH2)(p)->FindLastBinAbove(threshold, axis);\
}\
void Type ## _FitSlicesX ( Type ## _p p, TF1_p f1, int firstybin, int lastybin, int cut, const char* option, TObjArray_p arr )\
{\
TYPECASTMETHOD(Type,FitSlicesX,TH2)(p)->FitSlicesX(to_nonconst<TF1,TF1_t>(f1), firstybin, lastybin, cut, option, to_nonconst<TObjArray,TObjArray_t>(arr));\
}\
void Type ## _FitSlicesY ( Type ## _p p, TF1_p f1, int firstxbin, int lastxbin, int cut, const char* option, TObjArray_p arr )\
{\
TYPECASTMETHOD(Type,FitSlicesY,TH2)(p)->FitSlicesY(to_nonconst<TF1,TF1_t>(f1), firstxbin, lastxbin, cut, option, to_nonconst<TObjArray,TObjArray_t>(arr));\
}\
double Type ## _getCorrelationFactor2 ( Type ## _p p, int axis1, int axis2 )\
{\
return TYPECASTMETHOD(Type,getCorrelationFactor2,TH2)(p)->GetCorrelationFactor(axis1, axis2);\
}\
double Type ## _getCovariance2 ( Type ## _p p, int axis1, int axis2 )\
{\
return TYPECASTMETHOD(Type,getCovariance2,TH2)(p)->GetCovariance(axis1, axis2);\
}\
double Type ## _integral2 ( Type ## _p p, int binx1, int binx2, int biny1, int biny2, const char* option )\
{\
return TYPECASTMETHOD(Type,integral2,TH2)(p)->Integral(binx1, binx2, biny1, biny2, option);\
}\
TH2_p Type ## _rebinX2 ( Type ## _p p, int ngroup, const char* newname )\
{\
return to_nonconst<TH2_t,TH2>((TH2*)TYPECASTMETHOD(Type,rebinX2,TH2)(p)->RebinX(ngroup, newname));\
}\
TH2_p Type ## _rebinY2 ( Type ## _p p, int ngroup, const char* newname )\
{\
return to_nonconst<TH2_t,TH2>((TH2*)TYPECASTMETHOD(Type,rebinY2,TH2)(p)->RebinY(ngroup, newname));\
}\
TH2_p Type ## _Rebin2D ( Type ## _p p, int nxgroup, int nygroup, const char* newname )\
{\
return to_nonconst<TH2_t,TH2>((TH2*)TYPECASTMETHOD(Type,Rebin2D,TH2)(p)->Rebin2D(nxgroup, nygroup, newname));\
}\
void Type ## _SetShowProjectionX ( Type ## _p p, int nbins )\
{\
TYPECASTMETHOD(Type,SetShowProjectionX,TH2)(p)->SetShowProjectionX(nbins);\
}\
void Type ## _SetShowProjectionY ( Type ## _p p, int nbins )\
{\
TYPECASTMETHOD(Type,SetShowProjectionY,TH2)(p)->SetShowProjectionY(nbins);\
}
#undef TH2_DEF_NONVIRT
#define TH2_DEF_NONVIRT(Type)\
TH1D_p Type ## _tH2ProjectionX ( Type ## _p p, const char* name, int firstybin, int lastybin, const char* option )\
{\
return to_nonconst<TH1D_t,TH1D>((TH1D*)TYPECASTMETHOD(Type,tH2ProjectionX,TH2)(p)->ProjectionX(name, firstybin, lastybin, option));\
}\
TH1D_p Type ## _tH2ProjectionY ( Type ## _p p, const char* name, int firstxbin, int lastxbin, const char* option )\
{\
return to_nonconst<TH1D_t,TH1D>((TH1D*)TYPECASTMETHOD(Type,tH2ProjectionY,TH2)(p)->ProjectionY(name, firstxbin, lastxbin, option));\
}
TH1_DECL_VIRT(TH2);
TNAMED_DECL_VIRT(TH2);
TATTLINE_DECL_VIRT(TH2);
TATTFILL_DECL_VIRT(TH2);
TATTMARKER_DECL_VIRT(TH2);
TOBJECT_DECL_VIRT(TH2);
DELETABLE_DECL_VIRT(TH2);
TH2_DECL_VIRT(TH2);
TH2_DECL_NONVIRT(TH2);
#endif // __HROOT_HIST__TH2__
#ifdef __cplusplus
}
#endif