packages feed

HROOT-hist-0.8: csrc/HROOTHistTH1.h

#ifdef __cplusplus
extern "C" { 
#endif 

#ifndef __HROOT_HIST__TH1__
#define __HROOT_HIST__TH1__

#include "HROOT-histType.h"

#include "HROOTCoreTObject.h"
#include "HROOTCoreTAttLine.h"
#include "HROOTCoreTAttFill.h"
#include "HROOTCoreTAttMarker.h"
#include "HROOTCoreDeletable.h"
#include "HROOT-coreType.h"

#undef TH1_DECL_VIRT
#define TH1_DECL_VIRT(Type) \
void Type ## _Add ( Type ## _p p, TH1_p h1, double c1 ); \
void Type ## _AddBinContent ( Type ## _p p, int bin, double w ); \
double Type ## _Chi2Test ( Type ## _p p, TH1_p h2, const char* option, double * res ); \
double Type ## _ComputeIntegral ( Type ## _p p ); \
void Type ## _DirectoryAutoAdd ( Type ## _p p, TDirectory_p dir ); \
void Type ## _Divide ( Type ## _p p, TH1_p h1, TH1_p h2, double c1, double c2, const char* option ); \
Type ## _p Type ## _drawCopyTH1 ( Type ## _p p, const char* option ); \
TH1_p Type ## _DrawNormalized ( Type ## _p p, const char* option, double norm ); \
void Type ## _drawPanelTH1 ( Type ## _p p ); \
int Type ## _BufferEmpty ( Type ## _p p, int action ); \
void Type ## _evalF ( Type ## _p p, TF1_p f1, const char* option ); \
TH1_p Type ## _FFT ( Type ## _p p, TH1_p h_output, const char* option ); \
int Type ## _fill1 ( Type ## _p p, double x ); \
int Type ## _fill1w ( Type ## _p p, double x, double w ); \
void Type ## _fillN1 ( Type ## _p p, int ntimes, double * x, double * w, int stride ); \
void Type ## _FillRandom ( Type ## _p p, TH1_p h, int ntimes ); \
int Type ## _FindBin ( Type ## _p p, double x, double y, double z ); \
int Type ## _FindFixBin ( Type ## _p p, double x, double y, double z ); \
int Type ## _FindFirstBinAbove ( Type ## _p p, double threshold, int axis ); \
int Type ## _FindLastBinAbove ( Type ## _p p, double threshold, int axis ); \
void Type ## _FitPanelTH1 ( Type ## _p p ); \
int Type ## _getNdivisionA ( Type ## _p p, const char* axis ); \
int Type ## _getAxisColorA ( Type ## _p p, const char* axis ); \
int Type ## _getLabelColorA ( Type ## _p p, const char* axis ); \
int Type ## _getLabelFontA ( Type ## _p p, const char* axis ); \
double Type ## _getLabelOffsetA ( Type ## _p p, const char* axis ); \
double Type ## _getLabelSizeA ( Type ## _p p, const char* axis ); \
int Type ## _getTitleFontA ( Type ## _p p, const char* axis ); \
double Type ## _getTitleOffsetA ( Type ## _p p, const char* axis ); \
double Type ## _getTitleSizeA ( Type ## _p p, const char* axis ); \
double Type ## _getTickLengthA ( Type ## _p p, const char* axis ); \
double Type ## _GetBarOffset ( Type ## _p p ); \
double Type ## _GetBarWidth ( Type ## _p p ); \
int Type ## _GetContour ( Type ## _p p, double * levels ); \
double Type ## _GetContourLevel ( Type ## _p p, int level ); \
double Type ## _GetContourLevelPad ( Type ## _p p, int level ); \
int Type ## _GetBin ( Type ## _p p, int binx, int biny, int binz ); \
double Type ## _GetBinCenter ( Type ## _p p, int bin ); \
double Type ## _GetBinContent1 ( Type ## _p p, int binx ); \
double Type ## _GetBinContent2 ( Type ## _p p, int binx, int biny ); \
double Type ## _GetBinContent3 ( Type ## _p p, int binx, int biny, int binz ); \
double Type ## _GetBinError1 ( Type ## _p p, int binx ); \
double Type ## _GetBinError2 ( Type ## _p p, int binx, int biny ); \
double Type ## _GetBinError3 ( Type ## _p p, int binx, int biny, int binz ); \
double Type ## _GetBinLowEdge ( Type ## _p p, int bin ); \
double Type ## _GetBinWidth ( Type ## _p p, int bin ); \
double Type ## _GetCellContent ( Type ## _p p, int binx, int biny ); \
double Type ## _GetCellError ( Type ## _p p, int binx, int biny ); \
double Type ## _GetEntries ( Type ## _p p ); \
double Type ## _GetEffectiveEntries ( Type ## _p p ); \
TF1_p Type ## _GetFunction ( Type ## _p p, const char* name ); \
int Type ## _GetDimension ( Type ## _p p ); \
double Type ## _GetKurtosis ( Type ## _p p, int axis ); \
void Type ## _GetLowEdge ( Type ## _p p, double * edge ); \
double Type ## _getMaximumTH1 ( Type ## _p p, double maxval ); \
int Type ## _GetMaximumBin ( Type ## _p p ); \
double Type ## _GetMaximumStored ( Type ## _p p ); \
double Type ## _getMinimumTH1 ( Type ## _p p, double minval ); \
int Type ## _GetMinimumBin ( Type ## _p p ); \
double Type ## _GetMinimumStored ( Type ## _p p ); \
double Type ## _GetMean ( Type ## _p p, int axis ); \
double Type ## _GetMeanError ( Type ## _p p, int axis ); \
double Type ## _GetNbinsX ( Type ## _p p ); \
double Type ## _GetNbinsY ( Type ## _p p ); \
double Type ## _GetNbinsZ ( Type ## _p p ); \
int Type ## _getQuantilesTH1 ( Type ## _p p, int nprobSum, double * q, double * pbSum ); \
double Type ## _GetRandom ( Type ## _p p ); \
void Type ## _GetStats ( Type ## _p p, double * stats ); \
double Type ## _GetSumOfWeights ( Type ## _p p ); \
TArrayD_p Type ## _GetSumw2 ( Type ## _p p ); \
int Type ## _GetSumw2N ( Type ## _p p ); \
double Type ## _GetRMS ( Type ## _p p, int axis ); \
double Type ## _GetRMSError ( Type ## _p p, int axis ); \
double Type ## _GetSkewness ( Type ## _p p, int axis ); \
double Type ## _integral1 ( Type ## _p p, int binx1, int binx2, const char* option ); \
double Type ## _interpolate1 ( Type ## _p p, double x ); \
double Type ## _interpolate2 ( Type ## _p p, double x, double y ); \
double Type ## _interpolate3 ( Type ## _p p, double x, double y, double z ); \
double Type ## _KolmogorovTest ( Type ## _p p, TH1_p h2, const char* option ); \
void Type ## _LabelsDeflate ( Type ## _p p, const char* axis ); \
void Type ## _LabelsInflate ( Type ## _p p, const char* axis ); \
void Type ## _LabelsOption ( Type ## _p p, const char* option, const char* axis ); \
void Type ## _multiflyF ( Type ## _p p, TF1_p h1, double c1 ); \
void Type ## _Multiply ( Type ## _p p, TH1_p h1, TH1_p h2, double c1, double c2, const char* option ); \
void Type ## _PutStats ( Type ## _p p, double * stats ); \
TH1_p Type ## _Rebin ( Type ## _p p, int ngroup, const char* newname, double * xbins ); \
void Type ## _RebinAxis ( Type ## _p p, double x, TAxis_p axis ); \
void Type ## _Rebuild ( Type ## _p p, const char* option ); \
void Type ## _RecursiveRemove ( Type ## _p p, TObject_p obj ); \
void Type ## _Reset ( Type ## _p p, const char* option ); \
void Type ## _ResetStats ( Type ## _p p ); \
void Type ## _Scale ( Type ## _p p, double c1, const char* option ); \
void Type ## _setAxisColorA ( Type ## _p p, int color, const char* axis ); \
void Type ## _SetAxisRange ( Type ## _p p, double xmin, double xmax, const char* axis ); \
void Type ## _SetBarOffset ( Type ## _p p, double offset ); \
void Type ## _SetBarWidth ( Type ## _p p, double width ); \
void Type ## _setBinContent1 ( Type ## _p p, int bin, double content ); \
void Type ## _setBinContent2 ( Type ## _p p, int binx, int biny, double content ); \
void Type ## _setBinContent3 ( Type ## _p p, int binx, int biny, int binz, double content ); \
void Type ## _setBinError1 ( Type ## _p p, int bin, double error ); \
void Type ## _setBinError2 ( Type ## _p p, int binx, int biny, double error ); \
void Type ## _setBinError3 ( Type ## _p p, int binx, int biny, int binz, double error ); \
void Type ## _setBins1 ( Type ## _p p, int nx, double * xBins ); \
void Type ## _setBins2 ( Type ## _p p, int nx, double * xBins, int ny, double * yBins ); \
void Type ## _setBins3 ( Type ## _p p, int nx, double * xBins, int ny, double * yBins, int nz, double * zBins ); \
void Type ## _SetBinsLength ( Type ## _p p, int bin ); \
void Type ## _SetBuffer ( Type ## _p p, int buffersize, const char* option ); \
void Type ## _SetCellContent ( Type ## _p p, int binx, int biny, double content ); \
void Type ## _SetContent ( Type ## _p p, double * content ); \
void Type ## _SetContour ( Type ## _p p, int nlevels, double * levels ); \
void Type ## _SetContourLevel ( Type ## _p p, int level, double value ); \
void Type ## _SetDirectory ( Type ## _p p, TDirectory_p dir ); \
void Type ## _SetEntries ( Type ## _p p, double n ); \
void Type ## _SetError ( Type ## _p p, double * error ); \
void Type ## _setLabelColorA ( Type ## _p p, int color, const char* axis ); \
void Type ## _setLabelSizeA ( Type ## _p p, double size, const char* axis ); \
void Type ## _setLabelFontA ( Type ## _p p, int font, const char* axis ); \
void Type ## _setLabelOffsetA ( Type ## _p p, double offset, const char* axis ); \
void Type ## _SetMaximum ( Type ## _p p, double maximum ); \
void Type ## _SetMinimum ( Type ## _p p, double minimum ); \
void Type ## _SetNormFactor ( Type ## _p p, double factor ); \
void Type ## _SetStats ( Type ## _p p, int stats ); \
void Type ## _SetOption ( Type ## _p p, const char* option ); \
void Type ## _SetXTitle ( Type ## _p p, const char* title ); \
void Type ## _SetYTitle ( Type ## _p p, const char* title ); \
void Type ## _SetZTitle ( Type ## _p p, const char* title ); \
TH1_p Type ## _ShowBackground ( Type ## _p p, int niter, const char* option ); \
int Type ## _ShowPeaks ( Type ## _p p, double sigma, const char* option, double threshold ); \
void Type ## _Smooth ( Type ## _p p, int ntimes, const char* option ); \
void Type ## _Sumw2 ( Type ## _p p )

#undef TH1_DECL_NONVIRT
#define TH1_DECL_NONVIRT(Type) \
Type ## _p Type ## _tH1GetAsymmetry ( Type ## _p p, TH1_p h2, double c2, double dc2 ); \
int Type ## _tH1GetBufferLength ( Type ## _p p ); \
int Type ## _tH1GetBufferSize ( Type ## _p p ); \
int Type ## _tH1GetDefaultBufferSize (  ); \
int Type ## _tH1GetDefaultSumw2 (  ); \
TDirectory_p Type ## _tH1GetDirectory ( Type ## _p p ); \
int Type ## _tH1IsBinOverflow ( Type ## _p p, int bin ); \
int Type ## _tH1IsBinUnderflow ( Type ## _p p, int bin ); \
void Type ## _tH1SetDefaultBufferSize ( int buffersize ); \
void Type ## _tH1SetDefaultSumw2 ( int sumw2 ); \
void Type ## _tH1SmoothArray ( int NN, double * XX, int ntimes ); \
void Type ## _tH1StatOverflows ( int flag ); \
void Type ## _tH1UseCurrentStyle ( Type ## _p p )

#undef TH1_DEF_VIRT
#define TH1_DEF_VIRT(Type)\
void Type ## _Add ( Type ## _p p, TH1_p h1, double c1 )\
{\
TYPECASTMETHOD(Type,Add,TH1)(p)->Add(to_nonconst<TH1,TH1_t>(h1), c1);\
}\
void Type ## _AddBinContent ( Type ## _p p, int bin, double w )\
{\
TYPECASTMETHOD(Type,AddBinContent,TH1)(p)->AddBinContent(bin, w);\
}\
double Type ## _Chi2Test ( Type ## _p p, TH1_p h2, const char* option, double * res )\
{\
return TYPECASTMETHOD(Type,Chi2Test,TH1)(p)->Chi2Test(to_nonconst<TH1,TH1_t>(h2), option, res);\
}\
double Type ## _ComputeIntegral ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,ComputeIntegral,TH1)(p)->ComputeIntegral();\
}\
void Type ## _DirectoryAutoAdd ( Type ## _p p, TDirectory_p dir )\
{\
TYPECASTMETHOD(Type,DirectoryAutoAdd,TH1)(p)->DirectoryAutoAdd(to_nonconst<TDirectory,TDirectory_t>(dir));\
}\
void Type ## _Divide ( Type ## _p p, TH1_p h1, TH1_p h2, double c1, double c2, const char* option )\
{\
TYPECASTMETHOD(Type,Divide,TH1)(p)->Divide(to_nonconst<TH1,TH1_t>(h1), to_nonconst<TH1,TH1_t>(h2), c1, c2, option);\
}\
Type ## _p Type ## _drawCopyTH1 ( Type ## _p p, const char* option )\
{\
return to_nonconst<Type ## _t, Type>((Type *)TYPECASTMETHOD(Type,drawCopyTH1,TH1)(p)->DrawCopy(option)) ;\
}\
TH1_p Type ## _DrawNormalized ( Type ## _p p, const char* option, double norm )\
{\
return to_nonconst<TH1_t,TH1>((TH1*)TYPECASTMETHOD(Type,DrawNormalized,TH1)(p)->DrawNormalized(option, norm));\
}\
void Type ## _drawPanelTH1 ( Type ## _p p )\
{\
TYPECASTMETHOD(Type,drawPanelTH1,TH1)(p)->DrawPanel();\
}\
int Type ## _BufferEmpty ( Type ## _p p, int action )\
{\
return TYPECASTMETHOD(Type,BufferEmpty,TH1)(p)->BufferEmpty(action);\
}\
void Type ## _evalF ( Type ## _p p, TF1_p f1, const char* option )\
{\
TYPECASTMETHOD(Type,evalF,TH1)(p)->Eval(to_nonconst<TF1,TF1_t>(f1), option);\
}\
TH1_p Type ## _FFT ( Type ## _p p, TH1_p h_output, const char* option )\
{\
return to_nonconst<TH1_t,TH1>((TH1*)TYPECASTMETHOD(Type,FFT,TH1)(p)->FFT(to_nonconst<TH1,TH1_t>(h_output), option));\
}\
int Type ## _fill1 ( Type ## _p p, double x )\
{\
return TYPECASTMETHOD(Type,fill1,TH1)(p)->Fill(x);\
}\
int Type ## _fill1w ( Type ## _p p, double x, double w )\
{\
return TYPECASTMETHOD(Type,fill1w,TH1)(p)->Fill(x, w);\
}\
void Type ## _fillN1 ( Type ## _p p, int ntimes, double * x, double * w, int stride )\
{\
TYPECASTMETHOD(Type,fillN1,TH1)(p)->FillN(ntimes, x, w, stride);\
}\
void Type ## _FillRandom ( Type ## _p p, TH1_p h, int ntimes )\
{\
TYPECASTMETHOD(Type,FillRandom,TH1)(p)->FillRandom(to_nonconst<TH1,TH1_t>(h), ntimes);\
}\
int Type ## _FindBin ( Type ## _p p, double x, double y, double z )\
{\
return TYPECASTMETHOD(Type,FindBin,TH1)(p)->FindBin(x, y, z);\
}\
int Type ## _FindFixBin ( Type ## _p p, double x, double y, double z )\
{\
return TYPECASTMETHOD(Type,FindFixBin,TH1)(p)->FindFixBin(x, y, z);\
}\
int Type ## _FindFirstBinAbove ( Type ## _p p, double threshold, int axis )\
{\
return TYPECASTMETHOD(Type,FindFirstBinAbove,TH1)(p)->FindFirstBinAbove(threshold, axis);\
}\
int Type ## _FindLastBinAbove ( Type ## _p p, double threshold, int axis )\
{\
return TYPECASTMETHOD(Type,FindLastBinAbove,TH1)(p)->FindLastBinAbove(threshold, axis);\
}\
void Type ## _FitPanelTH1 ( Type ## _p p )\
{\
TYPECASTMETHOD(Type,FitPanelTH1,TH1)(p)->FitPanel();\
}\
int Type ## _getNdivisionA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getNdivisionA,TH1)(p)->GetNdivisions(axis);\
}\
int Type ## _getAxisColorA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getAxisColorA,TH1)(p)->GetAxisColor(axis);\
}\
int Type ## _getLabelColorA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getLabelColorA,TH1)(p)->GetLabelColor(axis);\
}\
int Type ## _getLabelFontA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getLabelFontA,TH1)(p)->GetLabelFont(axis);\
}\
double Type ## _getLabelOffsetA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getLabelOffsetA,TH1)(p)->GetLabelOffset(axis);\
}\
double Type ## _getLabelSizeA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getLabelSizeA,TH1)(p)->GetLabelSize(axis);\
}\
int Type ## _getTitleFontA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getTitleFontA,TH1)(p)->GetTitleFont(axis);\
}\
double Type ## _getTitleOffsetA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getTitleOffsetA,TH1)(p)->GetTitleOffset(axis);\
}\
double Type ## _getTitleSizeA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getTitleSizeA,TH1)(p)->GetTitleSize(axis);\
}\
double Type ## _getTickLengthA ( Type ## _p p, const char* axis )\
{\
return TYPECASTMETHOD(Type,getTickLengthA,TH1)(p)->GetTickLength(axis);\
}\
double Type ## _GetBarOffset ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetBarOffset,TH1)(p)->GetBarOffset();\
}\
double Type ## _GetBarWidth ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetBarWidth,TH1)(p)->GetBarWidth();\
}\
int Type ## _GetContour ( Type ## _p p, double * levels )\
{\
return TYPECASTMETHOD(Type,GetContour,TH1)(p)->GetContour(levels);\
}\
double Type ## _GetContourLevel ( Type ## _p p, int level )\
{\
return TYPECASTMETHOD(Type,GetContourLevel,TH1)(p)->GetContourLevel(level);\
}\
double Type ## _GetContourLevelPad ( Type ## _p p, int level )\
{\
return TYPECASTMETHOD(Type,GetContourLevelPad,TH1)(p)->GetContourLevelPad(level);\
}\
int Type ## _GetBin ( Type ## _p p, int binx, int biny, int binz )\
{\
return TYPECASTMETHOD(Type,GetBin,TH1)(p)->GetBin(binx, biny, binz);\
}\
double Type ## _GetBinCenter ( Type ## _p p, int bin )\
{\
return TYPECASTMETHOD(Type,GetBinCenter,TH1)(p)->GetBinCenter(bin);\
}\
double Type ## _GetBinContent1 ( Type ## _p p, int binx )\
{\
return TYPECASTMETHOD(Type,GetBinContent1,TH1)(p)->GetBinContent(binx);\
}\
double Type ## _GetBinContent2 ( Type ## _p p, int binx, int biny )\
{\
return TYPECASTMETHOD(Type,GetBinContent2,TH1)(p)->GetBinContent(binx, biny);\
}\
double Type ## _GetBinContent3 ( Type ## _p p, int binx, int biny, int binz )\
{\
return TYPECASTMETHOD(Type,GetBinContent3,TH1)(p)->GetBinContent(binx, biny, binz);\
}\
double Type ## _GetBinError1 ( Type ## _p p, int binx )\
{\
return TYPECASTMETHOD(Type,GetBinError1,TH1)(p)->GetBinError(binx);\
}\
double Type ## _GetBinError2 ( Type ## _p p, int binx, int biny )\
{\
return TYPECASTMETHOD(Type,GetBinError2,TH1)(p)->GetBinError(binx, biny);\
}\
double Type ## _GetBinError3 ( Type ## _p p, int binx, int biny, int binz )\
{\
return TYPECASTMETHOD(Type,GetBinError3,TH1)(p)->GetBinError(binx, biny, binz);\
}\
double Type ## _GetBinLowEdge ( Type ## _p p, int bin )\
{\
return TYPECASTMETHOD(Type,GetBinLowEdge,TH1)(p)->GetBinLowEdge(bin);\
}\
double Type ## _GetBinWidth ( Type ## _p p, int bin )\
{\
return TYPECASTMETHOD(Type,GetBinWidth,TH1)(p)->GetBinWidth(bin);\
}\
double Type ## _GetCellContent ( Type ## _p p, int binx, int biny )\
{\
return TYPECASTMETHOD(Type,GetCellContent,TH1)(p)->GetCellContent(binx, biny);\
}\
double Type ## _GetCellError ( Type ## _p p, int binx, int biny )\
{\
return TYPECASTMETHOD(Type,GetCellError,TH1)(p)->GetCellError(binx, biny);\
}\
double Type ## _GetEntries ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetEntries,TH1)(p)->GetEntries();\
}\
double Type ## _GetEffectiveEntries ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetEffectiveEntries,TH1)(p)->GetEffectiveEntries();\
}\
TF1_p Type ## _GetFunction ( Type ## _p p, const char* name )\
{\
return to_nonconst<TF1_t,TF1>((TF1*)TYPECASTMETHOD(Type,GetFunction,TH1)(p)->GetFunction(name));\
}\
int Type ## _GetDimension ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetDimension,TH1)(p)->GetDimension();\
}\
double Type ## _GetKurtosis ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetKurtosis,TH1)(p)->GetKurtosis(axis);\
}\
void Type ## _GetLowEdge ( Type ## _p p, double * edge )\
{\
TYPECASTMETHOD(Type,GetLowEdge,TH1)(p)->GetLowEdge(edge);\
}\
double Type ## _getMaximumTH1 ( Type ## _p p, double maxval )\
{\
return TYPECASTMETHOD(Type,getMaximumTH1,TH1)(p)->GetMaximum(maxval);\
}\
int Type ## _GetMaximumBin ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetMaximumBin,TH1)(p)->GetMaximumBin();\
}\
double Type ## _GetMaximumStored ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetMaximumStored,TH1)(p)->GetMaximumStored();\
}\
double Type ## _getMinimumTH1 ( Type ## _p p, double minval )\
{\
return TYPECASTMETHOD(Type,getMinimumTH1,TH1)(p)->GetMinimum(minval);\
}\
int Type ## _GetMinimumBin ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetMinimumBin,TH1)(p)->GetMinimumBin();\
}\
double Type ## _GetMinimumStored ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetMinimumStored,TH1)(p)->GetMinimumStored();\
}\
double Type ## _GetMean ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetMean,TH1)(p)->GetMean(axis);\
}\
double Type ## _GetMeanError ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetMeanError,TH1)(p)->GetMeanError(axis);\
}\
double Type ## _GetNbinsX ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetNbinsX,TH1)(p)->GetNbinsX();\
}\
double Type ## _GetNbinsY ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetNbinsY,TH1)(p)->GetNbinsY();\
}\
double Type ## _GetNbinsZ ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetNbinsZ,TH1)(p)->GetNbinsZ();\
}\
int Type ## _getQuantilesTH1 ( Type ## _p p, int nprobSum, double * q, double * pbSum )\
{\
return TYPECASTMETHOD(Type,getQuantilesTH1,TH1)(p)->GetQuantiles(nprobSum, q, pbSum);\
}\
double Type ## _GetRandom ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetRandom,TH1)(p)->GetRandom();\
}\
void Type ## _GetStats ( Type ## _p p, double * stats )\
{\
TYPECASTMETHOD(Type,GetStats,TH1)(p)->GetStats(stats);\
}\
double Type ## _GetSumOfWeights ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetSumOfWeights,TH1)(p)->GetSumOfWeights();\
}\
TArrayD_p Type ## _GetSumw2 ( Type ## _p p )\
{\
return to_nonconst<TArrayD_t,TArrayD>((TArrayD*)TYPECASTMETHOD(Type,GetSumw2,TH1)(p)->GetSumw2());\
}\
int Type ## _GetSumw2N ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,GetSumw2N,TH1)(p)->GetSumw2N();\
}\
double Type ## _GetRMS ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetRMS,TH1)(p)->GetRMS(axis);\
}\
double Type ## _GetRMSError ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetRMSError,TH1)(p)->GetRMSError(axis);\
}\
double Type ## _GetSkewness ( Type ## _p p, int axis )\
{\
return TYPECASTMETHOD(Type,GetSkewness,TH1)(p)->GetSkewness(axis);\
}\
double Type ## _integral1 ( Type ## _p p, int binx1, int binx2, const char* option )\
{\
return TYPECASTMETHOD(Type,integral1,TH1)(p)->Integral(binx1, binx2, option);\
}\
double Type ## _interpolate1 ( Type ## _p p, double x )\
{\
return TYPECASTMETHOD(Type,interpolate1,TH1)(p)->Interpolate(x);\
}\
double Type ## _interpolate2 ( Type ## _p p, double x, double y )\
{\
return TYPECASTMETHOD(Type,interpolate2,TH1)(p)->Interpolate(x, y);\
}\
double Type ## _interpolate3 ( Type ## _p p, double x, double y, double z )\
{\
return TYPECASTMETHOD(Type,interpolate3,TH1)(p)->Interpolate(x, y, z);\
}\
double Type ## _KolmogorovTest ( Type ## _p p, TH1_p h2, const char* option )\
{\
return TYPECASTMETHOD(Type,KolmogorovTest,TH1)(p)->KolmogorovTest(to_nonconst<TH1,TH1_t>(h2), option);\
}\
void Type ## _LabelsDeflate ( Type ## _p p, const char* axis )\
{\
TYPECASTMETHOD(Type,LabelsDeflate,TH1)(p)->LabelsDeflate(axis);\
}\
void Type ## _LabelsInflate ( Type ## _p p, const char* axis )\
{\
TYPECASTMETHOD(Type,LabelsInflate,TH1)(p)->LabelsInflate(axis);\
}\
void Type ## _LabelsOption ( Type ## _p p, const char* option, const char* axis )\
{\
TYPECASTMETHOD(Type,LabelsOption,TH1)(p)->LabelsOption(option, axis);\
}\
void Type ## _multiflyF ( Type ## _p p, TF1_p h1, double c1 )\
{\
TYPECASTMETHOD(Type,multiflyF,TH1)(p)->Multiply(to_nonconst<TF1,TF1_t>(h1), c1);\
}\
void Type ## _Multiply ( Type ## _p p, TH1_p h1, TH1_p h2, double c1, double c2, const char* option )\
{\
TYPECASTMETHOD(Type,Multiply,TH1)(p)->Multiply(to_nonconst<TH1,TH1_t>(h1), to_nonconst<TH1,TH1_t>(h2), c1, c2, option);\
}\
void Type ## _PutStats ( Type ## _p p, double * stats )\
{\
TYPECASTMETHOD(Type,PutStats,TH1)(p)->PutStats(stats);\
}\
TH1_p Type ## _Rebin ( Type ## _p p, int ngroup, const char* newname, double * xbins )\
{\
return to_nonconst<TH1_t,TH1>((TH1*)TYPECASTMETHOD(Type,Rebin,TH1)(p)->Rebin(ngroup, newname, xbins));\
}\
void Type ## _RebinAxis ( Type ## _p p, double x, TAxis_p axis )\
{\
TYPECASTMETHOD(Type,RebinAxis,TH1)(p)->RebinAxis(x, to_nonconst<TAxis,TAxis_t>(axis));\
}\
void Type ## _Rebuild ( Type ## _p p, const char* option )\
{\
TYPECASTMETHOD(Type,Rebuild,TH1)(p)->Rebuild(option);\
}\
void Type ## _RecursiveRemove ( Type ## _p p, TObject_p obj )\
{\
TYPECASTMETHOD(Type,RecursiveRemove,TH1)(p)->RecursiveRemove(to_nonconst<TObject,TObject_t>(obj));\
}\
void Type ## _Reset ( Type ## _p p, const char* option )\
{\
TYPECASTMETHOD(Type,Reset,TH1)(p)->Reset(option);\
}\
void Type ## _ResetStats ( Type ## _p p )\
{\
TYPECASTMETHOD(Type,ResetStats,TH1)(p)->ResetStats();\
}\
void Type ## _Scale ( Type ## _p p, double c1, const char* option )\
{\
TYPECASTMETHOD(Type,Scale,TH1)(p)->Scale(c1, option);\
}\
void Type ## _setAxisColorA ( Type ## _p p, int color, const char* axis )\
{\
TYPECASTMETHOD(Type,setAxisColorA,TH1)(p)->SetAxisColor(color, axis);\
}\
void Type ## _SetAxisRange ( Type ## _p p, double xmin, double xmax, const char* axis )\
{\
TYPECASTMETHOD(Type,SetAxisRange,TH1)(p)->SetAxisRange(xmin, xmax, axis);\
}\
void Type ## _SetBarOffset ( Type ## _p p, double offset )\
{\
TYPECASTMETHOD(Type,SetBarOffset,TH1)(p)->SetBarOffset(offset);\
}\
void Type ## _SetBarWidth ( Type ## _p p, double width )\
{\
TYPECASTMETHOD(Type,SetBarWidth,TH1)(p)->SetBarWidth(width);\
}\
void Type ## _setBinContent1 ( Type ## _p p, int bin, double content )\
{\
TYPECASTMETHOD(Type,setBinContent1,TH1)(p)->SetBinContent(bin, content);\
}\
void Type ## _setBinContent2 ( Type ## _p p, int binx, int biny, double content )\
{\
TYPECASTMETHOD(Type,setBinContent2,TH1)(p)->SetBinContent(binx, biny, content);\
}\
void Type ## _setBinContent3 ( Type ## _p p, int binx, int biny, int binz, double content )\
{\
TYPECASTMETHOD(Type,setBinContent3,TH1)(p)->SetBinContent(binx, biny, binz, content);\
}\
void Type ## _setBinError1 ( Type ## _p p, int bin, double error )\
{\
TYPECASTMETHOD(Type,setBinError1,TH1)(p)->SetBinError(bin, error);\
}\
void Type ## _setBinError2 ( Type ## _p p, int binx, int biny, double error )\
{\
TYPECASTMETHOD(Type,setBinError2,TH1)(p)->SetBinError(binx, biny, error);\
}\
void Type ## _setBinError3 ( Type ## _p p, int binx, int biny, int binz, double error )\
{\
TYPECASTMETHOD(Type,setBinError3,TH1)(p)->SetBinError(binx, biny, binz, error);\
}\
void Type ## _setBins1 ( Type ## _p p, int nx, double * xBins )\
{\
TYPECASTMETHOD(Type,setBins1,TH1)(p)->SetBins(nx, xBins);\
}\
void Type ## _setBins2 ( Type ## _p p, int nx, double * xBins, int ny, double * yBins )\
{\
TYPECASTMETHOD(Type,setBins2,TH1)(p)->SetBins(nx, xBins, ny, yBins);\
}\
void Type ## _setBins3 ( Type ## _p p, int nx, double * xBins, int ny, double * yBins, int nz, double * zBins )\
{\
TYPECASTMETHOD(Type,setBins3,TH1)(p)->SetBins(nx, xBins, ny, yBins, nz, zBins);\
}\
void Type ## _SetBinsLength ( Type ## _p p, int bin )\
{\
TYPECASTMETHOD(Type,SetBinsLength,TH1)(p)->SetBinsLength(bin);\
}\
void Type ## _SetBuffer ( Type ## _p p, int buffersize, const char* option )\
{\
TYPECASTMETHOD(Type,SetBuffer,TH1)(p)->SetBuffer(buffersize, option);\
}\
void Type ## _SetCellContent ( Type ## _p p, int binx, int biny, double content )\
{\
TYPECASTMETHOD(Type,SetCellContent,TH1)(p)->SetCellContent(binx, biny, content);\
}\
void Type ## _SetContent ( Type ## _p p, double * content )\
{\
TYPECASTMETHOD(Type,SetContent,TH1)(p)->SetContent(content);\
}\
void Type ## _SetContour ( Type ## _p p, int nlevels, double * levels )\
{\
TYPECASTMETHOD(Type,SetContour,TH1)(p)->SetContour(nlevels, levels);\
}\
void Type ## _SetContourLevel ( Type ## _p p, int level, double value )\
{\
TYPECASTMETHOD(Type,SetContourLevel,TH1)(p)->SetContourLevel(level, value);\
}\
void Type ## _SetDirectory ( Type ## _p p, TDirectory_p dir )\
{\
TYPECASTMETHOD(Type,SetDirectory,TH1)(p)->SetDirectory(to_nonconst<TDirectory,TDirectory_t>(dir));\
}\
void Type ## _SetEntries ( Type ## _p p, double n )\
{\
TYPECASTMETHOD(Type,SetEntries,TH1)(p)->SetEntries(n);\
}\
void Type ## _SetError ( Type ## _p p, double * error )\
{\
TYPECASTMETHOD(Type,SetError,TH1)(p)->SetError(error);\
}\
void Type ## _setLabelColorA ( Type ## _p p, int color, const char* axis )\
{\
TYPECASTMETHOD(Type,setLabelColorA,TH1)(p)->SetLabelColor(color, axis);\
}\
void Type ## _setLabelSizeA ( Type ## _p p, double size, const char* axis )\
{\
TYPECASTMETHOD(Type,setLabelSizeA,TH1)(p)->SetLabelSize(size, axis);\
}\
void Type ## _setLabelFontA ( Type ## _p p, int font, const char* axis )\
{\
TYPECASTMETHOD(Type,setLabelFontA,TH1)(p)->SetLabelFont(font, axis);\
}\
void Type ## _setLabelOffsetA ( Type ## _p p, double offset, const char* axis )\
{\
TYPECASTMETHOD(Type,setLabelOffsetA,TH1)(p)->SetLabelOffset(offset, axis);\
}\
void Type ## _SetMaximum ( Type ## _p p, double maximum )\
{\
TYPECASTMETHOD(Type,SetMaximum,TH1)(p)->SetMaximum(maximum);\
}\
void Type ## _SetMinimum ( Type ## _p p, double minimum )\
{\
TYPECASTMETHOD(Type,SetMinimum,TH1)(p)->SetMinimum(minimum);\
}\
void Type ## _SetNormFactor ( Type ## _p p, double factor )\
{\
TYPECASTMETHOD(Type,SetNormFactor,TH1)(p)->SetNormFactor(factor);\
}\
void Type ## _SetStats ( Type ## _p p, int stats )\
{\
TYPECASTMETHOD(Type,SetStats,TH1)(p)->SetStats(stats);\
}\
void Type ## _SetOption ( Type ## _p p, const char* option )\
{\
TYPECASTMETHOD(Type,SetOption,TH1)(p)->SetOption(option);\
}\
void Type ## _SetXTitle ( Type ## _p p, const char* title )\
{\
TYPECASTMETHOD(Type,SetXTitle,TH1)(p)->SetXTitle(title);\
}\
void Type ## _SetYTitle ( Type ## _p p, const char* title )\
{\
TYPECASTMETHOD(Type,SetYTitle,TH1)(p)->SetYTitle(title);\
}\
void Type ## _SetZTitle ( Type ## _p p, const char* title )\
{\
TYPECASTMETHOD(Type,SetZTitle,TH1)(p)->SetZTitle(title);\
}\
TH1_p Type ## _ShowBackground ( Type ## _p p, int niter, const char* option )\
{\
return to_nonconst<TH1_t,TH1>((TH1*)TYPECASTMETHOD(Type,ShowBackground,TH1)(p)->ShowBackground(niter, option));\
}\
int Type ## _ShowPeaks ( Type ## _p p, double sigma, const char* option, double threshold )\
{\
return TYPECASTMETHOD(Type,ShowPeaks,TH1)(p)->ShowPeaks(sigma, option, threshold);\
}\
void Type ## _Smooth ( Type ## _p p, int ntimes, const char* option )\
{\
TYPECASTMETHOD(Type,Smooth,TH1)(p)->Smooth(ntimes, option);\
}\
void Type ## _Sumw2 ( Type ## _p p )\
{\
TYPECASTMETHOD(Type,Sumw2,TH1)(p)->Sumw2();\
}

#undef TH1_DEF_NONVIRT
#define TH1_DEF_NONVIRT(Type)\
Type ## _p Type ## _tH1GetAsymmetry ( Type ## _p p, TH1_p h2, double c2, double dc2 )\
{\
return to_nonconst<Type ## _t, Type>((Type *)TYPECASTMETHOD(Type,tH1GetAsymmetry,TH1)(p)->GetAsymmetry(to_nonconst<TH1,TH1_t>(h2), c2, dc2)) ;\
}\
int Type ## _tH1GetBufferLength ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,tH1GetBufferLength,TH1)(p)->GetBufferLength();\
}\
int Type ## _tH1GetBufferSize ( Type ## _p p )\
{\
return TYPECASTMETHOD(Type,tH1GetBufferSize,TH1)(p)->GetBufferSize();\
}\
int Type ## _tH1GetDefaultBufferSize (  )\
{\
return TH1::GetDefaultBufferSize();\
}\
int Type ## _tH1GetDefaultSumw2 (  )\
{\
return TH1::GetDefaultSumw2();\
}\
TDirectory_p Type ## _tH1GetDirectory ( Type ## _p p )\
{\
return to_nonconst<TDirectory_t,TDirectory>((TDirectory*)TYPECASTMETHOD(Type,tH1GetDirectory,TH1)(p)->GetDirectory());\
}\
int Type ## _tH1IsBinOverflow ( Type ## _p p, int bin )\
{\
return TYPECASTMETHOD(Type,tH1IsBinOverflow,TH1)(p)->IsBinOverflow(bin);\
}\
int Type ## _tH1IsBinUnderflow ( Type ## _p p, int bin )\
{\
return TYPECASTMETHOD(Type,tH1IsBinUnderflow,TH1)(p)->IsBinUnderflow(bin);\
}\
void Type ## _tH1SetDefaultBufferSize ( int buffersize )\
{\
TH1::SetDefaultBufferSize(buffersize);\
}\
void Type ## _tH1SetDefaultSumw2 ( int sumw2 )\
{\
TH1::SetDefaultSumw2(sumw2);\
}\
void Type ## _tH1SmoothArray ( int NN, double * XX, int ntimes )\
{\
TH1::SmoothArray(NN, XX, ntimes);\
}\
void Type ## _tH1StatOverflows ( int flag )\
{\
TH1::StatOverflows(flag);\
}\
void Type ## _tH1UseCurrentStyle ( Type ## _p p )\
{\
TYPECASTMETHOD(Type,tH1UseCurrentStyle,TH1)(p)->UseCurrentStyle();\
}

TOBJECT_DECL_VIRT(TH1);
TATTLINE_DECL_VIRT(TH1);
TATTFILL_DECL_VIRT(TH1);
TATTMARKER_DECL_VIRT(TH1);
DELETABLE_DECL_VIRT(TH1);


TH1_DECL_VIRT(TH1);


TH1_DECL_NONVIRT(TH1);


#endif // __HROOT_HIST__TH1__

#ifdef __cplusplus
}
#endif