{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, 
             FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, 
             OverlappingInstances, IncoherentInstances #-}

module HROOT.Hist.TH3I.Implementation where


import FFICXX.Runtime.Cast

import HROOT.Hist.TH3I.RawType
import HROOT.Hist.TH3I.FFI
import HROOT.Hist.TH3I.Interface
import HROOT.Hist.TH3I.Cast
import HROOT.Hist.TH1D.RawType
import HROOT.Hist.TH1D.Cast
import HROOT.Hist.TH1D.Interface
import HROOT.Hist.TF1.RawType
import HROOT.Hist.TF1.Cast
import HROOT.Hist.TF1.Interface
import HROOT.Core.TDirectory.RawType
import HROOT.Core.TDirectory.Cast
import HROOT.Core.TDirectory.Interface
import HROOT.Core.TArrayD.RawType
import HROOT.Core.TArrayD.Cast
import HROOT.Core.TArrayD.Interface
import HROOT.Hist.TAxis.RawType
import HROOT.Hist.TAxis.Cast
import HROOT.Hist.TAxis.Interface
import HROOT.Core.TClass.RawType
import HROOT.Core.TClass.Cast
import HROOT.Core.TClass.Interface
import HROOT.Hist.TH3.RawType
import HROOT.Hist.TH3.Cast
import HROOT.Hist.TH3.Interface
import HROOT.Core.TArrayI.RawType
import HROOT.Core.TArrayI.Cast
import HROOT.Core.TArrayI.Interface
import HROOT.Hist.TH1.RawType
import HROOT.Hist.TH1.Cast
import HROOT.Hist.TH1.Interface
import HROOT.Core.TAtt3D.RawType
import HROOT.Core.TAtt3D.Cast
import HROOT.Core.TAtt3D.Interface
import HROOT.Core.TObject.RawType
import HROOT.Core.TObject.Cast
import HROOT.Core.TObject.Interface
import HROOT.Core.TAttLine.RawType
import HROOT.Core.TAttLine.Cast
import HROOT.Core.TAttLine.Interface
import HROOT.Core.TAttFill.RawType
import HROOT.Core.TAttFill.Cast
import HROOT.Core.TAttFill.Interface
import HROOT.Core.TAttMarker.RawType
import HROOT.Core.TAttMarker.Cast
import HROOT.Core.TAttMarker.Interface
import HROOT.Core.Deletable.RawType
import HROOT.Core.Deletable.Cast
import HROOT.Core.Deletable.Interface
import HROOT.Core.TArray.RawType
import HROOT.Core.TArray.Cast
import HROOT.Core.TArray.Interface

import Data.Word
import Foreign.C
import Foreign.Ptr 
import Foreign.ForeignPtr

import System.IO.Unsafe


instance ITH3I TH3I where
instance ITH3 TH3I where
  fill3 = xform3 c_th3i_fill3
  fill3w = xform4 c_th3i_fill3w
  fitSlicesZ = xform7 c_th3i_fitslicesz
  getCorrelationFactor3 = xform2 c_th3i_getcorrelationfactor3
  getCovariance3 = xform2 c_th3i_getcovariance3
  rebinX3 = xform2 c_th3i_rebinx3
  rebinY3 = xform2 c_th3i_rebiny3
  rebinZ3 = xform2 c_th3i_rebinz3
  rebin3D = xform4 c_th3i_rebin3d
instance ITArrayI TH3I where
instance ITH1 TH3I where
  add = xform2 c_th3i_add
  addBinContent = xform2 c_th3i_addbincontent
  chi2Test = xform3 c_th3i_chi2test
  computeIntegral = xform0 c_th3i_computeintegral
  directoryAutoAdd = xform1 c_th3i_directoryautoadd
  divide = xform5 c_th3i_divide
  drawCopyTH1 = xform1 c_th3i_drawcopyth1
  drawNormalized = xform2 c_th3i_drawnormalized
  drawPanelTH1 = xform0 c_th3i_drawpanelth1
  bufferEmpty = xform1 c_th3i_bufferempty
  evalF = xform2 c_th3i_evalf
  fFT = xform2 c_th3i_fft
  fill1 = xform1 c_th3i_fill1
  fill1w = xform2 c_th3i_fill1w
  fillN1 = xform4 c_th3i_filln1
  fillRandom = xform2 c_th3i_fillrandom
  findBin = xform3 c_th3i_findbin
  findFixBin = xform3 c_th3i_findfixbin
  findFirstBinAbove = xform2 c_th3i_findfirstbinabove
  findLastBinAbove = xform2 c_th3i_findlastbinabove
  fitPanelTH1 = xform0 c_th3i_fitpanelth1
  getNdivisionA = xform1 c_th3i_getndivisiona
  getAxisColorA = xform1 c_th3i_getaxiscolora
  getLabelColorA = xform1 c_th3i_getlabelcolora
  getLabelFontA = xform1 c_th3i_getlabelfonta
  getLabelOffsetA = xform1 c_th3i_getlabeloffseta
  getLabelSizeA = xform1 c_th3i_getlabelsizea
  getTitleFontA = xform1 c_th3i_gettitlefonta
  getTitleOffsetA = xform1 c_th3i_gettitleoffseta
  getTitleSizeA = xform1 c_th3i_gettitlesizea
  getTickLengthA = xform1 c_th3i_getticklengtha
  getBarOffset = xform0 c_th3i_getbaroffset
  getBarWidth = xform0 c_th3i_getbarwidth
  getContour = xform1 c_th3i_getcontour
  getContourLevel = xform1 c_th3i_getcontourlevel
  getContourLevelPad = xform1 c_th3i_getcontourlevelpad
  getBin = xform3 c_th3i_getbin
  getBinCenter = xform1 c_th3i_getbincenter
  getBinContent1 = xform1 c_th3i_getbincontent1
  getBinContent2 = xform2 c_th3i_getbincontent2
  getBinContent3 = xform3 c_th3i_getbincontent3
  getBinError1 = xform1 c_th3i_getbinerror1
  getBinError2 = xform2 c_th3i_getbinerror2
  getBinError3 = xform3 c_th3i_getbinerror3
  getBinLowEdge = xform1 c_th3i_getbinlowedge
  getBinWidth = xform1 c_th3i_getbinwidth
  getCellContent = xform2 c_th3i_getcellcontent
  getCellError = xform2 c_th3i_getcellerror
  getEntries = xform0 c_th3i_getentries
  getEffectiveEntries = xform0 c_th3i_geteffectiveentries
  getFunction = xform1 c_th3i_getfunction
  getDimension = xform0 c_th3i_getdimension
  getKurtosis = xform1 c_th3i_getkurtosis
  getLowEdge = xform1 c_th3i_getlowedge
  getMaximumTH1 = xform1 c_th3i_getmaximumth1
  getMaximumBin = xform0 c_th3i_getmaximumbin
  getMaximumStored = xform0 c_th3i_getmaximumstored
  getMinimumTH1 = xform1 c_th3i_getminimumth1
  getMinimumBin = xform0 c_th3i_getminimumbin
  getMinimumStored = xform0 c_th3i_getminimumstored
  getMean = xform1 c_th3i_getmean
  getMeanError = xform1 c_th3i_getmeanerror
  getNbinsX = xform0 c_th3i_getnbinsx
  getNbinsY = xform0 c_th3i_getnbinsy
  getNbinsZ = xform0 c_th3i_getnbinsz
  getQuantilesTH1 = xform3 c_th3i_getquantilesth1
  getRandom = xform0 c_th3i_getrandom
  getStats = xform1 c_th3i_getstats
  getSumOfWeights = xform0 c_th3i_getsumofweights
  getSumw2 = xform0 c_th3i_getsumw2
  getSumw2N = xform0 c_th3i_getsumw2n
  getRMS = xform1 c_th3i_getrms
  getRMSError = xform1 c_th3i_getrmserror
  getSkewness = xform1 c_th3i_getskewness
  integral1 = xform3 c_th3i_integral1
  interpolate1 = xform1 c_th3i_interpolate1
  interpolate2 = xform2 c_th3i_interpolate2
  interpolate3 = xform3 c_th3i_interpolate3
  kolmogorovTest = xform2 c_th3i_kolmogorovtest
  labelsDeflate = xform1 c_th3i_labelsdeflate
  labelsInflate = xform1 c_th3i_labelsinflate
  labelsOption = xform2 c_th3i_labelsoption
  multiflyF = xform2 c_th3i_multiflyf
  multiply = xform5 c_th3i_multiply
  putStats = xform1 c_th3i_putstats
  rebin = xform3 c_th3i_rebin
  rebinAxis = xform2 c_th3i_rebinaxis
  rebuild = xform1 c_th3i_rebuild
  recursiveRemove = xform1 c_th3i_recursiveremove
  reset = xform1 c_th3i_reset
  resetStats = xform0 c_th3i_resetstats
  scale = xform2 c_th3i_scale
  setAxisColorA = xform2 c_th3i_setaxiscolora
  setAxisRange = xform3 c_th3i_setaxisrange
  setBarOffset = xform1 c_th3i_setbaroffset
  setBarWidth = xform1 c_th3i_setbarwidth
  setBinContent1 = xform2 c_th3i_setbincontent1
  setBinContent2 = xform3 c_th3i_setbincontent2
  setBinContent3 = xform4 c_th3i_setbincontent3
  setBinError1 = xform2 c_th3i_setbinerror1
  setBinError2 = xform3 c_th3i_setbinerror2
  setBinError3 = xform4 c_th3i_setbinerror3
  setBins1 = xform2 c_th3i_setbins1
  setBins2 = xform4 c_th3i_setbins2
  setBins3 = xform6 c_th3i_setbins3
  setBinsLength = xform1 c_th3i_setbinslength
  setBuffer = xform2 c_th3i_setbuffer
  setCellContent = xform3 c_th3i_setcellcontent
  setContent = xform1 c_th3i_setcontent
  setContour = xform2 c_th3i_setcontour
  setContourLevel = xform2 c_th3i_setcontourlevel
  setDirectory = xform1 c_th3i_setdirectory
  setEntries = xform1 c_th3i_setentries
  setError = xform1 c_th3i_seterror
  setLabelColorA = xform2 c_th3i_setlabelcolora
  setLabelSizeA = xform2 c_th3i_setlabelsizea
  setLabelFontA = xform2 c_th3i_setlabelfonta
  setLabelOffsetA = xform2 c_th3i_setlabeloffseta
  setMaximum = xform1 c_th3i_setmaximum
  setMinimum = xform1 c_th3i_setminimum
  setNormFactor = xform1 c_th3i_setnormfactor
  setStats = xform1 c_th3i_setstats
  setOption = xform1 c_th3i_setoption
  setXTitle = xform1 c_th3i_setxtitle
  setYTitle = xform1 c_th3i_setytitle
  setZTitle = xform1 c_th3i_setztitle
  showBackground = xform2 c_th3i_showbackground
  showPeaks = xform3 c_th3i_showpeaks
  smooth = xform2 c_th3i_smooth
  sumw2 = xform0 c_th3i_sumw2
instance ITAtt3D TH3I where
instance ITObject TH3I where
  draw = xform1 c_th3i_draw
  findObject = xform1 c_th3i_findobject
  getName = xform0 c_th3i_getname
  isA = xform0 c_th3i_isa
  paint = xform1 c_th3i_paint
  printObj = xform1 c_th3i_printobj
  saveAs = xform2 c_th3i_saveas
  write = xform3 c_th3i_write
instance ITAttLine TH3I where
  getLineColor = xform0 c_th3i_getlinecolor
  getLineStyle = xform0 c_th3i_getlinestyle
  getLineWidth = xform0 c_th3i_getlinewidth
  resetAttLine = xform1 c_th3i_resetattline
  setLineAttributes = xform0 c_th3i_setlineattributes
  setLineColor = xform1 c_th3i_setlinecolor
  setLineStyle = xform1 c_th3i_setlinestyle
  setLineWidth = xform1 c_th3i_setlinewidth
instance ITAttFill TH3I where
  setFillColor = xform1 c_th3i_setfillcolor
  setFillStyle = xform1 c_th3i_setfillstyle
instance ITAttMarker TH3I where
  getMarkerColor = xform0 c_th3i_getmarkercolor
  getMarkerStyle = xform0 c_th3i_getmarkerstyle
  getMarkerSize = xform0 c_th3i_getmarkersize
  resetAttMarker = xform1 c_th3i_resetattmarker
  setMarkerAttributes = xform0 c_th3i_setmarkerattributes
  setMarkerColor = xform1 c_th3i_setmarkercolor
  setMarkerStyle = xform1 c_th3i_setmarkerstyle
  setMarkerSize = xform1 c_th3i_setmarkersize
instance IDeletable TH3I where
  delete = xform0 c_th3i_delete
instance ITArray TH3I where

instance ITH3I (Exist TH3I) where

instance ITH3 (Exist TH3I) where
  fill3 (ETH3I x) = fill3 x
  fill3w (ETH3I x) = fill3w x
  fitSlicesZ (ETH3I x) = fitSlicesZ x
  getCorrelationFactor3 (ETH3I x) = getCorrelationFactor3 x
  getCovariance3 (ETH3I x) = getCovariance3 x
  rebinX3 (ETH3I x) = rebinX3 x
  rebinY3 (ETH3I x) = rebinY3 x
  rebinZ3 (ETH3I x) = rebinZ3 x
  rebin3D (ETH3I x) = rebin3D x
instance ITArrayI (Exist TH3I) where

instance ITH1 (Exist TH3I) where
  add (ETH3I x) = add x
  addBinContent (ETH3I x) = addBinContent x
  chi2Test (ETH3I x) = chi2Test x
  computeIntegral (ETH3I x) = computeIntegral x
  directoryAutoAdd (ETH3I x) = directoryAutoAdd x
  divide (ETH3I x) = divide x
  drawCopyTH1 (ETH3I x) a1 = return . ETH3I =<< drawCopyTH1 x a1
  drawNormalized (ETH3I x) = drawNormalized x
  drawPanelTH1 (ETH3I x) = drawPanelTH1 x
  bufferEmpty (ETH3I x) = bufferEmpty x
  evalF (ETH3I x) = evalF x
  fFT (ETH3I x) = fFT x
  fill1 (ETH3I x) = fill1 x
  fill1w (ETH3I x) = fill1w x
  fillN1 (ETH3I x) = fillN1 x
  fillRandom (ETH3I x) = fillRandom x
  findBin (ETH3I x) = findBin x
  findFixBin (ETH3I x) = findFixBin x
  findFirstBinAbove (ETH3I x) = findFirstBinAbove x
  findLastBinAbove (ETH3I x) = findLastBinAbove x
  fitPanelTH1 (ETH3I x) = fitPanelTH1 x
  getNdivisionA (ETH3I x) = getNdivisionA x
  getAxisColorA (ETH3I x) = getAxisColorA x
  getLabelColorA (ETH3I x) = getLabelColorA x
  getLabelFontA (ETH3I x) = getLabelFontA x
  getLabelOffsetA (ETH3I x) = getLabelOffsetA x
  getLabelSizeA (ETH3I x) = getLabelSizeA x
  getTitleFontA (ETH3I x) = getTitleFontA x
  getTitleOffsetA (ETH3I x) = getTitleOffsetA x
  getTitleSizeA (ETH3I x) = getTitleSizeA x
  getTickLengthA (ETH3I x) = getTickLengthA x
  getBarOffset (ETH3I x) = getBarOffset x
  getBarWidth (ETH3I x) = getBarWidth x
  getContour (ETH3I x) = getContour x
  getContourLevel (ETH3I x) = getContourLevel x
  getContourLevelPad (ETH3I x) = getContourLevelPad x
  getBin (ETH3I x) = getBin x
  getBinCenter (ETH3I x) = getBinCenter x
  getBinContent1 (ETH3I x) = getBinContent1 x
  getBinContent2 (ETH3I x) = getBinContent2 x
  getBinContent3 (ETH3I x) = getBinContent3 x
  getBinError1 (ETH3I x) = getBinError1 x
  getBinError2 (ETH3I x) = getBinError2 x
  getBinError3 (ETH3I x) = getBinError3 x
  getBinLowEdge (ETH3I x) = getBinLowEdge x
  getBinWidth (ETH3I x) = getBinWidth x
  getCellContent (ETH3I x) = getCellContent x
  getCellError (ETH3I x) = getCellError x
  getEntries (ETH3I x) = getEntries x
  getEffectiveEntries (ETH3I x) = getEffectiveEntries x
  getFunction (ETH3I x) = getFunction x
  getDimension (ETH3I x) = getDimension x
  getKurtosis (ETH3I x) = getKurtosis x
  getLowEdge (ETH3I x) = getLowEdge x
  getMaximumTH1 (ETH3I x) = getMaximumTH1 x
  getMaximumBin (ETH3I x) = getMaximumBin x
  getMaximumStored (ETH3I x) = getMaximumStored x
  getMinimumTH1 (ETH3I x) = getMinimumTH1 x
  getMinimumBin (ETH3I x) = getMinimumBin x
  getMinimumStored (ETH3I x) = getMinimumStored x
  getMean (ETH3I x) = getMean x
  getMeanError (ETH3I x) = getMeanError x
  getNbinsX (ETH3I x) = getNbinsX x
  getNbinsY (ETH3I x) = getNbinsY x
  getNbinsZ (ETH3I x) = getNbinsZ x
  getQuantilesTH1 (ETH3I x) = getQuantilesTH1 x
  getRandom (ETH3I x) = getRandom x
  getStats (ETH3I x) = getStats x
  getSumOfWeights (ETH3I x) = getSumOfWeights x
  getSumw2 (ETH3I x) = getSumw2 x
  getSumw2N (ETH3I x) = getSumw2N x
  getRMS (ETH3I x) = getRMS x
  getRMSError (ETH3I x) = getRMSError x
  getSkewness (ETH3I x) = getSkewness x
  integral1 (ETH3I x) = integral1 x
  interpolate1 (ETH3I x) = interpolate1 x
  interpolate2 (ETH3I x) = interpolate2 x
  interpolate3 (ETH3I x) = interpolate3 x
  kolmogorovTest (ETH3I x) = kolmogorovTest x
  labelsDeflate (ETH3I x) = labelsDeflate x
  labelsInflate (ETH3I x) = labelsInflate x
  labelsOption (ETH3I x) = labelsOption x
  multiflyF (ETH3I x) = multiflyF x
  multiply (ETH3I x) = multiply x
  putStats (ETH3I x) = putStats x
  rebin (ETH3I x) = rebin x
  rebinAxis (ETH3I x) = rebinAxis x
  rebuild (ETH3I x) = rebuild x
  recursiveRemove (ETH3I x) = recursiveRemove x
  reset (ETH3I x) = reset x
  resetStats (ETH3I x) = resetStats x
  scale (ETH3I x) = scale x
  setAxisColorA (ETH3I x) = setAxisColorA x
  setAxisRange (ETH3I x) = setAxisRange x
  setBarOffset (ETH3I x) = setBarOffset x
  setBarWidth (ETH3I x) = setBarWidth x
  setBinContent1 (ETH3I x) = setBinContent1 x
  setBinContent2 (ETH3I x) = setBinContent2 x
  setBinContent3 (ETH3I x) = setBinContent3 x
  setBinError1 (ETH3I x) = setBinError1 x
  setBinError2 (ETH3I x) = setBinError2 x
  setBinError3 (ETH3I x) = setBinError3 x
  setBins1 (ETH3I x) = setBins1 x
  setBins2 (ETH3I x) = setBins2 x
  setBins3 (ETH3I x) = setBins3 x
  setBinsLength (ETH3I x) = setBinsLength x
  setBuffer (ETH3I x) = setBuffer x
  setCellContent (ETH3I x) = setCellContent x
  setContent (ETH3I x) = setContent x
  setContour (ETH3I x) = setContour x
  setContourLevel (ETH3I x) = setContourLevel x
  setDirectory (ETH3I x) = setDirectory x
  setEntries (ETH3I x) = setEntries x
  setError (ETH3I x) = setError x
  setLabelColorA (ETH3I x) = setLabelColorA x
  setLabelSizeA (ETH3I x) = setLabelSizeA x
  setLabelFontA (ETH3I x) = setLabelFontA x
  setLabelOffsetA (ETH3I x) = setLabelOffsetA x
  setMaximum (ETH3I x) = setMaximum x
  setMinimum (ETH3I x) = setMinimum x
  setNormFactor (ETH3I x) = setNormFactor x
  setStats (ETH3I x) = setStats x
  setOption (ETH3I x) = setOption x
  setXTitle (ETH3I x) = setXTitle x
  setYTitle (ETH3I x) = setYTitle x
  setZTitle (ETH3I x) = setZTitle x
  showBackground (ETH3I x) = showBackground x
  showPeaks (ETH3I x) = showPeaks x
  smooth (ETH3I x) = smooth x
  sumw2 (ETH3I x) = sumw2 x
instance ITAtt3D (Exist TH3I) where

instance ITObject (Exist TH3I) where
  draw (ETH3I x) = draw x
  findObject (ETH3I x) = findObject x
  getName (ETH3I x) = getName x
  isA (ETH3I x) = isA x
  paint (ETH3I x) = paint x
  printObj (ETH3I x) = printObj x
  saveAs (ETH3I x) = saveAs x
  write (ETH3I x) = write x
instance ITAttLine (Exist TH3I) where
  getLineColor (ETH3I x) = getLineColor x
  getLineStyle (ETH3I x) = getLineStyle x
  getLineWidth (ETH3I x) = getLineWidth x
  resetAttLine (ETH3I x) = resetAttLine x
  setLineAttributes (ETH3I x) = setLineAttributes x
  setLineColor (ETH3I x) = setLineColor x
  setLineStyle (ETH3I x) = setLineStyle x
  setLineWidth (ETH3I x) = setLineWidth x
instance ITAttFill (Exist TH3I) where
  setFillColor (ETH3I x) = setFillColor x
  setFillStyle (ETH3I x) = setFillStyle x
instance ITAttMarker (Exist TH3I) where
  getMarkerColor (ETH3I x) = getMarkerColor x
  getMarkerStyle (ETH3I x) = getMarkerStyle x
  getMarkerSize (ETH3I x) = getMarkerSize x
  resetAttMarker (ETH3I x) = resetAttMarker x
  setMarkerAttributes (ETH3I x) = setMarkerAttributes x
  setMarkerColor (ETH3I x) = setMarkerColor x
  setMarkerStyle (ETH3I x) = setMarkerStyle x
  setMarkerSize (ETH3I x) = setMarkerSize x
instance IDeletable (Exist TH3I) where
  delete (ETH3I x) = delete x
instance ITArray (Exist TH3I) where








instance FPtr (Exist TH3I) where
  type Raw (Exist TH3I) = RawTH3I
  get_fptr (ETH3I obj) = castForeignPtr (get_fptr obj)
  cast_fptr_to_obj fptr = ETH3I (cast_fptr_to_obj (fptr :: ForeignPtr RawTH3I) :: TH3I)