ROOT logo
// @(#)root/hist:$Id$
// Author: Rene Brun   16/04/2000

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TProfile2D.h"
#include "TMath.h"
#include "THLimitsFinder.h"
#include "Riostream.h"
#include "TVirtualPad.h"
#include "TError.h"
#include "TClass.h"

#include "TProfileHelper.h"

Bool_t TProfile2D::fgApproximate = kFALSE;

ClassImp(TProfile2D)

//______________________________________________________________________________
//
//  Profile2D histograms are used to display the mean
//  value of Z and its RMS for each cell in X,Y.
//  Profile2D histograms are in many cases an
//  elegant replacement of three-dimensional histograms : the inter-relation of three
//  measured quantities X, Y and Z can always be visualized by a three-dimensional
//  histogram or scatter-plot; its representation on the line-printer is not particularly
//  satisfactory, except for sparse data. If Z is an unknown (but single-valued)
//  approximate function of X,Y this function is displayed by a profile2D histogram with
//  much better precision than by a scatter-plot.
//
//  The following formulae show the cumulated contents (capital letters) and the values
//  displayed by the printing or plotting routines (small letters) of the elements for cell I, J.
//
//                                                        2
//      H(I,J)  =  sum Z                  E(I,J)  =  sum Z
//      l(I,J)  =  sum l                  L(I,J)  =  sum l
//      h(I,J)  =  H(I,J)/L(I,J)          s(I,J)  =  sqrt(E(I,J)/L(I,J)- h(I,J)**2)
//      e(I,J)  =  s(I,J)/sqrt(L(I,J))
//
//  In the special case where s(I,J) is zero (eg, case of 1 entry only in one cell)
//  the bin error e(I,J) is computed from the average of the s(I,J) for all cells
//  if the static function TProfile2D::Approximate has been called.
//  This simple/crude approximation was suggested in order to keep the cell
//  during a fit operation. But note that this approximation is not the default behaviour.
//
//           Example of a profile2D histogram
//{
//  TCanvas *c1 = new TCanvas("c1","Profile histogram example",200,10,700,500);
//  hprof2d  = new TProfile2D("hprof2d","Profile of pz versus px and py",40,-4,4,40,-4,4,0,20);
//  Float_t px, py, pz;
//  for ( Int_t i=0; i<25000; i++) {
//     gRandom->Rannor(px,py);
//     pz = px*px + py*py;
//     hprof2d->Fill(px,py,pz,1);
//  }
//  hprof2d->Draw();
//}
//

//______________________________________________________________________________
TProfile2D::TProfile2D() : TH2D()
{
   //*-*-*-*-*-*Default constructor for Profile2D histograms*-*-*-*-*-*-*-*-*
   //*-*        ============================================
   fTsumwz = fTsumwz2 = 0;
   fScaling = kFALSE;
   BuildOptions(0,0,"");
}

//______________________________________________________________________________
TProfile2D::~TProfile2D()
{
   //*-*-*-*-*-*Default destructor for Profile2D histograms*-*-*-*-*-*-*-*-*
   //*-*        ===========================================

}

//______________________________________________________________________________
TProfile2D::TProfile2D(const char *name,const char *title,Int_t nx,Double_t xlow,Double_t xup,Int_t ny,Double_t ylow,Double_t yup,Option_t *option)
: TH2D(name,title,nx,xlow,xup,ny,ylow,yup)
{
   //*-*-*-*-*-*Normal Constructor for Profile histograms*-*-*-*-*-*-*-*-*-*
   //*-*        ==========================================
   //
   //  The first eight parameters are similar to TH2D::TH2D.
   //  All values of z are accepted at filling time.
   //  To fill a profile2D histogram, one must use TProfile2D::Fill function.
   //
   //  Note that when filling the profile histogram the function Fill
   //  checks if the variable z is betyween fZmin and fZmax.
   //  If a minimum or maximum value is set for the Z scale before filling,
   //  then all values below zmin or above zmax will be discarded.
   //  Setting the minimum or maximum value for the Z scale before filling
   //  has the same effect as calling the special TProfile2D constructor below
   //  where zmin and zmax are specified.
   //
   //  H(I,J) is printed as the cell contents. The errors computed are s(I,J) if CHOPT='S'
   //  (spread option), or e(I,J) if CHOPT=' ' (error on mean).
   //
   //        See TProfile2D::BuildOptions for explanation of parameters
   //
   //   see other constructors below with all possible combinations of
   //   fix and variable bin size like in TH2D.

   BuildOptions(0,0,option);
   if (xlow >= xup || ylow >= yup) SetBuffer(fgBufferSize);
}

//______________________________________________________________________________
TProfile2D::TProfile2D(const char *name,const char *title,Int_t nx,const Double_t *xbins,Int_t ny,Double_t ylow,Double_t yup,Option_t *option)
: TH2D(name,title,nx,xbins,ny,ylow,yup)
{
   //  Create a 2-D Profile with variable bins in X and fix bins in Y

   BuildOptions(0,0,option);
}

//______________________________________________________________________________
TProfile2D::TProfile2D(const char *name,const char *title,Int_t nx,Double_t xlow,Double_t xup,Int_t ny,const Double_t *ybins,Option_t *option)
: TH2D(name,title,nx,xlow,xup,ny,ybins)
{
   //  Create a 2-D Profile with fix bins in X and variable bins in Y

   BuildOptions(0,0,option);
}

//______________________________________________________________________________
TProfile2D::TProfile2D(const char *name,const char *title,Int_t nx,const Double_t *xbins,Int_t ny,const Double_t *ybins,Option_t *option)
: TH2D(name,title,nx,xbins,ny,ybins)
{
   //  Create a 2-D Profile with variable bins in X and variable bins in Y

   BuildOptions(0,0,option);
}


//______________________________________________________________________________
TProfile2D::TProfile2D(const char *name,const char *title,Int_t nx,Double_t xlow,Double_t xup,Int_t ny, Double_t ylow,Double_t yup,Double_t zlow,Double_t zup,Option_t *option)
: TH2D(name,title,nx,xlow,xup,ny,ylow,yup)
{
   //*-*-*-*-*-*Constructor for Profile2D histograms with range in z*-*-*-*-*-*
   //*-*        ====================================================
   //  The first eight parameters are similar to TH2D::TH2D.
   //  Only the values of Z between ZMIN and ZMAX will be considered at filling time.
   //  zmin and zmax will also be the maximum and minimum values
   //  on the z scale when drawing the profile2D.
   //
   //        See TProfile2D::BuildOptions for more explanations on errors
   //

   BuildOptions(zlow,zup,option);
   if (xlow >= xup || ylow >= yup) SetBuffer(fgBufferSize);
}


//______________________________________________________________________________
void TProfile2D::BuildOptions(Double_t zmin, Double_t zmax, Option_t *option)
{
   //*-*-*-*-*-*-*Set Profile2D histogram structure and options*-*-*-*-*-*-*-*-*
   //*-*          =============================================
   //
   //    zmin:  minimum value allowed for z
   //    zmax:  maximum value allowed for z
   //            if (zmin = zmax = 0) there are no limits on the allowed z values (zmin = -inf, zmax = +inf)
   //
   //    option:  this is the option for the computation of the t error of the profile ( TProfile2D::GetBinError )
   //             possible values for the options are documented in TProfile2D::SetErrorOption

   //   See TProfile::BuildOptions  for a detailed  deescription
   //
   //

   SetErrorOption(option);

   // create extra profile data structire (bin entries/ y^2 and sum of weight square)
   TProfileHelper::BuildArray(this);

   fZmin = zmin;
   fZmax = zmax;
   fScaling = kFALSE;
   fTsumwz  = fTsumwz2 = 0;
}

//______________________________________________________________________________
TProfile2D::TProfile2D(const TProfile2D &profile) : TH2D()
{
   // Copy constructor.

   ((TProfile2D&)profile).Copy(*this);
}


//______________________________________________________________________________
Bool_t TProfile2D::Add(TF1 *, Double_t , Option_t*)
{
   // Performs the operation: this = this + c1*f1

   Error("Add","Function not implemented for TProfile2D");
   return kFALSE;
}


//______________________________________________________________________________
Bool_t TProfile2D::Add(const TH1 *h1, Double_t c1)
{
   // Performs the operation: this = this + c1*h1

   if (!h1) {
      Error("Add","Attempt to add a non-existing profile");
      return  kFALSE;
   }
   if (!h1->InheritsFrom(TProfile2D::Class())) {
      Error("Add","Attempt to add a non-profile2D object");
      return  kFALSE;
   }

   return TProfileHelper::Add(this, this, h1, 1, c1);
}

//______________________________________________________________________________
Bool_t TProfile2D::Add(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2)
{
   //*-*-*-*-*Replace contents of this profile2D by the addition of h1 and h2*-*-*
   //*-*      ===============================================================
   //
   //   this = c1*h1 + c2*h2
   //

   if (!h1 || !h2) {
      Error("Add","Attempt to add a non-existing profile");
      return kFALSE;
   }
   if (!h1->InheritsFrom(TProfile2D::Class())) {
      Error("Add","Attempt to add a non-profile2D object");
      return kFALSE;
   }
   if (!h2->InheritsFrom(TProfile2D::Class())) {
      Error("Add","Attempt to add a non-profile2D object");
      return kFALSE;
   }
   return TProfileHelper::Add(this, h1, h2, c1, c2);
}


//______________________________________________________________________________
void TProfile2D::Approximate(Bool_t approx)
{
   //     static function
   // set the fgApproximate flag. When the flag is true, the function GetBinError
   // will approximate the bin error with the average profile error on all bins
   // in the following situation only
   //  - the number of bins in the profile2D is less than 10404 (eg 100x100)
   //  - the bin number of entries is small ( <5)
   //  - the estimated bin error is extremely small compared to the bin content
   //  (see TProfile2D::GetBinError)

   fgApproximate = approx;
}


//______________________________________________________________________________
Int_t TProfile2D::BufferEmpty(Int_t action)
{
   // Fill histogram with all entries in the buffer.
   // action = -1 histogram is reset and refilled from the buffer (called by THistPainter::Paint)
   // action =  0 histogram is filled from the buffer
   // action =  1 histogram is filled and buffer is deleted
   //             The buffer is automatically deleted when the number of entries
   //             in the buffer is greater than the number of entries in the histogram

   // do we need to compute the bin size?
   if (!fBuffer) return 0;
   Int_t nbentries = (Int_t)fBuffer[0];
   if (!nbentries) return 0;
   Double_t *buffer = fBuffer;
   if (nbentries < 0) {
      if (action == 0) return 0;
      nbentries  = -nbentries;
      fBuffer=0;
      Reset("ICES"); // reset without deleting the functions
      fBuffer = buffer;
   }
   if (TestBit(kCanRebin) || fXaxis.GetXmax() <= fXaxis.GetXmin() || fYaxis.GetXmax() <= fYaxis.GetXmin()) {
      //find min, max of entries in buffer
      Double_t xmin = fBuffer[2];
      Double_t xmax = xmin;
      Double_t ymin = fBuffer[3];
      Double_t ymax = ymin;
      for (Int_t i=1;i<nbentries;i++) {
         Double_t x = fBuffer[4*i+2];
         if (x < xmin) xmin = x;
         if (x > xmax) xmax = x;
         Double_t y = fBuffer[4*i+3];
         if (y < ymin) ymin = y;
         if (y > ymax) ymax = y;
      }
      if (fXaxis.GetXmax() <= fXaxis.GetXmin() || fYaxis.GetXmax() <= fYaxis.GetXmin()) {
         THLimitsFinder::GetLimitsFinder()->FindGoodLimits(this,xmin,xmax,ymin,ymax);
      } else {
         fBuffer = 0;
         Int_t keep = fBufferSize; fBufferSize = 0;
         if (xmin <  fXaxis.GetXmin()) RebinAxis(xmin,&fXaxis);
         if (xmax >= fXaxis.GetXmax()) RebinAxis(xmax,&fXaxis);
         if (ymin <  fYaxis.GetXmin()) RebinAxis(ymin,&fYaxis);
         if (ymax >= fYaxis.GetXmax()) RebinAxis(ymax,&fYaxis);
         fBuffer = buffer;
         fBufferSize = keep;
      }
   }

   fBuffer = 0;
   for (Int_t i=0;i<nbentries;i++) {
      Fill(buffer[4*i+2],buffer[4*i+3],buffer[4*i+4],buffer[4*i+1]);
   }
   fBuffer = buffer;

   if (action > 0) { delete [] fBuffer; fBuffer = 0; fBufferSize = 0;}
   else {
      if (nbentries == (Int_t)fEntries) fBuffer[0] = -nbentries;
      else                              fBuffer[0] = 0;
   }
   return nbentries;
}

//______________________________________________________________________________
Int_t TProfile2D::BufferFill(Double_t x, Double_t y, Double_t z, Double_t w)
{
   // accumulate arguments in buffer. When buffer is full, empty the buffer
   // fBuffer[0] = number of entries in buffer
   // fBuffer[1] = w of first entry
   // fBuffer[2] = x of first entry
   // fBuffer[3] = y of first entry
   // fBuffer[4] = z of first entry

   if (!fBuffer) return -3;
   Int_t nbentries = (Int_t)fBuffer[0];
   if (nbentries < 0) {
      nbentries  = -nbentries;
      fBuffer[0] =  nbentries;
      if (fEntries > 0) {
         Double_t *buffer = fBuffer; fBuffer=0;
         Reset("ICES"); // reset without deleting the functions
         fBuffer = buffer;
      }
   }
   if (4*nbentries+4 >= fBufferSize) {
      BufferEmpty(1);
      return Fill(x,y,z,w);
   }
   fBuffer[4*nbentries+1] = w;
   fBuffer[4*nbentries+2] = x;
   fBuffer[4*nbentries+3] = y;
   fBuffer[4*nbentries+4] = z;
   fBuffer[0] += 1;
   return -2;
}

//______________________________________________________________________________
void TProfile2D::Copy(TObject &obj) const
{
   //*-*-*-*-*-*-*-*Copy a Profile2D histogram to a new profile2D histogram*-*-*-*
   //*-*            =======================================================

   try {
      TProfile2D & pobj = dynamic_cast<TProfile2D&>(obj);

      TH2D::Copy(pobj);
      fBinEntries.Copy(pobj.fBinEntries);
      fBinSumw2.Copy(pobj.fBinSumw2);
      for (int bin=0;bin<fNcells;bin++) {
         pobj.fArray[bin]        = fArray[bin];
         pobj.fSumw2.fArray[bin] = fSumw2.fArray[bin];
      }
      pobj.fZmin = fZmin;
      pobj.fZmax = fZmax;
      pobj.fScaling   = fScaling;
      pobj.fErrorMode = fErrorMode;
      pobj.fTsumwz    = fTsumwz;
      pobj.fTsumwz2   = fTsumwz2;

   } catch(...) {
      Fatal("Copy","Cannot copy a TProfile2D in a %s",obj.IsA()->GetName());
   }

}


//______________________________________________________________________________
Bool_t TProfile2D::Divide(TF1 *, Double_t )
{
   // Performs the operation: this = this/(c1*f1)
   // This function is not implemented

   Error("Divide","Function not implemented for TProfile2D");
   return kFALSE;
}

//______________________________________________________________________________
Bool_t TProfile2D::Divide(const TH1 *h1)
{
   //*-*-*-*-*-*-*-*-*-*-*Divide this profile2D by h1*-*-*-*-*-*-*-*-*-*-*-*-*
   //*-*                  ===========================
   //
   //   this = this/h1
   //
   //   This function return kFALSE if the divide operation failed


   if (!h1) {
      Error("Divide","Attempt to divide a non-existing profile2D");
      return kFALSE;
   }
   if (!h1->InheritsFrom(TProfile2D::Class())) {
      Error("Divide","Attempt to divide a non-profile2D object");
      return kFALSE;
   }
   TProfile2D *p1 = (TProfile2D*)h1;

   // delete buffer if it is there since it will become invalid
   if (fBuffer) BufferEmpty(1);

   //*-*- Check profile compatibility
   Int_t nx = GetNbinsX();
   if (nx != p1->GetNbinsX()) {
      Error("Divide","Attempt to divide profiles with different number of bins");
      return kFALSE;
   }
   Int_t ny = GetNbinsY();
   if (ny != p1->GetNbinsY()) {
      Error("Divide","Attempt to divide profiles with different number of bins");
      return kFALSE;
   }

   //*-*- Reset statistics
   fEntries = fTsumw   = fTsumw2 = fTsumwx = fTsumwx2 = 0;

   //*-*- Loop on bins (including underflows/overflows)
   Int_t bin,binx,biny;
   Double_t *cu1 = p1->GetW();
   Double_t *er1 = p1->GetW2();
   Double_t *en1 = p1->GetB();
   Double_t c0,c1,w,z,x,y;
   for (binx =0;binx<=nx+1;binx++) {
      for (biny =0;biny<=ny+1;biny++) {
         bin   = biny*(fXaxis.GetNbins()+2) + binx;
         c0  = fArray[bin];
         c1  = cu1[bin];
         if (c1) w = c0/c1;
         else    w = 0;
         fArray[bin] = w;
         z = TMath::Abs(w);
         x = fXaxis.GetBinCenter(binx);
         y = fYaxis.GetBinCenter(biny);
         fEntries++;
         fTsumw   += z;
         fTsumw2  += z*z;
         fTsumwx  += z*x;
         fTsumwx2 += z*x*x;
         fTsumwy  += z*y;
         fTsumwy2 += z*y*y;
         fTsumwxy += z*x*y;
         fTsumwz  += z;
         fTsumwz2 += z*z;
         Double_t e0 = fSumw2.fArray[bin];
         Double_t e1 = er1[bin];
         Double_t c12= c1*c1;
         if (!c1) fSumw2.fArray[bin] = 0;
         else     fSumw2.fArray[bin] = (e0*c1*c1 + e1*c0*c0)/(c12*c12);
         if (!en1[bin]) fBinEntries.fArray[bin] = 0;
         else           fBinEntries.fArray[bin] /= en1[bin];
      }
   }
   // mantaining the correct sum of weights square is not supported when dividing
   // bin error resulting from division of profile needs to be checked
   if (fBinSumw2.fN) {
      Warning("Divide","Cannot preserve during the division of profiles the sum of bin weight square");
      fBinSumw2 = TArrayD();
   }
   return kTRUE;
}


//______________________________________________________________________________
Bool_t TProfile2D::Divide(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2, Option_t *option)
{
   //*-*-*-*-*Replace contents of this profile2D by the division of h1 by h2*-*-*
   //*-*      ==============================================================
   //
   //   this = c1*h1/(c2*h2)
   //
   //   This function return kFALSE if the divide operation failed

   TString opt = option;
   opt.ToLower();
   Bool_t binomial = kFALSE;
   if (opt.Contains("b")) binomial = kTRUE;
   if (!h1 || !h2) {
      Error("Divide","Attempt to divide a non-existing profile2D");
      return kFALSE;
   }
   if (!h1->InheritsFrom(TProfile2D::Class())) {
      Error("Divide","Attempt to divide a non-profile2D object");
      return kFALSE;
   }
   TProfile2D *p1 = (TProfile2D*)h1;
   if (!h2->InheritsFrom(TProfile2D::Class())) {
      Error("Divide","Attempt to divide a non-profile2D object");
      return kFALSE;
   }
   TProfile2D *p2 = (TProfile2D*)h2;

   // delete buffer if it is there since it will become invalid
   if (fBuffer) BufferEmpty(1);

   //*-*- Check histogram compatibility
   Int_t nx = GetNbinsX();
   if (nx != p1->GetNbinsX() || nx != p2->GetNbinsX()) {
      Error("Divide","Attempt to divide profiles with different number of bins");
      return kFALSE;
   }
   Int_t ny = GetNbinsY();
   if (ny != p1->GetNbinsY() || ny != p2->GetNbinsY()) {
      Error("Divide","Attempt to divide profiles with different number of bins");
      return kFALSE;
   }
   if (!c2) {
      Error("Divide","Coefficient of dividing profile cannot be zero");
      return kFALSE;
   }

   //*-*- Reset statistics
   fEntries = fTsumw   = fTsumw2 = fTsumwx = fTsumwx2 = 0;

   //*-*- Loop on bins (including underflows/overflows)
   Int_t bin,binx,biny;
   Double_t *cu1 = p1->GetW();
   Double_t *cu2 = p2->GetW();
   Double_t *er1 = p1->GetW2();
   Double_t *er2 = p2->GetW2();
   Double_t *en1 = p1->GetB();
   Double_t *en2 = p2->GetB();
   Double_t b1,b2,w,z,x,y,ac1,ac2;
   ac1 = TMath::Abs(c1);
   ac2 = TMath::Abs(c2);
   for (binx =0;binx<=nx+1;binx++) {
      for (biny =0;biny<=ny+1;biny++) {
         bin   = biny*(fXaxis.GetNbins()+2) + binx;
         b1  = cu1[bin];
         b2  = cu2[bin];
         if (b2) w = c1*b1/(c2*b2);
         else    w = 0;
         fArray[bin] = w;
         z = TMath::Abs(w);
         x = fXaxis.GetBinCenter(binx);
         y = fYaxis.GetBinCenter(biny);
         fEntries++;
         fTsumw   += z;
         fTsumw2  += z*z;
         fTsumwx  += z*x;
         fTsumwx2 += z*x*x;
         fTsumwy  += z*y;
         fTsumwy2 += z*y*y;
         fTsumwxy += z*x*y;
         fTsumwz  += z;
         fTsumwz2 += z*z;
         Double_t e1 = er1[bin];
         Double_t e2 = er2[bin];
         //Double_t b22= b2*b2*d2;
         Double_t b22= b2*b2*TMath::Abs(c2);
         if (!b2) fSumw2.fArray[bin] = 0;
         else {
            if (binomial) {
               fSumw2.fArray[bin] = TMath::Abs(w*(1-w)/(c2*b2));
            } else {
               fSumw2.fArray[bin] = ac1*ac2*(e1*b2*b2 + e2*b1*b1)/(b22*b22);
            }
         }
         if (!en2[bin]) fBinEntries.fArray[bin] = 0;
         else           fBinEntries.fArray[bin] = en1[bin]/en2[bin];
      }
   }
   return kTRUE;
}

//______________________________________________________________________________
TH1 *TProfile2D::DrawCopy(Option_t *option) const
{
   //*-*-*-*-*-*-*-*Draw a copy of this profile2D histogram*-*-*-*-*-*-*-*-*-*-*
   //*-*            =======================================
   TString opt = option;
   opt.ToLower();
   if (gPad && !opt.Contains("same")) gPad->Clear();
   TProfile2D *newpf = (TProfile2D*)Clone();
   newpf->SetDirectory(0);
   newpf->SetBit(kCanDelete);
   newpf->AppendPad(option);
   return newpf;
}

//______________________________________________________________________________
Int_t TProfile2D::Fill(Double_t x, Double_t y, Double_t z)
{
   //*-*-*-*-*-*-*-*-*-*-*Fill a Profile2D histogram (no weights)*-*-*-*-*-*-*-*
   //*-*                  =======================================

   if (fBuffer) return BufferFill(x,y,z,1);

   Int_t bin,binx,biny;

   if (fZmin != fZmax) {
      if (z <fZmin || z> fZmax || TMath::IsNaN(z) ) return -1;
   }

   fEntries++;
   binx =fXaxis.FindBin(x);
   biny =fYaxis.FindBin(y);
   if (binx <0 || biny <0) return -1;
   bin = GetBin(binx, biny);
   fArray[bin] += z;
   fSumw2.fArray[bin] += z*z;
   fBinEntries.fArray[bin] += 1;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += 1;
   if (binx == 0 || binx > fXaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   if (biny == 0 || biny > fYaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   ++fTsumw;
   ++fTsumw2;
   fTsumwx  += x;
   fTsumwx2 += x*x;
   fTsumwy  += y;
   fTsumwy2 += y*y;
   fTsumwxy += x*y;
   fTsumwz  += z;
   fTsumwz2 += z*z;
   return bin;
}

//______________________________________________________________________________
Int_t TProfile2D::Fill(Double_t x, const char *namey, Double_t z)
{
   // Fill a Profile2D histogram (no weights)
   //
   Int_t bin,binx,biny;

   if (fZmin != fZmax) {
      if (z <fZmin || z> fZmax || TMath::IsNaN(z)) return -1;
   }

   fEntries++;
   binx =fXaxis.FindBin(x);
   biny =fYaxis.FindBin(namey);
   if (binx <0 || biny <0) return -1;
   bin  = biny*(fXaxis.GetNbins()+2) + binx;
   AddBinContent(bin, z);
   fSumw2.fArray[bin] += (Double_t)z*z;
   fBinEntries.fArray[bin] += 1;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += 1;
   if (binx == 0 || binx > fXaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   if (biny == 0 || biny > fYaxis.GetNbins()) return -1;
   Double_t y = fYaxis.GetBinCenter(biny);
   ++fTsumw;
   ++fTsumw2;
   fTsumwx  += x;
   fTsumwx2 += x*x;
   fTsumwy  += y;
   fTsumwy2 += y*y;
   fTsumwxy += x*y;
   fTsumwz  += z;
   fTsumwz2 += z*z;
   return bin;
}

//______________________________________________________________________________
Int_t TProfile2D::Fill(const char *namex, const char *namey, Double_t z)
{
   // Fill a Profile2D histogram (no weights)
   //
   Int_t bin,binx,biny;

   if (fZmin != fZmax) {
      if (z <fZmin || z> fZmax || TMath::IsNaN(z) ) return -1;
   }

   fEntries++;
   binx =fXaxis.FindBin(namex);
   biny =fYaxis.FindBin(namey);
   if (binx <0 || biny <0) return -1;
   bin  = biny*(fXaxis.GetNbins()+2) + binx;
   AddBinContent(bin, z);
   fSumw2.fArray[bin] += (Double_t)z*z;
   fBinEntries.fArray[bin] += 1;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += 1;
   if (binx == 0 || binx > fXaxis.GetNbins()) return -1;
   if (biny == 0 || biny > fYaxis.GetNbins()) return -1;
   Double_t x = fYaxis.GetBinCenter(binx);
   Double_t y = fYaxis.GetBinCenter(biny);
   ++fTsumw;
   ++fTsumw2;
   fTsumwx  += x;
   fTsumwx2 += x*x;
   fTsumwy  += y;
   fTsumwy2 += y*y;
   fTsumwxy += x*y;
   fTsumwz  += z;
   fTsumwz2 += z*z;
   return bin;
}

//______________________________________________________________________________
Int_t TProfile2D::Fill(const char *namex, Double_t y, Double_t z)
{
   // Fill a Profile2D histogram (no weights)
   //
   Int_t bin,binx,biny;

   if (fZmin != fZmax) {
      if (z <fZmin || z> fZmax || TMath::IsNaN(z)) return -1;
   }

   fEntries++;
   binx =fXaxis.FindBin(namex);
   biny =fYaxis.FindBin(y);
   if (binx <0 || biny <0) return -1;
   bin  = biny*(fXaxis.GetNbins()+2) + binx;
   AddBinContent(bin, z);
   fSumw2.fArray[bin] += (Double_t)z*z;
   fBinEntries.fArray[bin] += 1;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += 1;
   if (binx == 0 || binx > fXaxis.GetNbins()) return -1;
   if (biny == 0 || biny > fYaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   Double_t x = fYaxis.GetBinCenter(binx);
   ++fTsumw;
   ++fTsumw2;
   fTsumwx  += x;
   fTsumwx2 += x*x;
   fTsumwy  += y;
   fTsumwy2 += y*y;
   fTsumwxy += x*y;
   fTsumwz  += z;
   fTsumwz2 += z*z;
   return bin;
}

//______________________________________________________________________________
Int_t TProfile2D::Fill(Double_t x, Double_t y, Double_t z, Double_t w)
{
   //*-*-*-*-*-*-*-*-*-*-*Fill a Profile2D histogram with weights*-*-*-*-*-*-*-*
   //*-*                  =======================================

   if (fBuffer) return BufferFill(x,y,z,w);

   Int_t bin,binx,biny;

   if (fZmin != fZmax) {
      if (z <fZmin || z> fZmax || TMath::IsNaN(z)) return -1;
   }

   Double_t u= w; //(w > 0 ? w : -w);
   fEntries++;
   binx =fXaxis.FindBin(x);
   biny =fYaxis.FindBin(y);
   if (binx <0 || biny <0) return -1;
   bin  = biny*(fXaxis.GetNbins()+2) + binx;
   AddBinContent(bin, u*z);
   fSumw2.fArray[bin] += u*z*z;
   fBinEntries.fArray[bin] += u;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += u*u;
   if (binx == 0 || binx > fXaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   if (biny == 0 || biny > fYaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   fTsumw   += u;
   fTsumw2  += u*u;
   fTsumwx  += u*x;
   fTsumwx2 += u*x*x;
   fTsumwy  += u*y;
   fTsumwy2 += u*y*y;
   fTsumwxy += u*x*y;
   fTsumwz  += u*z;
   fTsumwz2 += u*z*z;
   return bin;
}

//______________________________________________________________________________
Double_t TProfile2D::GetBinContent(Int_t bin) const
{
   //*-*-*-*-*-*-*Return bin content of a Profile2D histogram*-*-*-*-*-*-*-*-*
   //*-*          ===========================================

   if (fBuffer) ((TProfile2D*)this)->BufferEmpty();

   if (bin < 0 || bin >= fNcells) return 0;
   if (fBinEntries.fArray[bin] == 0) return 0;
   if (!fArray) return 0;
   return fArray[bin]/fBinEntries.fArray[bin];
}

//______________________________________________________________________________
Double_t TProfile2D::GetBinEntries(Int_t bin) const
{
   //*-*-*-*-*-*-*Return bin entries of a Profile2D histogram*-*-*-*-*-*-*-*-*
   //*-*          ===========================================

   if (fBuffer) ((TProfile2D*)this)->BufferEmpty();

   if (bin < 0 || bin >= fNcells) return 0;
   return fBinEntries.fArray[bin];
}

//______________________________________________________________________________
Double_t TProfile2D::GetBinEffectiveEntries(Int_t bin)
{
   //            Return bin effective entries for a weighted filled Profile histogram.
   //            In case of an unweighted profile, it is equivalent to the number of entries per bin
   //            The effective entries is defined as the square of the sum of the weights divided by the
   //            sum of the weights square.
   //            TProfile::Sumw2() must be called before filling the profile with weights.
   //            Only by calling this method the  sum of the square of the weights per bin is stored.
   //
   //*-*          =========================================

   return TProfileHelper::GetBinEffectiveEntries(this, bin);
}

//______________________________________________________________________________
Double_t TProfile2D::GetBinError(Int_t bin) const
{
   // *-*-*-*-*-*-*Return bin error of a Profile2D histogram*-*-*-*-*-*-*-*-*
   //
   // Computing errors: A moving field
   // =================================
   // The computation of errors for a TProfile2D has evolved with the versions
   // of ROOT. The difficulty is in computing errors for bins with low statistics.
   // - prior to version 3.10, we had no special treatment of low statistic bins.
   //   As a result, these bins had huge errors. The reason is that the
   //   expression eprim2 is very close to 0 (rounding problems) or 0.
   // - The algorithm is modified/protected for the case
   //   when a TProfile2D is projected (ProjectionX). The previous algorithm
   //   generated a N^2 problem when projecting a TProfile2D with a large number of
   //   bins (eg 100000).
   // - in version 3.10/02, a new static function TProfile::Approximate
   //   is introduced to enable or disable (default) the approximation.
   //   (see also comments in TProfile::GetBinError)

   return TProfileHelper::GetBinError((TProfile2D*)this, bin);
}

//______________________________________________________________________________
Option_t *TProfile2D::GetErrorOption() const
{
   //*-*-*-*-*-*-*-*-*-*Return option to compute profile2D errors*-*-*-*-*-*-*-*
   //*-*                =========================================

   if (fErrorMode == kERRORSPREAD)  return "s";
   if (fErrorMode == kERRORSPREADI) return "i";
   if (fErrorMode == kERRORSPREADG) return "g";
   return "";
}

//______________________________________________________________________________
void TProfile2D::GetStats(Double_t *stats) const
{
   // fill the array stats from the contents of this profile
   // The array stats must be correctly dimensionned in the calling program.
   // stats[0] = sumw
   // stats[1] = sumw2
   // stats[2] = sumwx
   // stats[3] = sumwx2
   // stats[4] = sumwy
   // stats[5] = sumwy2
   // stats[6] = sumwxy
   // stats[7] = sumwz
   // stats[8] = sumwz2
   //
   // If no axis-subrange is specified (via TAxis::SetRange), the array stats
   // is simply a copy of the statistics quantities computed at filling time.
   // If a sub-range is specified, the function recomputes these quantities
   // from the bin contents in the current axis range.

   if (fBuffer) ((TProfile2D*)this)->BufferEmpty();

   // Loop on bins
   if (fTsumw == 0 || fXaxis.TestBit(TAxis::kAxisRange) || fYaxis.TestBit(TAxis::kAxisRange)) {
      Int_t bin, binx, biny;
      Double_t w, w2;
      Double_t x,y;
      for (bin=0;bin<9;bin++) stats[bin] = 0;
      if (!fBinEntries.fArray) return;
      Int_t firstBinX = fXaxis.GetFirst();
      Int_t lastBinX  = fXaxis.GetLast();
      Int_t firstBinY = fYaxis.GetFirst();
      Int_t lastBinY  = fYaxis.GetLast();
      // include underflow/overflow if TH1::StatOverflows(kTRUE) in case no range is set on the axis
      if (fgStatOverflows) {
         if ( !fXaxis.TestBit(TAxis::kAxisRange) ) {
            if (firstBinX == 1) firstBinX = 0;
            if (lastBinX ==  fXaxis.GetNbins() ) lastBinX += 1;
         }
         if ( !fYaxis.TestBit(TAxis::kAxisRange) ) {
            if (firstBinY == 1) firstBinY = 0;
            if (lastBinY ==  fYaxis.GetNbins() ) lastBinY += 1;
         }
      }
      for (biny = firstBinY; biny <= lastBinY; biny++) {
         y = fYaxis.GetBinCenter(biny);
         for (binx = firstBinX; binx <= lastBinX; binx++) {
            bin = GetBin(binx,biny);
            w         = fBinEntries.fArray[bin];
            w2        = (fBinSumw2.fN ? fBinSumw2.fArray[bin] : w );
            x         = fXaxis.GetBinCenter(binx);
            stats[0] += w;
            stats[1] += w2;
            stats[2] += w*x;
            stats[3] += w*x*x;
            stats[4] += w*y;
            stats[5] += w*y*y;
            stats[6] += w*x*y;
            stats[7] += fArray[bin];
            stats[8] += fSumw2.fArray[bin];
         }
      }
   } else {
      stats[0] = fTsumw;
      stats[1] = fTsumw2;
      stats[2] = fTsumwx;
      stats[3] = fTsumwx2;
      stats[4] = fTsumwy;
      stats[5] = fTsumwy2;
      stats[6] = fTsumwxy;
      stats[7] = fTsumwz;
      stats[8] = fTsumwz2;
   }
}

//___________________________________________________________________________
void TProfile2D::LabelsDeflate(Option_t *ax)
{
   // Reduce the number of bins for this axis to the number of bins having a label.

   TProfileHelper::LabelsDeflate(this, ax);
}

//___________________________________________________________________________
void TProfile2D::LabelsInflate(Option_t *ax)
{
   // Double the number of bins for axis.
   // Refill histogram
   // This function is called by TAxis::FindBin(const char *label)

   TProfileHelper::LabelsInflate(this, ax);
}

//___________________________________________________________________________
void TProfile2D::LabelsOption(Option_t *option, Option_t *ax)
{
   //  Set option(s) to draw axis with labels
   //  option = "a" sort by alphabetic order
   //         = ">" sort by decreasing values
   //         = "<" sort by increasing values
   //         = "h" draw labels horizonthal
   //         = "v" draw labels vertical
   //         = "u" draw labels up (end of label right adjusted)
   //         = "d" draw labels down (start of label left adjusted)


   TAxis *axis = GetXaxis();
   if (ax[0] == 'y' || ax[0] == 'Y') axis = GetYaxis();
   THashList *labels = axis->GetLabels();
   if (!labels) {
      Warning("LabelsOption","Cannot sort. No labels");
      return;
   }
   TString opt = option;
   opt.ToLower();
   if (opt.Contains("h")) {
      axis->SetBit(TAxis::kLabelsHori);
      axis->ResetBit(TAxis::kLabelsVert);
      axis->ResetBit(TAxis::kLabelsDown);
      axis->ResetBit(TAxis::kLabelsUp);
   }
   if (opt.Contains("v")) {
      axis->SetBit(TAxis::kLabelsVert);
      axis->ResetBit(TAxis::kLabelsHori);
      axis->ResetBit(TAxis::kLabelsDown);
      axis->ResetBit(TAxis::kLabelsUp);
   }
   if (opt.Contains("u")) {
      axis->SetBit(TAxis::kLabelsUp);
      axis->ResetBit(TAxis::kLabelsVert);
      axis->ResetBit(TAxis::kLabelsDown);
      axis->ResetBit(TAxis::kLabelsHori);
   }
   if (opt.Contains("d")) {
      axis->SetBit(TAxis::kLabelsDown);
      axis->ResetBit(TAxis::kLabelsVert);
      axis->ResetBit(TAxis::kLabelsHori);
      axis->ResetBit(TAxis::kLabelsUp);
   }
   Int_t sort = -1;
   if (opt.Contains("a")) sort = 0;
   if (opt.Contains(">")) sort = 1;
   if (opt.Contains("<")) sort = 2;
   if (sort < 0) return;

   Int_t nx = fXaxis.GetNbins()+2;
   Int_t ny = fYaxis.GetNbins()+2;
   Int_t n = TMath::Min(axis->GetNbins(), labels->GetSize());
   Int_t *a = new Int_t[n+2];
   Int_t i,j,k,bin;
   Double_t *sumw   = new Double_t[nx*ny];
   Double_t *errors = new Double_t[nx*ny];
   Double_t *ent    = new Double_t[nx*ny];
   THashList *labold = new THashList(labels->GetSize(),1);
   TIter nextold(labels);
   TObject *obj;
   while ((obj=nextold())) {
      labold->Add(obj);
   }
   labels->Clear();
   if (sort > 0) {
      //---sort by values of bins
      Double_t *pcont = new Double_t[n+2];
      for (i=0;i<=n;i++) pcont[i] = 0;
      for (i=1;i<nx;i++) {
         for (j=1;j<ny;j++) {
            bin = i+nx*j;
            sumw[bin]   = fArray[bin];
            errors[bin] = fSumw2.fArray[bin];
            ent[bin]    = fBinEntries.fArray[bin];
            if (axis == GetXaxis()) k = i;
            else                    k = j;
            if (fBinEntries.fArray[bin] != 0) pcont[k-1] += fArray[bin]/fBinEntries.fArray[bin];
         }
      }
      if (sort ==1) TMath::Sort(n,pcont,a,kTRUE);  //sort by decreasing values
      else          TMath::Sort(n,pcont,a,kFALSE); //sort by increasing values
      delete [] pcont;
      for (i=0;i<n;i++) {
         obj = labold->At(a[i]);
         labels->Add(obj);
         obj->SetUniqueID(i+1);
      }
      for (i=1;i<nx;i++) {
         for (j=1;j<ny;j++) {
            bin = i+nx*j;
            if (axis == GetXaxis()) {
               fArray[bin] = sumw[a[i-1]+1+nx*j];
               fSumw2.fArray[bin] = errors[a[i-1]+1+nx*j];
               fBinEntries.fArray[bin] = ent[a[i-1]+1+nx*j];
            } else {
               fArray[bin] = sumw[i+nx*(a[j-1]+1)];
               fSumw2.fArray[bin] = errors[i+nx*(a[j-1]+1)];
               fBinEntries.fArray[bin] = ent[i+nx*(a[j-1]+1)];
            }
         }
      }
   } else {
      //---alphabetic sort
      const UInt_t kUsed = 1<<18;
      TObject *objk=0;
      a[0] = 0;
      a[n+1] = n+1;
      for (i=1;i<=n;i++) {
         const char *label = "zzzzzzzzzzzz";
         for (j=1;j<=n;j++) {
            obj = labold->At(j-1);
            if (!obj) continue;
            if (obj->TestBit(kUsed)) continue;
            //use strcasecmp for case non-sensitive sort (may be an option)
            if (strcmp(label,obj->GetName()) < 0) continue;
            objk = obj;
            a[i] = j;
            label = obj->GetName();
         }
         if (objk) {
            objk->SetUniqueID(i);
            labels->Add(objk);
            objk->SetBit(kUsed);
         }
      }
      for (i=1;i<=n;i++) {
         obj = labels->At(i-1);
         if (!obj) continue;
         obj->ResetBit(kUsed);
      }
      for (i=0;i<nx;i++) {
         for (j=0;j<ny;j++) {
            bin = i+nx*j;
            sumw[bin]   = fArray[bin];
            errors[bin] = fSumw2.fArray[bin];
            ent[bin]    = fBinEntries.fArray[bin];
         }
      }
      for (i=0;i<nx;i++) {
         for (j=0;j<ny;j++) {
            bin = i+nx*j;
            if (axis == GetXaxis()) {
               fArray[bin] = sumw[a[i]+nx*j];
               fSumw2.fArray[bin] = errors[a[i]+nx*j];
               fBinEntries.fArray[bin] = ent[a[i]+nx*j];
            } else {
               fArray[bin] = sumw[i+nx*a[j]];
               fSumw2.fArray[bin] = errors[i+nx*a[j]];
               fBinEntries.fArray[bin] = ent[i+nx*a[j]];
            }
         }
      }
   }
   delete labold;
   if (a)      delete [] a;
   if (sumw)   delete [] sumw;
   if (errors) delete [] errors;
   if (ent)    delete [] ent;
}

//______________________________________________________________________________
Long64_t TProfile2D::Merge(TCollection *li)
{
   //Merge all histograms in the collection in this histogram.
   //This function computes the min/max for the axes,
   //compute a new number of bins, if necessary,
   //add bin contents, errors and statistics.
   //If overflows are present and limits are different the function will fail.
   //The function returns the total number of entries in the result histogram
   //if the merge is successfull, -1 otherwise.
   //
   //IMPORTANT remark. The 2 axis x and y may have different number
   //of bins and different limits, BUT the largest bin width must be
   //a multiple of the smallest bin width and the upper limit must also
   //be a multiple of the bin width.

   return TProfileHelper::Merge(this, li);
}

//______________________________________________________________________________
Bool_t TProfile2D::Multiply(TF1 *, Double_t )
{
   // Performs the operation: this = this*c1*f1

   Error("Multiply","Function not implemented for TProfile2D");
   return kFALSE;
}

//______________________________________________________________________________
Bool_t TProfile2D::Multiply(const TH1 *)
{
   //*-*-*-*-*-*-*-*-*-*-*Multiply this profile2D by h1*-*-*-*-*-*-*-*-*-*-*-*
   //*-*                  =============================
   //
   //   this = this*h1
   //
   Error("Multiply","Multiplication of profile2D histograms not implemented");
   return kFALSE;
}


//______________________________________________________________________________
Bool_t TProfile2D::Multiply(const TH1 *, const TH1 *, Double_t, Double_t, Option_t *)
{
   //*-*-*-*-*Replace contents of this profile2D by multiplication of h1 by h2*-*
   //*-*      ================================================================
   //
   //   this = (c1*h1)*(c2*h2)
   //

   Error("Multiply","Multiplication of profile2D histograms not implemented");
   return kFALSE;
}

//______________________________________________________________________________
TH2D *TProfile2D::ProjectionXY(const char *name, Option_t *option) const
{
   //*-*-*-*-*Project this profile2D into a 2-D histogram along X,Y*-*-*-*-*-*-*
   //*-*      =====================================================
   //
   //   The projection is always of the type TH2D.
   //
   //   if option "E" is specified  the errors of the projected histogram are computed and set
   //      to be equal to the errors of the profile.
   //      Option "E" is defined as the default one in the header file.
   //   if option "" is specified the histogram errors are simply the sqrt of its content
   //   if option "B" is specified, the content of bin of the returned histogram
   //      will be equal to the GetBinEntries(bin) of the profile,
   //   if option "C=E" the bin contents of the projection are set to the
   //       bin errors of the profile
   //   if option "W" is specified the bin content of the projected histogram  is set to the
   //       product of the bin content of the profile and the entries.
   //       With this option the returned histogram will be equivalent to the one obtained by
   //       filling directly a TH2D using the 3-rd value as a weight.
   //       This option makes sense only for profile filled with all weights =1.
   //       When the profile is weighted (filled with weights different than 1) the
   //       bin error of the projected histogram (obtained using this option "W") cannot be
   //       correctly computed from the information stored in the profile. In that case the
   //       obtained histogram contains as bin error square the weighted sum of the square of the
   //       profiled observable (TProfile2D::fSumw2[bin] )


   TString opt = option;
   opt.ToLower();

   // Create the projection histogram
   // name of projected histogram is by default name of orginal histogram + _pxy
   TString pname(name);
   if (pname.IsNull() || pname == "_pxy")
      pname = TString(GetName() ) + TString("_pxy");


   Int_t nx = fXaxis.GetNbins();
   Int_t ny = fYaxis.GetNbins();
   const TArrayD *xbins = fXaxis.GetXbins();
   const TArrayD *ybins = fYaxis.GetXbins();
   TH2D * h1 = 0;
   if (xbins->fN == 0 && ybins->fN == 0) {
      h1 = new TH2D(pname,GetTitle(),nx,fXaxis.GetXmin(),fXaxis.GetXmax(),ny,fYaxis.GetXmin(),fYaxis.GetXmax());
   } else if (xbins->fN == 0) {
      h1 = new TH2D(pname,GetTitle(),nx,fXaxis.GetXmin(),fXaxis.GetXmax(),ny, ybins->GetArray() );
   } else if (ybins->fN == 0) {
      h1 = new TH2D(pname,GetTitle(),nx,xbins->GetArray(),ny,fYaxis.GetXmin(),fYaxis.GetXmax());
   } else {
      h1 = new TH2D(pname,GetTitle(),nx,xbins->GetArray(),ny,ybins->GetArray() );
   }
   Bool_t computeErrors = kFALSE;
   Bool_t cequalErrors  = kFALSE;
   Bool_t binEntries    = kFALSE;
   Bool_t binWeight     = kFALSE;
   if (opt.Contains("b")) binEntries = kTRUE;
   if (opt.Contains("e")) computeErrors = kTRUE;
   if (opt.Contains("w")) binWeight = kTRUE;
   if (opt.Contains("c=e")) {cequalErrors = kTRUE; computeErrors=kFALSE;}
   if (computeErrors || binWeight || (binEntries && fBinSumw2.fN)  ) h1->Sumw2();

   // Fill the projected histogram
   Int_t bin,binx, biny;
   Double_t cont;
   for (binx =0;binx<=nx+1;binx++) {
      for (biny =0;biny<=ny+1;biny++) {
         bin = GetBin(binx,biny);

         if (binEntries)         cont = GetBinEntries(bin);
         else if (cequalErrors)  cont = GetBinError(bin);
         else if (binWeight)     cont = GetBinContent(bin) * GetBinEntries(bin);
         else                    cont = GetBinContent(bin);    // default case

         h1->SetBinContent(bin ,cont);

         // if option E projected histogram errors are same as profile
         if (computeErrors ) h1->SetBinError(bin , GetBinError(bin) );
         // in case of option W bin error is deduced from bin sum of z**2 values of profile
         // this is correct only if the profile is unweighted
         if (binWeight)      h1->GetSumw2()->fArray[bin] = fSumw2.fArray[bin];
         // in case of bin entries and profile is weighted, we need to set also the bin error
         if (binEntries && fBinSumw2.fN ) {
            R__ASSERT(  h1->GetSumw2() );
            h1->GetSumw2()->fArray[bin] =  fBinSumw2.fArray[bin];
         }
      }
   }
   h1->SetEntries(fEntries);
   return h1;
}

//______________________________________________________________________________
TProfile *TProfile2D::ProfileX(const char *name, Int_t firstybin, Int_t lastybin, Option_t *option) const
{
   // *-*-*-*-*Project a 2-D histogram into a profile histogram along X*-*-*-*-*-*
   // *-*      ========================================================
   //
   //   The projection is made from the channels along the Y axis
   //   ranging from firstybin to lastybin included.
   //   The result is a 1D profile which contains the combination of all the considered bins along Y
   //   By default, bins 1 to ny are included
   //   When all bins are included, the number of entries in the projection
   //   is set to the number of entries of the 2-D histogram, otherwise
   //   the number of entries is incremented by 1 for all non empty cells.
   //
   //   The option can also be used to specify the projected profile error type.
   //   Values which can be used are 's', 'i', or 'g'. See TProfile::BuildOptions for details
   //
   //
   return DoProfile(true, name, firstybin, lastybin, option);
}

//______________________________________________________________________________
TProfile *TProfile2D::ProfileY(const char *name, Int_t firstxbin, Int_t lastxbin, Option_t *option) const
{
   // *-*-*-*-*Project a 2-D histogram into a profile histogram along X*-*-*-*-*-*
   // *-*      ========================================================
   //
   //   The projection is made from the channels along the X axis
   //   ranging from firstybin to lastybin included.
   //   The result is a 1D profile which contains the combination of all the considered bins along X
   //   By default, bins 1 to ny are included
   //   When all bins are included, the number of entries in the projection
   //   is set to the number of entries of the 2-D histogram, otherwise
   //   the number of entries is incremented by 1 for all non empty cells.
   //
   //   The option can also be used to specify the projected profile error type.
   //   Values which can be used are 's', 'i', or 'g'. See TProfile::BuildOptions for details
   //
   //
   //
   return DoProfile(false, name, firstxbin, lastxbin, option);
}

//______________________________________________________________________________
TProfile * TProfile2D::DoProfile(bool onX, const char *name, Int_t firstbin, Int_t lastbin, Option_t *option) const {
   // implementation of ProfileX or ProfileY for a TProfile2D
   // Do correctly the combination of the bin averages when doing the projection

   TString opt = option;
   opt.ToLower();
   bool originalRange = opt.Contains("o");

   TString expectedName = ( onX ? "_pfx" : "_pfy" );

   TString pname(name);
   if (pname.IsNull() || name == expectedName)
      pname = TString(GetName() ) + expectedName;

   const TAxis& outAxis = ( onX ? fXaxis : fYaxis );
   const TArrayD *bins = outAxis.GetXbins();
   Int_t firstOutBin = outAxis.GetFirst();
   Int_t lastOutBin = outAxis.GetLast();

   TProfile  * p1 = 0;
   // case of fixed bins
   if (bins->fN == 0) {
      if (originalRange)
         p1 =  new TProfile(pname,GetTitle(), outAxis.GetNbins(), outAxis.GetXmin(), outAxis.GetXmax(), opt );
      else
         p1 =  new TProfile(pname,GetTitle(), lastOutBin-firstOutBin+1,
                            outAxis.GetBinLowEdge(firstOutBin),outAxis.GetBinUpEdge(lastOutBin), opt);
   } else {
      // case of variable bins
      if (originalRange )
         p1 = new TProfile(pname,GetTitle(),outAxis.GetNbins(),bins->fArray,opt);
      else
         p1 = new TProfile(pname,GetTitle(),lastOutBin-firstOutBin+1,&bins->fArray[firstOutBin-1],opt);

   }

   if (fBinSumw2.fN) p1->Sumw2();

   // make projection in a 2D first
   TH2D * h2dW = ProjectionXY("h2temp-W","W");
   TH2D * h2dN = ProjectionXY("h2temp-N","B");

   h2dW->SetDirectory(0); h2dN->SetDirectory(0);


   TString opt1 = (originalRange) ? "o" : "";
   TH1D * h1W = (onX) ? h2dW->ProjectionX("h1temp-W",firstbin,lastbin,opt1) : h2dW->ProjectionY("h1temp-W",firstbin,lastbin,opt1);
   TH1D * h1N = (onX) ? h2dN->ProjectionX("h1temp-N",firstbin,lastbin,opt1) : h2dN->ProjectionY("h1temp-N",firstbin,lastbin,opt1);
   h1W->SetDirectory(0); h1N->SetDirectory(0);


   // fill the bin content
   R__ASSERT( h1W->fN == p1->fN );
   R__ASSERT( h1N->fN == p1->fN );
   R__ASSERT( h1W->GetSumw2()->fN != 0); // h1W should always be a weighted histogram since h2dW is
   for (int i = 0; i < p1->fN ; ++i) {
      p1->fArray[i] = h1W->GetBinContent(i);   // array of profile is sum of all values
      p1->GetSumw2()->fArray[i]  = h1W->GetSumw2()->fArray[i];   // array of content square of profile is weight square of the W projected histogram
      p1->SetBinEntries(i, h1N->GetBinContent(i) );
      if (fBinSumw2.fN) p1->GetBinSumw2()->fArray[i] = h1N->GetSumw2()->fArray[i];    // sum of weight squares are stored to compute errors in h1N histogram
   }
   // delete the created histograms
   delete h2dW;
   delete h2dN;
   delete h1W;
   delete h1N;

   // Also we need to set the entries since they have not been correctly calculated during the projection
   // we can only set them to the effective entries
   p1->SetEntries( p1->GetEffectiveEntries() );

   return p1;
}


//______________________________________________________________________________
void TProfile2D::PutStats(Double_t *stats)
{
   // Replace current statistics with the values in array stats

   fTsumw   = stats[0];
   fTsumw2  = stats[1];
   fTsumwx  = stats[2];
   fTsumwx2 = stats[3];
   fTsumwy  = stats[4];
   fTsumwy2 = stats[5];
   fTsumwxy = stats[6];
   fTsumwz  = stats[7];
   fTsumwz2 = stats[8];
}

//______________________________________________________________________________
void TProfile2D::Reset(Option_t *option)
{
   //*-*-*-*-*-*-*-*-*-*Reset contents of a Profile2D histogram*-*-*-*-*-*-*-*
   //*-*                =======================================
   TH2D::Reset(option);
   fBinEntries.Reset();
   fBinSumw2.Reset();
   TString opt = option;
   opt.ToUpper();
   if (opt.Contains("ICE") && !opt.Contains("S")) return;
   fTsumwz = fTsumwz2 = 0;
}


//______________________________________________________________________________
void TProfile2D::RebinAxis(Double_t x, TAxis *axis)
{
   // Profile histogram is resized along axis such that x is in the axis range.
   // The new axis limits are recomputed by doubling iteratively
   // the current axis range until the specified value x is within the limits.
   // The algorithm makes a copy of the histogram, then loops on all bins
   // of the old histogram to fill the rebinned histogram.
   // Takes into account errors (Sumw2) if any.
   // The bit kCanRebin must be set before invoking this function.
   //  Ex:  h->SetBit(TH1::kCanRebin);

   TProfile2D* hold = TProfileHelper::RebinAxis(this, x, axis);
   if ( hold ) {
      fTsumwz  = hold->fTsumwz;
      fTsumwz2 = hold->fTsumwz2;
      delete hold;
   }
}

//______________________________________________________________________________
TProfile2D * TProfile2D::Rebin2D(Int_t nxgroup ,Int_t nygroup,const char * newname ) {
   //   -*-*-*Rebin this histogram grouping nxgroup/nygroup bins along the xaxis/yaxis together*-*-*-*-
   //         =================================================================================
   //   if newname is not blank a new profile hnew is created.
   //   else the current histogram is modified (default)
   //   The parameter nxgroup/nygroup indicate how many bins along the xaxis/yaxis of this
   //   have to be merged into one bin of hnew
   //   If the original profile has errors stored (via Sumw2), the resulting
   //   profile has new errors correctly calculated.
   //
   //   examples: if hpxpy is an existing TProfile2D profile with 40 x 40 bins
   //     hpxpy->Rebin2D();  // merges two bins along the xaxis and yaxis in one
   //                        // Carefull: previous contents of hpxpy are lost
   //     hpxpy->Rebin2D(3,5);  // merges 3 bins along the xaxis and 5 bins along the yaxis in one
   //                           // Carefull: previous contents of hpxpy are lost
   //     hpxpy->RebinX(5); //merges five bins along the xaxis in one in hpxpy
   //     TProfile2D *hnew = hpxpy->RebinY(5,"hnew"); // creates a new profile hnew
   //                                                 // merging 5 bins of hpxpy along the yaxis in one bin
   //
   //   NOTE : If nxgroup/nygroup is not an exact divider of the number of bins,
   //          along the xaxis/yaxis the top limit(s) of the rebinned profile
   //          is changed to the upper edge of the xbin=newxbins*nxgroup resp.
   //          ybin=newybins*nygroup and the remaining bins are added to
   //          the overflow bin.
   //          Statistics will be recomputed from the new bin contents.

   //something to do?
   if((nxgroup != 1) || (nygroup != 1)){
      Int_t nxbins  = fXaxis.GetNbins();
      Int_t nybins  = fYaxis.GetNbins();
      Double_t xmin  = fXaxis.GetXmin();
      Double_t xmax  = fXaxis.GetXmax();
      Double_t ymin  = fYaxis.GetXmin();
      Double_t ymax  = fYaxis.GetXmax();
      if ((nxgroup <= 0) || (nxgroup > nxbins)) {
         Error("Rebin", "Illegal value of nxgroup=%d",nxgroup);
         return 0;
      }
      if ((nygroup <= 0) || (nygroup > nybins)) {
         Error("Rebin", "Illegal value of nygroup=%d",nygroup);
         return 0;
      }

      Int_t newxbins = nxbins/nxgroup;
      Int_t newybins = nybins/nygroup;

      //warning if bins are added to the overflow bin
      if(newxbins*nxgroup != nxbins) {
         Warning("Rebin", "nxgroup=%d should be an exact divider of nxbins=%d",nxgroup,nxbins);
      }
      if(newybins*nygroup != nybins) {
         Warning("Rebin", "nygroup=%d should be an exact divider of nybins=%d",nygroup,nybins);
      }

      //save old bin contents in new arrays
      Double_t *oldBins   = new Double_t[(nxbins+2)*(nybins+2)];
      Double_t *oldCount  = new Double_t[(nxbins+2)*(nybins+2)];
      Double_t *oldErrors = new Double_t[(nxbins+2)*(nybins+2)];
      Double_t *oldBinw2  = (fBinSumw2.fN ? new Double_t[(nxbins+2)*(nybins+2)] : 0  );
      Double_t *cu1 = GetW();
      Double_t *er1 = GetW2();
      Double_t *en1 = GetB();
      Double_t *ew1 = GetB2();
      for(Int_t ibin=0; ibin < (nxbins+2)*(nybins+2); ibin++){
         oldBins[ibin]   = cu1[ibin];
         oldCount[ibin]  = en1[ibin];
         oldErrors[ibin] = er1[ibin];
         if (ew1 && fBinSumw2.fN) oldBinw2[ibin]  = ew1[ibin];
      }

      // create a clone of the old profile if newname is specified
      TProfile2D *hnew = this;
      if(newname && strlen(newname) > 0) {
         hnew = (TProfile2D*)Clone(newname);
      }

      // in case of nxgroup/nygroup not an exact divider of nxbins/nybins,
      // top limit is changed (see NOTE in method comment)
      if(newxbins*nxgroup != nxbins) {
         xmax = fXaxis.GetBinUpEdge(newxbins*nxgroup);
         hnew->fTsumw = 0; //stats must be reset because top bins will be moved to overflow bin
      }
      if(newybins*nygroup != nybins) {
         ymax = fYaxis.GetBinUpEdge(newybins*nygroup);
         hnew->fTsumw = 0; //stats must be reset because top bins will be moved to overflow bin
      }

      //rebin the axis
      if((fXaxis.GetXbins()->GetSize() > 0) || (fYaxis.GetXbins()->GetSize() > 0)){
         Double_t* xbins = new Double_t[newxbins+1];
         Double_t* ybins = new Double_t[newybins+1];
         for(Int_t i=0; i < newxbins+1; i++)
            xbins[i] = fXaxis.GetBinLowEdge(1+i*nxgroup);
         for(Int_t j=0; j < newybins+1; j++)
            ybins[j] = fYaxis.GetBinLowEdge(1+j*nygroup);
         hnew->SetBins(newxbins,xbins,newybins,ybins);
         delete [] xbins;
         delete [] ybins;
      }
      //fixed bin size
      else{
         hnew->SetBins(newxbins,xmin,xmax,newybins,ymin,ymax);
      }

      //merge bins
      Double_t *cu2 = hnew->GetW();
      Double_t *er2 = hnew->GetW2();
      Double_t *en2 = hnew->GetB();
      Double_t *ew2 = hnew->GetB2();
      Double_t binContent, binCount, binError, binSumw2;
      //connection between x and y bin number and linear global bin number:
      //global bin = xbin + (nxbins+2) * ybin
      Int_t oldxbin = 1;
      Int_t oldybin = 1;
      //global bin number
      Int_t bin;
      for(Int_t xbin = 1; xbin <= newxbins; xbin++){
         oldybin = 1;
         for(Int_t ybin = 1; ybin <= newybins; ybin++){
            binContent = 0;
            binCount   = 0;
            binError   = 0;
            binSumw2   = 0;
            for(Int_t i=0; i < nxgroup; i++){
               if(oldxbin + i > nxbins) break;
               for(Int_t j=0; j < nygroup; j++){
                  if(oldybin + j > nybins) break;
                  bin = oldxbin + i + (nxbins+2)*(oldybin+j);
                  binContent += oldBins[bin];
                  binCount += oldCount[bin];
                  binError += oldErrors[bin];
                  if(fBinSumw2.fN) binSumw2 += oldBinw2[bin];
               }
            }
            bin = xbin + (newxbins + 2)*ybin;
            cu2[bin] = binContent;
            er2[bin] = binError;
            en2[bin] = binCount;
            if(fBinSumw2.fN) ew2[bin] = binSumw2;
            oldybin += nygroup;
         }
         oldxbin += nxgroup;
      }

      //copy the underflow bin in x and y (0,0)
      cu2[0] = oldBins[0];
      er2[0] = oldErrors[0];
      en2[0] = oldCount[0];
      if(fBinSumw2.fN) ew2[0] = oldBinw2[0];
      //calculate overflow bin in x and y (newxbins+1,newybins+1)
      //therefore the oldxbin and oldybin from above are needed!
      binContent = 0;
      binCount   = 0;
      binError   = 0;
      binSumw2   = 0;
      for(Int_t i=oldxbin; i <= nxbins+1; i++){
         for(Int_t j=oldybin; j <= nybins+1; j++){
            //global bin number
            bin = i + (nxbins+2)*j;
            binContent += oldBins[bin];
            binCount += oldCount[bin];
            binError += oldErrors[bin];
            if(fBinSumw2.fN) binSumw2 += oldBinw2[bin];
         }
      }
      bin = (newxbins+2)*(newybins+2)-1;
      cu2[bin] = binContent;
      er2[bin] = binError;
      en2[bin] = binCount;
      if(fBinSumw2.fN) ew2[bin] = binSumw2;
      //calculate overflow bin in x and underflow bin in y (newxbins+1,0)
      binContent = 0;
      binCount   = 0;
      binError   = 0;
      binSumw2   = 0;
      for(Int_t i=oldxbin; i <= nxbins+1; i++){
         bin = i;
         binContent += oldBins[bin];
         binCount += oldCount[bin];
         binError += oldErrors[bin];
         if(fBinSumw2.fN) binSumw2 += oldBinw2[bin];
      }
      bin = newxbins + 1;
      cu2[bin] = binContent;
      er2[bin] = binError;
      en2[bin] = binCount;
      if(fBinSumw2.fN) ew2[bin] = binSumw2;
      //calculate underflow bin in x and overflow bin in y (0,newybins+1)
      binContent = 0;
      binCount   = 0;
      binError   = 0;
      binSumw2   = 0;
      for(Int_t i=oldybin; i <= nybins+1; i++){
         bin = i*(nxbins + 2);
         binContent += oldBins[bin];
         binCount += oldCount[bin];
         binError += oldErrors[bin];
         if(fBinSumw2.fN) binSumw2 += oldBinw2[bin];
      }
      bin = (newxbins + 2)*(newybins + 1);
      cu2[bin] = binContent;
      er2[bin] = binError;
      en2[bin] = binCount;
      if(fBinSumw2.fN) ew2[bin] = binSumw2;
      //calculate under/overflow contents in y for the new x bins
      Double_t binContentuf, binCountuf, binErroruf, binSumw2uf;
      Double_t binContentof, binCountof, binErrorof, binSumw2of;
      Int_t ufbin, ofbin;
      Int_t oldxbin2 = 1;
      for(Int_t xbin = 1; xbin <= newxbins; xbin++){
         binContentuf = 0;
         binCountuf   = 0;
         binErroruf   = 0;
         binSumw2uf   = 0;
         binContentof = 0;
         binCountof   = 0;
         binErrorof   = 0;
         binSumw2of   = 0;
         for(Int_t i = 0; i < nxgroup; i++){
            //index of under/overflow bin for y in old binning
            ufbin = (oldxbin2 + i);
            binContentuf += oldBins[ufbin];
            binCountuf   += oldCount[ufbin];
            binErroruf   += oldErrors[ufbin];
            if(fBinSumw2.fN) binSumw2uf   += oldBinw2[ufbin];
            for(Int_t j = oldybin; j <= nybins+1; j++)
            {
               ofbin = ufbin + j*(nxbins + 2);
               binContentof += oldBins[ofbin];
               binCountof   += oldCount[ofbin];
               binErrorof   += oldErrors[ofbin];
               if(fBinSumw2.fN) binSumw2of   += oldBinw2[ofbin];
            }
         }
         //index of under/overflow bin for y in new binning
         ufbin = xbin;
         ofbin = ufbin + (newybins + 1)*(newxbins + 2);
         cu2[ufbin] = binContentuf;
         er2[ufbin] = binErroruf;
         en2[ufbin] = binCountuf;
         if(fBinSumw2.fN) ew2[ufbin] = binSumw2uf;
         cu2[ofbin] = binContentof;
         er2[ofbin] = binErrorof;
         en2[ofbin] = binCountof;
         if(fBinSumw2.fN) ew2[ofbin] = binSumw2of;

         oldxbin2 += nxgroup;
      }
      //calculate under/overflow contents in x for the new y bins
      Int_t oldybin2 = 1;
      for(Int_t ybin = 1; ybin <= newybins; ybin++){
         binContentuf = 0;
         binCountuf   = 0;
         binErroruf   = 0;
         binSumw2uf   = 0;
         binContentof = 0;
         binCountof   = 0;
         binErrorof   = 0;
         binSumw2of   = 0;
         for(Int_t i = 0; i < nygroup; i++){
            //index of under/overflow bin for x in old binning
            ufbin = (oldybin2 + i)*(nxbins+2);
            binContentuf += oldBins[ufbin];
            binCountuf   += oldCount[ufbin];
            binErroruf   += oldErrors[ufbin];
            if(fBinSumw2.fN) binSumw2uf   += oldBinw2[ufbin];
            for(Int_t j = oldxbin; j <= nxbins+1; j++)
            {
               ofbin = j + ufbin;
               binContentof += oldBins[ofbin];
               binCountof   += oldCount[ofbin];
               binErrorof   += oldErrors[ofbin];
               if(fBinSumw2.fN) binSumw2of   += oldBinw2[ofbin];
            }
         }
         //index of under/overflow bin for x in new binning
         ufbin = ybin * (newxbins + 2);
         ofbin = newxbins + 1 + ufbin;
         cu2[ufbin] = binContentuf;
         er2[ufbin] = binErroruf;
         en2[ufbin] = binCountuf;
         if(fBinSumw2.fN) ew2[ufbin] = binSumw2uf;
         cu2[ofbin] = binContentof;
         er2[ofbin] = binErrorof;
         en2[ofbin] = binCountof;
         if(fBinSumw2.fN) ew2[ofbin] = binSumw2of;

         oldybin2 += nygroup;
      }

      delete [] oldBins;
      delete [] oldCount;
      delete [] oldErrors;
      if (oldBinw2) delete [] oldBinw2;

      return hnew;
   }
   //nxgroup == nygroup == 1
   else{
      if((newname) && (strlen(newname) > 0))
         return (TProfile2D*)Clone(newname);
      else
         return this;
   }
}

//______________________________________________________________________________
TProfile2D * TProfile2D::RebinX(Int_t ngroup,const char * newname ) {
   // Rebin only the X axis
   // see Rebin2D

   return Rebin2D(ngroup,1,newname);
}

//______________________________________________________________________________
TProfile2D * TProfile2D::RebinY(Int_t ngroup,const char * newname ) {
   // Rebin only the Y axis
   // see Rebin2D

   return Rebin2D(1,ngroup,newname);
}

//______________________________________________________________________________
void TProfile2D::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
   // Save primitive as a C++ statement(s) on output stream out

   //Note the following restrictions in the code generated:
   // - variable bin size not implemented
   // - SetErrorOption not implemented


   char quote = '"';
   out <<"   "<<endl;
   out <<"   "<<ClassName()<<" *";

   out << GetName() << " = new " << ClassName() << "(" << quote
   << GetName() << quote << "," << quote<< GetTitle() << quote
   << "," << GetXaxis()->GetNbins();
   out << "," << GetXaxis()->GetXmin()
   << "," << GetXaxis()->GetXmax();
   out << "," << GetYaxis()->GetNbins();
   out << "," << GetYaxis()->GetXmin()
   << "," << GetYaxis()->GetXmax();
   out << "," << fZmin
   << "," << fZmax;
   out << ");" << endl;


   // save bin entries
   Int_t bin;
   for (bin=0;bin<fNcells;bin++) {
      Double_t bi = GetBinEntries(bin);
      if (bi) {
         out<<"   "<<GetName()<<"->SetBinEntries("<<bin<<","<<bi<<");"<<endl;
      }
   }
   //save bin contents
   for (bin=0;bin<fNcells;bin++) {
      Double_t bc = fArray[bin];
      if (bc) {
         out<<"   "<<GetName()<<"->SetBinContent("<<bin<<","<<bc<<");"<<endl;
      }
   }
   // save bin errors
   if (fSumw2.fN) {
      for (bin=0;bin<fNcells;bin++) {
         Double_t be = TMath::Sqrt(fSumw2.fArray[bin]);
         if (be) {
            out<<"   "<<GetName()<<"->SetBinError("<<bin<<","<<be<<");"<<endl;
         }
      }
   }

   TH1::SavePrimitiveHelp(out, GetName(), option);
}

//______________________________________________________________________________
void TProfile2D::Scale(Double_t c1, Option_t * option)
{
   // *-*-*-*-*Multiply this profile2D by a constant c1*-*-*-*-*-*-*-*-*
   // *-*      ========================================
   //
   //   this = c1*this
   //
   // This function uses the services of TProfile2D::Add
   //

   TProfileHelper::Scale(this, c1, option);
}

//______________________________________________________________________________
void TProfile2D::SetBinEntries(Int_t bin, Double_t w)
{
   //*-*-*-*-*-*-*-*-*Set the number of entries in bin*-*-*-*-*-*-*-*-*-*-*-*
   //*-*              ================================

   TProfileHelper::SetBinEntries(this, bin, w);
}

//______________________________________________________________________________
void TProfile2D::SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax)
{
   //*-*-*-*-*-*-*-*-*Redefine  x and y axis parameters*-*-*-*-*-*-*-*-*-*-*-*
   //*-*              ===========================

   TH1::SetBins(nx,xmin, xmax,ny, ymin,ymax);
   fBinEntries.Set(fNcells);
   if (fBinSumw2.fN) fBinSumw2.Set(fNcells);
}

//______________________________________________________________________________
void TProfile2D::SetBins(Int_t nx,  const Double_t *xbins, Int_t ny, const Double_t *ybins)
{
   //*-*-*-*-*-*-*-*-*Redefine  x and y axis parameters for variable bin sizes -*-*-*-*-*-*-*
   //*-*              ===========================
   TH1::SetBins(nx,xbins,ny,ybins);
   fBinEntries.Set(fNcells);
   if (fBinSumw2.fN) fBinSumw2.Set(fNcells);
}

//______________________________________________________________________________
void TProfile2D::SetBinsLength(Int_t n)
{
   // Set total number of bins including under/overflow
   // Reallocate bin contents array
   TH2D::SetBinsLength(n);
   TProfileHelper::BuildArray(this);
}

//______________________________________________________________________________
void TProfile2D::SetBuffer(Int_t buffersize, Option_t *)
{
   // set the buffer size in units of 8 bytes (double)

   if (fBuffer) {
      BufferEmpty();
      delete [] fBuffer;
      fBuffer = 0;
   }
   if (buffersize <= 0) {
      fBufferSize = 0;
      return;
   }
   if (buffersize < 100) buffersize = 100;
   fBufferSize = 1 + 4*buffersize;
   fBuffer = new Double_t[fBufferSize];
   memset(fBuffer,0,sizeof(Double_t)*fBufferSize);
}

//______________________________________________________________________________
void TProfile2D::SetErrorOption(Option_t *option)
{
   //*-*-*-*-*-*-*-*-*-*Set option to compute profile2D errors*-*-*-*-*-*-*-*
   //*-*                =======================================
   //    The computation of the bin errors is based on the parameter option:
   //    option:
   //     ' '  (Default) The bin errors are the standard error on the mean of the bin profiled values (Z),
   //                    i.e. the standard error of the bin contents.
   //                    Note that if TProfile::Approximate()  is called, an approximation is used when
   //                    the spread in Z is 0 and the number of bin entries  is > 0
   //
   //     's'            The bin errors are the standard deviations of the Z bin values
   //                    Note that if TProfile::Approximate()  is called, an approximation is used when
   //                    the spread in Z is 0 and the number of bin entries is > 0
   //
   //     'i'            Errors are as in default case (standard errors of the bin contents)
   //                    The only difference is for the case when the spread in Z is zero.
   //                    In this case for N > 0 the error is  1./SQRT(12.*N)
   //
   //     'g'            Errors are 1./SQRT(W)  for W not equal to 0 and 0 for W = 0.
   //                    W is the sum in the bin of the weights of the profile. 
   //                    This option is for combining measurements z +/- dz,  
   //                    and  the profile is filled with values y and weights z = 1/dz**2
   //
   //   See TProfile::BuildOptions for a detailed explanation of all options
   
   TProfileHelper::SetErrorOption(this, option);
}

//______________________________________________________________________________
void TProfile2D::Streamer(TBuffer &R__b)
{
   // Stream an object of class TProfile2D.
   
   if (R__b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
      if (R__v > 2) {
         R__b.ReadClassBuffer(TProfile2D::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TH2D::Streamer(R__b);
      fBinEntries.Streamer(R__b);
      Int_t errorMode;
      R__b >> errorMode;
      fErrorMode = (EErrorType)errorMode;
      if (R__v < 2) {
         Float_t zmin,zmax;
         R__b >> zmin; fZmin = zmin;
         R__b >> zmax; fZmax = zmax;
      } else {
         R__b >> fZmin;
         R__b >> fZmax;
      }
      R__b.CheckByteCount(R__s, R__c, TProfile2D::IsA());
      //====end of old versions
      
   } else {
      R__b.WriteClassBuffer(TProfile2D::Class(),this);
   }
}

//______________________________________________________________________________
void TProfile2D::Sumw2(Bool_t flag)
{
   // Create/Delete structure to store sum of squares of weights per bin  *-*-*-*-*-*-*-*
   //   This is needed to compute  the correct statistical quantities  
   //    of a profile filled with weights 
   //  
   //
   //  This function is automatically called when the histogram is created
   //  if the static function TH1::SetDefaultSumw2 has been called before.
   //  If flag is false the structure is deleted 
   
   TProfileHelper::Sumw2(this, flag);
}
 TProfile2D.cxx:1
 TProfile2D.cxx:2
 TProfile2D.cxx:3
 TProfile2D.cxx:4
 TProfile2D.cxx:5
 TProfile2D.cxx:6
 TProfile2D.cxx:7
 TProfile2D.cxx:8
 TProfile2D.cxx:9
 TProfile2D.cxx:10
 TProfile2D.cxx:11
 TProfile2D.cxx:12
 TProfile2D.cxx:13
 TProfile2D.cxx:14
 TProfile2D.cxx:15
 TProfile2D.cxx:16
 TProfile2D.cxx:17
 TProfile2D.cxx:18
 TProfile2D.cxx:19
 TProfile2D.cxx:20
 TProfile2D.cxx:21
 TProfile2D.cxx:22
 TProfile2D.cxx:23
 TProfile2D.cxx:24
 TProfile2D.cxx:25
 TProfile2D.cxx:26
 TProfile2D.cxx:27
 TProfile2D.cxx:28
 TProfile2D.cxx:29
 TProfile2D.cxx:30
 TProfile2D.cxx:31
 TProfile2D.cxx:32
 TProfile2D.cxx:33
 TProfile2D.cxx:34
 TProfile2D.cxx:35
 TProfile2D.cxx:36
 TProfile2D.cxx:37
 TProfile2D.cxx:38
 TProfile2D.cxx:39
 TProfile2D.cxx:40
 TProfile2D.cxx:41
 TProfile2D.cxx:42
 TProfile2D.cxx:43
 TProfile2D.cxx:44
 TProfile2D.cxx:45
 TProfile2D.cxx:46
 TProfile2D.cxx:47
 TProfile2D.cxx:48
 TProfile2D.cxx:49
 TProfile2D.cxx:50
 TProfile2D.cxx:51
 TProfile2D.cxx:52
 TProfile2D.cxx:53
 TProfile2D.cxx:54
 TProfile2D.cxx:55
 TProfile2D.cxx:56
 TProfile2D.cxx:57
 TProfile2D.cxx:58
 TProfile2D.cxx:59
 TProfile2D.cxx:60
 TProfile2D.cxx:61
 TProfile2D.cxx:62
 TProfile2D.cxx:63
 TProfile2D.cxx:64
 TProfile2D.cxx:65
 TProfile2D.cxx:66
 TProfile2D.cxx:67
 TProfile2D.cxx:68
 TProfile2D.cxx:69
 TProfile2D.cxx:70
 TProfile2D.cxx:71
 TProfile2D.cxx:72
 TProfile2D.cxx:73
 TProfile2D.cxx:74
 TProfile2D.cxx:75
 TProfile2D.cxx:76
 TProfile2D.cxx:77
 TProfile2D.cxx:78
 TProfile2D.cxx:79
 TProfile2D.cxx:80
 TProfile2D.cxx:81
 TProfile2D.cxx:82
 TProfile2D.cxx:83
 TProfile2D.cxx:84
 TProfile2D.cxx:85
 TProfile2D.cxx:86
 TProfile2D.cxx:87
 TProfile2D.cxx:88
 TProfile2D.cxx:89
 TProfile2D.cxx:90
 TProfile2D.cxx:91
 TProfile2D.cxx:92
 TProfile2D.cxx:93
 TProfile2D.cxx:94
 TProfile2D.cxx:95
 TProfile2D.cxx:96
 TProfile2D.cxx:97
 TProfile2D.cxx:98
 TProfile2D.cxx:99
 TProfile2D.cxx:100
 TProfile2D.cxx:101
 TProfile2D.cxx:102
 TProfile2D.cxx:103
 TProfile2D.cxx:104
 TProfile2D.cxx:105
 TProfile2D.cxx:106
 TProfile2D.cxx:107
 TProfile2D.cxx:108
 TProfile2D.cxx:109
 TProfile2D.cxx:110
 TProfile2D.cxx:111
 TProfile2D.cxx:112
 TProfile2D.cxx:113
 TProfile2D.cxx:114
 TProfile2D.cxx:115
 TProfile2D.cxx:116
 TProfile2D.cxx:117
 TProfile2D.cxx:118
 TProfile2D.cxx:119
 TProfile2D.cxx:120
 TProfile2D.cxx:121
 TProfile2D.cxx:122
 TProfile2D.cxx:123
 TProfile2D.cxx:124
 TProfile2D.cxx:125
 TProfile2D.cxx:126
 TProfile2D.cxx:127
 TProfile2D.cxx:128
 TProfile2D.cxx:129
 TProfile2D.cxx:130
 TProfile2D.cxx:131
 TProfile2D.cxx:132
 TProfile2D.cxx:133
 TProfile2D.cxx:134
 TProfile2D.cxx:135
 TProfile2D.cxx:136
 TProfile2D.cxx:137
 TProfile2D.cxx:138
 TProfile2D.cxx:139
 TProfile2D.cxx:140
 TProfile2D.cxx:141
 TProfile2D.cxx:142
 TProfile2D.cxx:143
 TProfile2D.cxx:144
 TProfile2D.cxx:145
 TProfile2D.cxx:146
 TProfile2D.cxx:147
 TProfile2D.cxx:148
 TProfile2D.cxx:149
 TProfile2D.cxx:150
 TProfile2D.cxx:151
 TProfile2D.cxx:152
 TProfile2D.cxx:153
 TProfile2D.cxx:154
 TProfile2D.cxx:155
 TProfile2D.cxx:156
 TProfile2D.cxx:157
 TProfile2D.cxx:158
 TProfile2D.cxx:159
 TProfile2D.cxx:160
 TProfile2D.cxx:161
 TProfile2D.cxx:162
 TProfile2D.cxx:163
 TProfile2D.cxx:164
 TProfile2D.cxx:165
 TProfile2D.cxx:166
 TProfile2D.cxx:167
 TProfile2D.cxx:168
 TProfile2D.cxx:169
 TProfile2D.cxx:170
 TProfile2D.cxx:171
 TProfile2D.cxx:172
 TProfile2D.cxx:173
 TProfile2D.cxx:174
 TProfile2D.cxx:175
 TProfile2D.cxx:176
 TProfile2D.cxx:177
 TProfile2D.cxx:178
 TProfile2D.cxx:179
 TProfile2D.cxx:180
 TProfile2D.cxx:181
 TProfile2D.cxx:182
 TProfile2D.cxx:183
 TProfile2D.cxx:184
 TProfile2D.cxx:185
 TProfile2D.cxx:186
 TProfile2D.cxx:187
 TProfile2D.cxx:188
 TProfile2D.cxx:189
 TProfile2D.cxx:190
 TProfile2D.cxx:191
 TProfile2D.cxx:192
 TProfile2D.cxx:193
 TProfile2D.cxx:194
 TProfile2D.cxx:195
 TProfile2D.cxx:196
 TProfile2D.cxx:197
 TProfile2D.cxx:198
 TProfile2D.cxx:199
 TProfile2D.cxx:200
 TProfile2D.cxx:201
 TProfile2D.cxx:202
 TProfile2D.cxx:203
 TProfile2D.cxx:204
 TProfile2D.cxx:205
 TProfile2D.cxx:206
 TProfile2D.cxx:207
 TProfile2D.cxx:208
 TProfile2D.cxx:209
 TProfile2D.cxx:210
 TProfile2D.cxx:211
 TProfile2D.cxx:212
 TProfile2D.cxx:213
 TProfile2D.cxx:214
 TProfile2D.cxx:215
 TProfile2D.cxx:216
 TProfile2D.cxx:217
 TProfile2D.cxx:218
 TProfile2D.cxx:219
 TProfile2D.cxx:220
 TProfile2D.cxx:221
 TProfile2D.cxx:222
 TProfile2D.cxx:223
 TProfile2D.cxx:224
 TProfile2D.cxx:225
 TProfile2D.cxx:226
 TProfile2D.cxx:227
 TProfile2D.cxx:228
 TProfile2D.cxx:229
 TProfile2D.cxx:230
 TProfile2D.cxx:231
 TProfile2D.cxx:232
 TProfile2D.cxx:233
 TProfile2D.cxx:234
 TProfile2D.cxx:235
 TProfile2D.cxx:236
 TProfile2D.cxx:237
 TProfile2D.cxx:238
 TProfile2D.cxx:239
 TProfile2D.cxx:240
 TProfile2D.cxx:241
 TProfile2D.cxx:242
 TProfile2D.cxx:243
 TProfile2D.cxx:244
 TProfile2D.cxx:245
 TProfile2D.cxx:246
 TProfile2D.cxx:247
 TProfile2D.cxx:248
 TProfile2D.cxx:249
 TProfile2D.cxx:250
 TProfile2D.cxx:251
 TProfile2D.cxx:252
 TProfile2D.cxx:253
 TProfile2D.cxx:254
 TProfile2D.cxx:255
 TProfile2D.cxx:256
 TProfile2D.cxx:257
 TProfile2D.cxx:258
 TProfile2D.cxx:259
 TProfile2D.cxx:260
 TProfile2D.cxx:261
 TProfile2D.cxx:262
 TProfile2D.cxx:263
 TProfile2D.cxx:264
 TProfile2D.cxx:265
 TProfile2D.cxx:266
 TProfile2D.cxx:267
 TProfile2D.cxx:268
 TProfile2D.cxx:269
 TProfile2D.cxx:270
 TProfile2D.cxx:271
 TProfile2D.cxx:272
 TProfile2D.cxx:273
 TProfile2D.cxx:274
 TProfile2D.cxx:275
 TProfile2D.cxx:276
 TProfile2D.cxx:277
 TProfile2D.cxx:278
 TProfile2D.cxx:279
 TProfile2D.cxx:280
 TProfile2D.cxx:281
 TProfile2D.cxx:282
 TProfile2D.cxx:283
 TProfile2D.cxx:284
 TProfile2D.cxx:285
 TProfile2D.cxx:286
 TProfile2D.cxx:287
 TProfile2D.cxx:288
 TProfile2D.cxx:289
 TProfile2D.cxx:290
 TProfile2D.cxx:291
 TProfile2D.cxx:292
 TProfile2D.cxx:293
 TProfile2D.cxx:294
 TProfile2D.cxx:295
 TProfile2D.cxx:296
 TProfile2D.cxx:297
 TProfile2D.cxx:298
 TProfile2D.cxx:299
 TProfile2D.cxx:300
 TProfile2D.cxx:301
 TProfile2D.cxx:302
 TProfile2D.cxx:303
 TProfile2D.cxx:304
 TProfile2D.cxx:305
 TProfile2D.cxx:306
 TProfile2D.cxx:307
 TProfile2D.cxx:308
 TProfile2D.cxx:309
 TProfile2D.cxx:310
 TProfile2D.cxx:311
 TProfile2D.cxx:312
 TProfile2D.cxx:313
 TProfile2D.cxx:314
 TProfile2D.cxx:315
 TProfile2D.cxx:316
 TProfile2D.cxx:317
 TProfile2D.cxx:318
 TProfile2D.cxx:319
 TProfile2D.cxx:320
 TProfile2D.cxx:321
 TProfile2D.cxx:322
 TProfile2D.cxx:323
 TProfile2D.cxx:324
 TProfile2D.cxx:325
 TProfile2D.cxx:326
 TProfile2D.cxx:327
 TProfile2D.cxx:328
 TProfile2D.cxx:329
 TProfile2D.cxx:330
 TProfile2D.cxx:331
 TProfile2D.cxx:332
 TProfile2D.cxx:333
 TProfile2D.cxx:334
 TProfile2D.cxx:335
 TProfile2D.cxx:336
 TProfile2D.cxx:337
 TProfile2D.cxx:338
 TProfile2D.cxx:339
 TProfile2D.cxx:340
 TProfile2D.cxx:341
 TProfile2D.cxx:342
 TProfile2D.cxx:343
 TProfile2D.cxx:344
 TProfile2D.cxx:345
 TProfile2D.cxx:346
 TProfile2D.cxx:347
 TProfile2D.cxx:348
 TProfile2D.cxx:349
 TProfile2D.cxx:350
 TProfile2D.cxx:351
 TProfile2D.cxx:352
 TProfile2D.cxx:353
 TProfile2D.cxx:354
 TProfile2D.cxx:355
 TProfile2D.cxx:356
 TProfile2D.cxx:357
 TProfile2D.cxx:358
 TProfile2D.cxx:359
 TProfile2D.cxx:360
 TProfile2D.cxx:361
 TProfile2D.cxx:362
 TProfile2D.cxx:363
 TProfile2D.cxx:364
 TProfile2D.cxx:365
 TProfile2D.cxx:366
 TProfile2D.cxx:367
 TProfile2D.cxx:368
 TProfile2D.cxx:369
 TProfile2D.cxx:370
 TProfile2D.cxx:371
 TProfile2D.cxx:372
 TProfile2D.cxx:373
 TProfile2D.cxx:374
 TProfile2D.cxx:375
 TProfile2D.cxx:376
 TProfile2D.cxx:377
 TProfile2D.cxx:378
 TProfile2D.cxx:379
 TProfile2D.cxx:380
 TProfile2D.cxx:381
 TProfile2D.cxx:382
 TProfile2D.cxx:383
 TProfile2D.cxx:384
 TProfile2D.cxx:385
 TProfile2D.cxx:386
 TProfile2D.cxx:387
 TProfile2D.cxx:388
 TProfile2D.cxx:389
 TProfile2D.cxx:390
 TProfile2D.cxx:391
 TProfile2D.cxx:392
 TProfile2D.cxx:393
 TProfile2D.cxx:394
 TProfile2D.cxx:395
 TProfile2D.cxx:396
 TProfile2D.cxx:397
 TProfile2D.cxx:398
 TProfile2D.cxx:399
 TProfile2D.cxx:400
 TProfile2D.cxx:401
 TProfile2D.cxx:402
 TProfile2D.cxx:403
 TProfile2D.cxx:404
 TProfile2D.cxx:405
 TProfile2D.cxx:406
 TProfile2D.cxx:407
 TProfile2D.cxx:408
 TProfile2D.cxx:409
 TProfile2D.cxx:410
 TProfile2D.cxx:411
 TProfile2D.cxx:412
 TProfile2D.cxx:413
 TProfile2D.cxx:414
 TProfile2D.cxx:415
 TProfile2D.cxx:416
 TProfile2D.cxx:417
 TProfile2D.cxx:418
 TProfile2D.cxx:419
 TProfile2D.cxx:420
 TProfile2D.cxx:421
 TProfile2D.cxx:422
 TProfile2D.cxx:423
 TProfile2D.cxx:424
 TProfile2D.cxx:425
 TProfile2D.cxx:426
 TProfile2D.cxx:427
 TProfile2D.cxx:428
 TProfile2D.cxx:429
 TProfile2D.cxx:430
 TProfile2D.cxx:431
 TProfile2D.cxx:432
 TProfile2D.cxx:433
 TProfile2D.cxx:434
 TProfile2D.cxx:435
 TProfile2D.cxx:436
 TProfile2D.cxx:437
 TProfile2D.cxx:438
 TProfile2D.cxx:439
 TProfile2D.cxx:440
 TProfile2D.cxx:441
 TProfile2D.cxx:442
 TProfile2D.cxx:443
 TProfile2D.cxx:444
 TProfile2D.cxx:445
 TProfile2D.cxx:446
 TProfile2D.cxx:447
 TProfile2D.cxx:448
 TProfile2D.cxx:449
 TProfile2D.cxx:450
 TProfile2D.cxx:451
 TProfile2D.cxx:452
 TProfile2D.cxx:453
 TProfile2D.cxx:454
 TProfile2D.cxx:455
 TProfile2D.cxx:456
 TProfile2D.cxx:457
 TProfile2D.cxx:458
 TProfile2D.cxx:459
 TProfile2D.cxx:460
 TProfile2D.cxx:461
 TProfile2D.cxx:462
 TProfile2D.cxx:463
 TProfile2D.cxx:464
 TProfile2D.cxx:465
 TProfile2D.cxx:466
 TProfile2D.cxx:467
 TProfile2D.cxx:468
 TProfile2D.cxx:469
 TProfile2D.cxx:470
 TProfile2D.cxx:471
 TProfile2D.cxx:472
 TProfile2D.cxx:473
 TProfile2D.cxx:474
 TProfile2D.cxx:475
 TProfile2D.cxx:476
 TProfile2D.cxx:477
 TProfile2D.cxx:478
 TProfile2D.cxx:479
 TProfile2D.cxx:480
 TProfile2D.cxx:481
 TProfile2D.cxx:482
 TProfile2D.cxx:483
 TProfile2D.cxx:484
 TProfile2D.cxx:485
 TProfile2D.cxx:486
 TProfile2D.cxx:487
 TProfile2D.cxx:488
 TProfile2D.cxx:489
 TProfile2D.cxx:490
 TProfile2D.cxx:491
 TProfile2D.cxx:492
 TProfile2D.cxx:493
 TProfile2D.cxx:494
 TProfile2D.cxx:495
 TProfile2D.cxx:496
 TProfile2D.cxx:497
 TProfile2D.cxx:498
 TProfile2D.cxx:499
 TProfile2D.cxx:500
 TProfile2D.cxx:501
 TProfile2D.cxx:502
 TProfile2D.cxx:503
 TProfile2D.cxx:504
 TProfile2D.cxx:505
 TProfile2D.cxx:506
 TProfile2D.cxx:507
 TProfile2D.cxx:508
 TProfile2D.cxx:509
 TProfile2D.cxx:510
 TProfile2D.cxx:511
 TProfile2D.cxx:512
 TProfile2D.cxx:513
 TProfile2D.cxx:514
 TProfile2D.cxx:515
 TProfile2D.cxx:516
 TProfile2D.cxx:517
 TProfile2D.cxx:518
 TProfile2D.cxx:519
 TProfile2D.cxx:520
 TProfile2D.cxx:521
 TProfile2D.cxx:522
 TProfile2D.cxx:523
 TProfile2D.cxx:524
 TProfile2D.cxx:525
 TProfile2D.cxx:526
 TProfile2D.cxx:527
 TProfile2D.cxx:528
 TProfile2D.cxx:529
 TProfile2D.cxx:530
 TProfile2D.cxx:531
 TProfile2D.cxx:532
 TProfile2D.cxx:533
 TProfile2D.cxx:534
 TProfile2D.cxx:535
 TProfile2D.cxx:536
 TProfile2D.cxx:537
 TProfile2D.cxx:538
 TProfile2D.cxx:539
 TProfile2D.cxx:540
 TProfile2D.cxx:541
 TProfile2D.cxx:542
 TProfile2D.cxx:543
 TProfile2D.cxx:544
 TProfile2D.cxx:545
 TProfile2D.cxx:546
 TProfile2D.cxx:547
 TProfile2D.cxx:548
 TProfile2D.cxx:549
 TProfile2D.cxx:550
 TProfile2D.cxx:551
 TProfile2D.cxx:552
 TProfile2D.cxx:553
 TProfile2D.cxx:554
 TProfile2D.cxx:555
 TProfile2D.cxx:556
 TProfile2D.cxx:557
 TProfile2D.cxx:558
 TProfile2D.cxx:559
 TProfile2D.cxx:560
 TProfile2D.cxx:561
 TProfile2D.cxx:562
 TProfile2D.cxx:563
 TProfile2D.cxx:564
 TProfile2D.cxx:565
 TProfile2D.cxx:566
 TProfile2D.cxx:567
 TProfile2D.cxx:568
 TProfile2D.cxx:569
 TProfile2D.cxx:570
 TProfile2D.cxx:571
 TProfile2D.cxx:572
 TProfile2D.cxx:573
 TProfile2D.cxx:574
 TProfile2D.cxx:575
 TProfile2D.cxx:576
 TProfile2D.cxx:577
 TProfile2D.cxx:578
 TProfile2D.cxx:579
 TProfile2D.cxx:580
 TProfile2D.cxx:581
 TProfile2D.cxx:582
 TProfile2D.cxx:583
 TProfile2D.cxx:584
 TProfile2D.cxx:585
 TProfile2D.cxx:586
 TProfile2D.cxx:587
 TProfile2D.cxx:588
 TProfile2D.cxx:589
 TProfile2D.cxx:590
 TProfile2D.cxx:591
 TProfile2D.cxx:592
 TProfile2D.cxx:593
 TProfile2D.cxx:594
 TProfile2D.cxx:595
 TProfile2D.cxx:596
 TProfile2D.cxx:597
 TProfile2D.cxx:598
 TProfile2D.cxx:599
 TProfile2D.cxx:600
 TProfile2D.cxx:601
 TProfile2D.cxx:602
 TProfile2D.cxx:603
 TProfile2D.cxx:604
 TProfile2D.cxx:605
 TProfile2D.cxx:606
 TProfile2D.cxx:607
 TProfile2D.cxx:608
 TProfile2D.cxx:609
 TProfile2D.cxx:610
 TProfile2D.cxx:611
 TProfile2D.cxx:612
 TProfile2D.cxx:613
 TProfile2D.cxx:614
 TProfile2D.cxx:615
 TProfile2D.cxx:616
 TProfile2D.cxx:617
 TProfile2D.cxx:618
 TProfile2D.cxx:619
 TProfile2D.cxx:620
 TProfile2D.cxx:621
 TProfile2D.cxx:622
 TProfile2D.cxx:623
 TProfile2D.cxx:624
 TProfile2D.cxx:625
 TProfile2D.cxx:626
 TProfile2D.cxx:627
 TProfile2D.cxx:628
 TProfile2D.cxx:629
 TProfile2D.cxx:630
 TProfile2D.cxx:631
 TProfile2D.cxx:632
 TProfile2D.cxx:633
 TProfile2D.cxx:634
 TProfile2D.cxx:635
 TProfile2D.cxx:636
 TProfile2D.cxx:637
 TProfile2D.cxx:638
 TProfile2D.cxx:639
 TProfile2D.cxx:640
 TProfile2D.cxx:641
 TProfile2D.cxx:642
 TProfile2D.cxx:643
 TProfile2D.cxx:644
 TProfile2D.cxx:645
 TProfile2D.cxx:646
 TProfile2D.cxx:647
 TProfile2D.cxx:648
 TProfile2D.cxx:649
 TProfile2D.cxx:650
 TProfile2D.cxx:651
 TProfile2D.cxx:652
 TProfile2D.cxx:653
 TProfile2D.cxx:654
 TProfile2D.cxx:655
 TProfile2D.cxx:656
 TProfile2D.cxx:657
 TProfile2D.cxx:658
 TProfile2D.cxx:659
 TProfile2D.cxx:660
 TProfile2D.cxx:661
 TProfile2D.cxx:662
 TProfile2D.cxx:663
 TProfile2D.cxx:664
 TProfile2D.cxx:665
 TProfile2D.cxx:666
 TProfile2D.cxx:667
 TProfile2D.cxx:668
 TProfile2D.cxx:669
 TProfile2D.cxx:670
 TProfile2D.cxx:671
 TProfile2D.cxx:672
 TProfile2D.cxx:673
 TProfile2D.cxx:674
 TProfile2D.cxx:675
 TProfile2D.cxx:676
 TProfile2D.cxx:677
 TProfile2D.cxx:678
 TProfile2D.cxx:679
 TProfile2D.cxx:680
 TProfile2D.cxx:681
 TProfile2D.cxx:682
 TProfile2D.cxx:683
 TProfile2D.cxx:684
 TProfile2D.cxx:685
 TProfile2D.cxx:686
 TProfile2D.cxx:687
 TProfile2D.cxx:688
 TProfile2D.cxx:689
 TProfile2D.cxx:690
 TProfile2D.cxx:691
 TProfile2D.cxx:692
 TProfile2D.cxx:693
 TProfile2D.cxx:694
 TProfile2D.cxx:695
 TProfile2D.cxx:696
 TProfile2D.cxx:697
 TProfile2D.cxx:698
 TProfile2D.cxx:699
 TProfile2D.cxx:700
 TProfile2D.cxx:701
 TProfile2D.cxx:702
 TProfile2D.cxx:703
 TProfile2D.cxx:704
 TProfile2D.cxx:705
 TProfile2D.cxx:706
 TProfile2D.cxx:707
 TProfile2D.cxx:708
 TProfile2D.cxx:709
 TProfile2D.cxx:710
 TProfile2D.cxx:711
 TProfile2D.cxx:712
 TProfile2D.cxx:713
 TProfile2D.cxx:714
 TProfile2D.cxx:715
 TProfile2D.cxx:716
 TProfile2D.cxx:717
 TProfile2D.cxx:718
 TProfile2D.cxx:719
 TProfile2D.cxx:720
 TProfile2D.cxx:721
 TProfile2D.cxx:722
 TProfile2D.cxx:723
 TProfile2D.cxx:724
 TProfile2D.cxx:725
 TProfile2D.cxx:726
 TProfile2D.cxx:727
 TProfile2D.cxx:728
 TProfile2D.cxx:729
 TProfile2D.cxx:730
 TProfile2D.cxx:731
 TProfile2D.cxx:732
 TProfile2D.cxx:733
 TProfile2D.cxx:734
 TProfile2D.cxx:735
 TProfile2D.cxx:736
 TProfile2D.cxx:737
 TProfile2D.cxx:738
 TProfile2D.cxx:739
 TProfile2D.cxx:740
 TProfile2D.cxx:741
 TProfile2D.cxx:742
 TProfile2D.cxx:743
 TProfile2D.cxx:744
 TProfile2D.cxx:745
 TProfile2D.cxx:746
 TProfile2D.cxx:747
 TProfile2D.cxx:748
 TProfile2D.cxx:749
 TProfile2D.cxx:750
 TProfile2D.cxx:751
 TProfile2D.cxx:752
 TProfile2D.cxx:753
 TProfile2D.cxx:754
 TProfile2D.cxx:755
 TProfile2D.cxx:756
 TProfile2D.cxx:757
 TProfile2D.cxx:758
 TProfile2D.cxx:759
 TProfile2D.cxx:760
 TProfile2D.cxx:761
 TProfile2D.cxx:762
 TProfile2D.cxx:763
 TProfile2D.cxx:764
 TProfile2D.cxx:765
 TProfile2D.cxx:766
 TProfile2D.cxx:767
 TProfile2D.cxx:768
 TProfile2D.cxx:769
 TProfile2D.cxx:770
 TProfile2D.cxx:771
 TProfile2D.cxx:772
 TProfile2D.cxx:773
 TProfile2D.cxx:774
 TProfile2D.cxx:775
 TProfile2D.cxx:776
 TProfile2D.cxx:777
 TProfile2D.cxx:778
 TProfile2D.cxx:779
 TProfile2D.cxx:780
 TProfile2D.cxx:781
 TProfile2D.cxx:782
 TProfile2D.cxx:783
 TProfile2D.cxx:784
 TProfile2D.cxx:785
 TProfile2D.cxx:786
 TProfile2D.cxx:787
 TProfile2D.cxx:788
 TProfile2D.cxx:789
 TProfile2D.cxx:790
 TProfile2D.cxx:791
 TProfile2D.cxx:792
 TProfile2D.cxx:793
 TProfile2D.cxx:794
 TProfile2D.cxx:795
 TProfile2D.cxx:796
 TProfile2D.cxx:797
 TProfile2D.cxx:798
 TProfile2D.cxx:799
 TProfile2D.cxx:800
 TProfile2D.cxx:801
 TProfile2D.cxx:802
 TProfile2D.cxx:803
 TProfile2D.cxx:804
 TProfile2D.cxx:805
 TProfile2D.cxx:806
 TProfile2D.cxx:807
 TProfile2D.cxx:808
 TProfile2D.cxx:809
 TProfile2D.cxx:810
 TProfile2D.cxx:811
 TProfile2D.cxx:812
 TProfile2D.cxx:813
 TProfile2D.cxx:814
 TProfile2D.cxx:815
 TProfile2D.cxx:816
 TProfile2D.cxx:817
 TProfile2D.cxx:818
 TProfile2D.cxx:819
 TProfile2D.cxx:820
 TProfile2D.cxx:821
 TProfile2D.cxx:822
 TProfile2D.cxx:823
 TProfile2D.cxx:824
 TProfile2D.cxx:825
 TProfile2D.cxx:826
 TProfile2D.cxx:827
 TProfile2D.cxx:828
 TProfile2D.cxx:829
 TProfile2D.cxx:830
 TProfile2D.cxx:831
 TProfile2D.cxx:832
 TProfile2D.cxx:833
 TProfile2D.cxx:834
 TProfile2D.cxx:835
 TProfile2D.cxx:836
 TProfile2D.cxx:837
 TProfile2D.cxx:838
 TProfile2D.cxx:839
 TProfile2D.cxx:840
 TProfile2D.cxx:841
 TProfile2D.cxx:842
 TProfile2D.cxx:843
 TProfile2D.cxx:844
 TProfile2D.cxx:845
 TProfile2D.cxx:846
 TProfile2D.cxx:847
 TProfile2D.cxx:848
 TProfile2D.cxx:849
 TProfile2D.cxx:850
 TProfile2D.cxx:851
 TProfile2D.cxx:852
 TProfile2D.cxx:853
 TProfile2D.cxx:854
 TProfile2D.cxx:855
 TProfile2D.cxx:856
 TProfile2D.cxx:857
 TProfile2D.cxx:858
 TProfile2D.cxx:859
 TProfile2D.cxx:860
 TProfile2D.cxx:861
 TProfile2D.cxx:862
 TProfile2D.cxx:863
 TProfile2D.cxx:864
 TProfile2D.cxx:865
 TProfile2D.cxx:866
 TProfile2D.cxx:867
 TProfile2D.cxx:868
 TProfile2D.cxx:869
 TProfile2D.cxx:870
 TProfile2D.cxx:871
 TProfile2D.cxx:872
 TProfile2D.cxx:873
 TProfile2D.cxx:874
 TProfile2D.cxx:875
 TProfile2D.cxx:876
 TProfile2D.cxx:877
 TProfile2D.cxx:878
 TProfile2D.cxx:879
 TProfile2D.cxx:880
 TProfile2D.cxx:881
 TProfile2D.cxx:882
 TProfile2D.cxx:883
 TProfile2D.cxx:884
 TProfile2D.cxx:885
 TProfile2D.cxx:886
 TProfile2D.cxx:887
 TProfile2D.cxx:888
 TProfile2D.cxx:889
 TProfile2D.cxx:890
 TProfile2D.cxx:891
 TProfile2D.cxx:892
 TProfile2D.cxx:893
 TProfile2D.cxx:894
 TProfile2D.cxx:895
 TProfile2D.cxx:896
 TProfile2D.cxx:897
 TProfile2D.cxx:898
 TProfile2D.cxx:899
 TProfile2D.cxx:900
 TProfile2D.cxx:901
 TProfile2D.cxx:902
 TProfile2D.cxx:903
 TProfile2D.cxx:904
 TProfile2D.cxx:905
 TProfile2D.cxx:906
 TProfile2D.cxx:907
 TProfile2D.cxx:908
 TProfile2D.cxx:909
 TProfile2D.cxx:910
 TProfile2D.cxx:911
 TProfile2D.cxx:912
 TProfile2D.cxx:913
 TProfile2D.cxx:914
 TProfile2D.cxx:915
 TProfile2D.cxx:916
 TProfile2D.cxx:917
 TProfile2D.cxx:918
 TProfile2D.cxx:919
 TProfile2D.cxx:920
 TProfile2D.cxx:921
 TProfile2D.cxx:922
 TProfile2D.cxx:923
 TProfile2D.cxx:924
 TProfile2D.cxx:925
 TProfile2D.cxx:926
 TProfile2D.cxx:927
 TProfile2D.cxx:928
 TProfile2D.cxx:929
 TProfile2D.cxx:930
 TProfile2D.cxx:931
 TProfile2D.cxx:932
 TProfile2D.cxx:933
 TProfile2D.cxx:934
 TProfile2D.cxx:935
 TProfile2D.cxx:936
 TProfile2D.cxx:937
 TProfile2D.cxx:938
 TProfile2D.cxx:939
 TProfile2D.cxx:940
 TProfile2D.cxx:941
 TProfile2D.cxx:942
 TProfile2D.cxx:943
 TProfile2D.cxx:944
 TProfile2D.cxx:945
 TProfile2D.cxx:946
 TProfile2D.cxx:947
 TProfile2D.cxx:948
 TProfile2D.cxx:949
 TProfile2D.cxx:950
 TProfile2D.cxx:951
 TProfile2D.cxx:952
 TProfile2D.cxx:953
 TProfile2D.cxx:954
 TProfile2D.cxx:955
 TProfile2D.cxx:956
 TProfile2D.cxx:957
 TProfile2D.cxx:958
 TProfile2D.cxx:959
 TProfile2D.cxx:960
 TProfile2D.cxx:961
 TProfile2D.cxx:962
 TProfile2D.cxx:963
 TProfile2D.cxx:964
 TProfile2D.cxx:965
 TProfile2D.cxx:966
 TProfile2D.cxx:967
 TProfile2D.cxx:968
 TProfile2D.cxx:969
 TProfile2D.cxx:970
 TProfile2D.cxx:971
 TProfile2D.cxx:972
 TProfile2D.cxx:973
 TProfile2D.cxx:974
 TProfile2D.cxx:975
 TProfile2D.cxx:976
 TProfile2D.cxx:977
 TProfile2D.cxx:978
 TProfile2D.cxx:979
 TProfile2D.cxx:980
 TProfile2D.cxx:981
 TProfile2D.cxx:982
 TProfile2D.cxx:983
 TProfile2D.cxx:984
 TProfile2D.cxx:985
 TProfile2D.cxx:986
 TProfile2D.cxx:987
 TProfile2D.cxx:988
 TProfile2D.cxx:989
 TProfile2D.cxx:990
 TProfile2D.cxx:991
 TProfile2D.cxx:992
 TProfile2D.cxx:993
 TProfile2D.cxx:994
 TProfile2D.cxx:995
 TProfile2D.cxx:996
 TProfile2D.cxx:997
 TProfile2D.cxx:998
 TProfile2D.cxx:999
 TProfile2D.cxx:1000
 TProfile2D.cxx:1001
 TProfile2D.cxx:1002
 TProfile2D.cxx:1003
 TProfile2D.cxx:1004
 TProfile2D.cxx:1005
 TProfile2D.cxx:1006
 TProfile2D.cxx:1007
 TProfile2D.cxx:1008
 TProfile2D.cxx:1009
 TProfile2D.cxx:1010
 TProfile2D.cxx:1011
 TProfile2D.cxx:1012
 TProfile2D.cxx:1013
 TProfile2D.cxx:1014
 TProfile2D.cxx:1015
 TProfile2D.cxx:1016
 TProfile2D.cxx:1017
 TProfile2D.cxx:1018
 TProfile2D.cxx:1019
 TProfile2D.cxx:1020
 TProfile2D.cxx:1021
 TProfile2D.cxx:1022
 TProfile2D.cxx:1023
 TProfile2D.cxx:1024
 TProfile2D.cxx:1025
 TProfile2D.cxx:1026
 TProfile2D.cxx:1027
 TProfile2D.cxx:1028
 TProfile2D.cxx:1029
 TProfile2D.cxx:1030
 TProfile2D.cxx:1031
 TProfile2D.cxx:1032
 TProfile2D.cxx:1033
 TProfile2D.cxx:1034
 TProfile2D.cxx:1035
 TProfile2D.cxx:1036
 TProfile2D.cxx:1037
 TProfile2D.cxx:1038
 TProfile2D.cxx:1039
 TProfile2D.cxx:1040
 TProfile2D.cxx:1041
 TProfile2D.cxx:1042
 TProfile2D.cxx:1043
 TProfile2D.cxx:1044
 TProfile2D.cxx:1045
 TProfile2D.cxx:1046
 TProfile2D.cxx:1047
 TProfile2D.cxx:1048
 TProfile2D.cxx:1049
 TProfile2D.cxx:1050
 TProfile2D.cxx:1051
 TProfile2D.cxx:1052
 TProfile2D.cxx:1053
 TProfile2D.cxx:1054
 TProfile2D.cxx:1055
 TProfile2D.cxx:1056
 TProfile2D.cxx:1057
 TProfile2D.cxx:1058
 TProfile2D.cxx:1059
 TProfile2D.cxx:1060
 TProfile2D.cxx:1061
 TProfile2D.cxx:1062
 TProfile2D.cxx:1063
 TProfile2D.cxx:1064
 TProfile2D.cxx:1065
 TProfile2D.cxx:1066
 TProfile2D.cxx:1067
 TProfile2D.cxx:1068
 TProfile2D.cxx:1069
 TProfile2D.cxx:1070
 TProfile2D.cxx:1071
 TProfile2D.cxx:1072
 TProfile2D.cxx:1073
 TProfile2D.cxx:1074
 TProfile2D.cxx:1075
 TProfile2D.cxx:1076
 TProfile2D.cxx:1077
 TProfile2D.cxx:1078
 TProfile2D.cxx:1079
 TProfile2D.cxx:1080
 TProfile2D.cxx:1081
 TProfile2D.cxx:1082
 TProfile2D.cxx:1083
 TProfile2D.cxx:1084
 TProfile2D.cxx:1085
 TProfile2D.cxx:1086
 TProfile2D.cxx:1087
 TProfile2D.cxx:1088
 TProfile2D.cxx:1089
 TProfile2D.cxx:1090
 TProfile2D.cxx:1091
 TProfile2D.cxx:1092
 TProfile2D.cxx:1093
 TProfile2D.cxx:1094
 TProfile2D.cxx:1095
 TProfile2D.cxx:1096
 TProfile2D.cxx:1097
 TProfile2D.cxx:1098
 TProfile2D.cxx:1099
 TProfile2D.cxx:1100
 TProfile2D.cxx:1101
 TProfile2D.cxx:1102
 TProfile2D.cxx:1103
 TProfile2D.cxx:1104
 TProfile2D.cxx:1105
 TProfile2D.cxx:1106
 TProfile2D.cxx:1107
 TProfile2D.cxx:1108
 TProfile2D.cxx:1109
 TProfile2D.cxx:1110
 TProfile2D.cxx:1111
 TProfile2D.cxx:1112
 TProfile2D.cxx:1113
 TProfile2D.cxx:1114
 TProfile2D.cxx:1115
 TProfile2D.cxx:1116
 TProfile2D.cxx:1117
 TProfile2D.cxx:1118
 TProfile2D.cxx:1119
 TProfile2D.cxx:1120
 TProfile2D.cxx:1121
 TProfile2D.cxx:1122
 TProfile2D.cxx:1123
 TProfile2D.cxx:1124
 TProfile2D.cxx:1125
 TProfile2D.cxx:1126
 TProfile2D.cxx:1127
 TProfile2D.cxx:1128
 TProfile2D.cxx:1129
 TProfile2D.cxx:1130
 TProfile2D.cxx:1131
 TProfile2D.cxx:1132
 TProfile2D.cxx:1133
 TProfile2D.cxx:1134
 TProfile2D.cxx:1135
 TProfile2D.cxx:1136
 TProfile2D.cxx:1137
 TProfile2D.cxx:1138
 TProfile2D.cxx:1139
 TProfile2D.cxx:1140
 TProfile2D.cxx:1141
 TProfile2D.cxx:1142
 TProfile2D.cxx:1143
 TProfile2D.cxx:1144
 TProfile2D.cxx:1145
 TProfile2D.cxx:1146
 TProfile2D.cxx:1147
 TProfile2D.cxx:1148
 TProfile2D.cxx:1149
 TProfile2D.cxx:1150
 TProfile2D.cxx:1151
 TProfile2D.cxx:1152
 TProfile2D.cxx:1153
 TProfile2D.cxx:1154
 TProfile2D.cxx:1155
 TProfile2D.cxx:1156
 TProfile2D.cxx:1157
 TProfile2D.cxx:1158
 TProfile2D.cxx:1159
 TProfile2D.cxx:1160
 TProfile2D.cxx:1161
 TProfile2D.cxx:1162
 TProfile2D.cxx:1163
 TProfile2D.cxx:1164
 TProfile2D.cxx:1165
 TProfile2D.cxx:1166
 TProfile2D.cxx:1167
 TProfile2D.cxx:1168
 TProfile2D.cxx:1169
 TProfile2D.cxx:1170
 TProfile2D.cxx:1171
 TProfile2D.cxx:1172
 TProfile2D.cxx:1173
 TProfile2D.cxx:1174
 TProfile2D.cxx:1175
 TProfile2D.cxx:1176
 TProfile2D.cxx:1177
 TProfile2D.cxx:1178
 TProfile2D.cxx:1179
 TProfile2D.cxx:1180
 TProfile2D.cxx:1181
 TProfile2D.cxx:1182
 TProfile2D.cxx:1183
 TProfile2D.cxx:1184
 TProfile2D.cxx:1185
 TProfile2D.cxx:1186
 TProfile2D.cxx:1187
 TProfile2D.cxx:1188
 TProfile2D.cxx:1189
 TProfile2D.cxx:1190
 TProfile2D.cxx:1191
 TProfile2D.cxx:1192
 TProfile2D.cxx:1193
 TProfile2D.cxx:1194
 TProfile2D.cxx:1195
 TProfile2D.cxx:1196
 TProfile2D.cxx:1197
 TProfile2D.cxx:1198
 TProfile2D.cxx:1199
 TProfile2D.cxx:1200
 TProfile2D.cxx:1201
 TProfile2D.cxx:1202
 TProfile2D.cxx:1203
 TProfile2D.cxx:1204
 TProfile2D.cxx:1205
 TProfile2D.cxx:1206
 TProfile2D.cxx:1207
 TProfile2D.cxx:1208
 TProfile2D.cxx:1209
 TProfile2D.cxx:1210
 TProfile2D.cxx:1211
 TProfile2D.cxx:1212
 TProfile2D.cxx:1213
 TProfile2D.cxx:1214
 TProfile2D.cxx:1215
 TProfile2D.cxx:1216
 TProfile2D.cxx:1217
 TProfile2D.cxx:1218
 TProfile2D.cxx:1219
 TProfile2D.cxx:1220
 TProfile2D.cxx:1221
 TProfile2D.cxx:1222
 TProfile2D.cxx:1223
 TProfile2D.cxx:1224
 TProfile2D.cxx:1225
 TProfile2D.cxx:1226
 TProfile2D.cxx:1227
 TProfile2D.cxx:1228
 TProfile2D.cxx:1229
 TProfile2D.cxx:1230
 TProfile2D.cxx:1231
 TProfile2D.cxx:1232
 TProfile2D.cxx:1233
 TProfile2D.cxx:1234
 TProfile2D.cxx:1235
 TProfile2D.cxx:1236
 TProfile2D.cxx:1237
 TProfile2D.cxx:1238
 TProfile2D.cxx:1239
 TProfile2D.cxx:1240
 TProfile2D.cxx:1241
 TProfile2D.cxx:1242
 TProfile2D.cxx:1243
 TProfile2D.cxx:1244
 TProfile2D.cxx:1245
 TProfile2D.cxx:1246
 TProfile2D.cxx:1247
 TProfile2D.cxx:1248
 TProfile2D.cxx:1249
 TProfile2D.cxx:1250
 TProfile2D.cxx:1251
 TProfile2D.cxx:1252
 TProfile2D.cxx:1253
 TProfile2D.cxx:1254
 TProfile2D.cxx:1255
 TProfile2D.cxx:1256
 TProfile2D.cxx:1257
 TProfile2D.cxx:1258
 TProfile2D.cxx:1259
 TProfile2D.cxx:1260
 TProfile2D.cxx:1261
 TProfile2D.cxx:1262
 TProfile2D.cxx:1263
 TProfile2D.cxx:1264
 TProfile2D.cxx:1265
 TProfile2D.cxx:1266
 TProfile2D.cxx:1267
 TProfile2D.cxx:1268
 TProfile2D.cxx:1269
 TProfile2D.cxx:1270
 TProfile2D.cxx:1271
 TProfile2D.cxx:1272
 TProfile2D.cxx:1273
 TProfile2D.cxx:1274
 TProfile2D.cxx:1275
 TProfile2D.cxx:1276
 TProfile2D.cxx:1277
 TProfile2D.cxx:1278
 TProfile2D.cxx:1279
 TProfile2D.cxx:1280
 TProfile2D.cxx:1281
 TProfile2D.cxx:1282
 TProfile2D.cxx:1283
 TProfile2D.cxx:1284
 TProfile2D.cxx:1285
 TProfile2D.cxx:1286
 TProfile2D.cxx:1287
 TProfile2D.cxx:1288
 TProfile2D.cxx:1289
 TProfile2D.cxx:1290
 TProfile2D.cxx:1291
 TProfile2D.cxx:1292
 TProfile2D.cxx:1293
 TProfile2D.cxx:1294
 TProfile2D.cxx:1295
 TProfile2D.cxx:1296
 TProfile2D.cxx:1297
 TProfile2D.cxx:1298
 TProfile2D.cxx:1299
 TProfile2D.cxx:1300
 TProfile2D.cxx:1301
 TProfile2D.cxx:1302
 TProfile2D.cxx:1303
 TProfile2D.cxx:1304
 TProfile2D.cxx:1305
 TProfile2D.cxx:1306
 TProfile2D.cxx:1307
 TProfile2D.cxx:1308
 TProfile2D.cxx:1309
 TProfile2D.cxx:1310
 TProfile2D.cxx:1311
 TProfile2D.cxx:1312
 TProfile2D.cxx:1313
 TProfile2D.cxx:1314
 TProfile2D.cxx:1315
 TProfile2D.cxx:1316
 TProfile2D.cxx:1317
 TProfile2D.cxx:1318
 TProfile2D.cxx:1319
 TProfile2D.cxx:1320
 TProfile2D.cxx:1321
 TProfile2D.cxx:1322
 TProfile2D.cxx:1323
 TProfile2D.cxx:1324
 TProfile2D.cxx:1325
 TProfile2D.cxx:1326
 TProfile2D.cxx:1327
 TProfile2D.cxx:1328
 TProfile2D.cxx:1329
 TProfile2D.cxx:1330
 TProfile2D.cxx:1331
 TProfile2D.cxx:1332
 TProfile2D.cxx:1333
 TProfile2D.cxx:1334
 TProfile2D.cxx:1335
 TProfile2D.cxx:1336
 TProfile2D.cxx:1337
 TProfile2D.cxx:1338
 TProfile2D.cxx:1339
 TProfile2D.cxx:1340
 TProfile2D.cxx:1341
 TProfile2D.cxx:1342
 TProfile2D.cxx:1343
 TProfile2D.cxx:1344
 TProfile2D.cxx:1345
 TProfile2D.cxx:1346
 TProfile2D.cxx:1347
 TProfile2D.cxx:1348
 TProfile2D.cxx:1349
 TProfile2D.cxx:1350
 TProfile2D.cxx:1351
 TProfile2D.cxx:1352
 TProfile2D.cxx:1353
 TProfile2D.cxx:1354
 TProfile2D.cxx:1355
 TProfile2D.cxx:1356
 TProfile2D.cxx:1357
 TProfile2D.cxx:1358
 TProfile2D.cxx:1359
 TProfile2D.cxx:1360
 TProfile2D.cxx:1361
 TProfile2D.cxx:1362
 TProfile2D.cxx:1363
 TProfile2D.cxx:1364
 TProfile2D.cxx:1365
 TProfile2D.cxx:1366
 TProfile2D.cxx:1367
 TProfile2D.cxx:1368
 TProfile2D.cxx:1369
 TProfile2D.cxx:1370
 TProfile2D.cxx:1371
 TProfile2D.cxx:1372
 TProfile2D.cxx:1373
 TProfile2D.cxx:1374
 TProfile2D.cxx:1375
 TProfile2D.cxx:1376
 TProfile2D.cxx:1377
 TProfile2D.cxx:1378
 TProfile2D.cxx:1379
 TProfile2D.cxx:1380
 TProfile2D.cxx:1381
 TProfile2D.cxx:1382
 TProfile2D.cxx:1383
 TProfile2D.cxx:1384
 TProfile2D.cxx:1385
 TProfile2D.cxx:1386
 TProfile2D.cxx:1387
 TProfile2D.cxx:1388
 TProfile2D.cxx:1389
 TProfile2D.cxx:1390
 TProfile2D.cxx:1391
 TProfile2D.cxx:1392
 TProfile2D.cxx:1393
 TProfile2D.cxx:1394
 TProfile2D.cxx:1395
 TProfile2D.cxx:1396
 TProfile2D.cxx:1397
 TProfile2D.cxx:1398
 TProfile2D.cxx:1399
 TProfile2D.cxx:1400
 TProfile2D.cxx:1401
 TProfile2D.cxx:1402
 TProfile2D.cxx:1403
 TProfile2D.cxx:1404
 TProfile2D.cxx:1405
 TProfile2D.cxx:1406
 TProfile2D.cxx:1407
 TProfile2D.cxx:1408
 TProfile2D.cxx:1409
 TProfile2D.cxx:1410
 TProfile2D.cxx:1411
 TProfile2D.cxx:1412
 TProfile2D.cxx:1413
 TProfile2D.cxx:1414
 TProfile2D.cxx:1415
 TProfile2D.cxx:1416
 TProfile2D.cxx:1417
 TProfile2D.cxx:1418
 TProfile2D.cxx:1419
 TProfile2D.cxx:1420
 TProfile2D.cxx:1421
 TProfile2D.cxx:1422
 TProfile2D.cxx:1423
 TProfile2D.cxx:1424
 TProfile2D.cxx:1425
 TProfile2D.cxx:1426
 TProfile2D.cxx:1427
 TProfile2D.cxx:1428
 TProfile2D.cxx:1429
 TProfile2D.cxx:1430
 TProfile2D.cxx:1431
 TProfile2D.cxx:1432
 TProfile2D.cxx:1433
 TProfile2D.cxx:1434
 TProfile2D.cxx:1435
 TProfile2D.cxx:1436
 TProfile2D.cxx:1437
 TProfile2D.cxx:1438
 TProfile2D.cxx:1439
 TProfile2D.cxx:1440
 TProfile2D.cxx:1441
 TProfile2D.cxx:1442
 TProfile2D.cxx:1443
 TProfile2D.cxx:1444
 TProfile2D.cxx:1445
 TProfile2D.cxx:1446
 TProfile2D.cxx:1447
 TProfile2D.cxx:1448
 TProfile2D.cxx:1449
 TProfile2D.cxx:1450
 TProfile2D.cxx:1451
 TProfile2D.cxx:1452
 TProfile2D.cxx:1453
 TProfile2D.cxx:1454
 TProfile2D.cxx:1455
 TProfile2D.cxx:1456
 TProfile2D.cxx:1457
 TProfile2D.cxx:1458
 TProfile2D.cxx:1459
 TProfile2D.cxx:1460
 TProfile2D.cxx:1461
 TProfile2D.cxx:1462
 TProfile2D.cxx:1463
 TProfile2D.cxx:1464
 TProfile2D.cxx:1465
 TProfile2D.cxx:1466
 TProfile2D.cxx:1467
 TProfile2D.cxx:1468
 TProfile2D.cxx:1469
 TProfile2D.cxx:1470
 TProfile2D.cxx:1471
 TProfile2D.cxx:1472
 TProfile2D.cxx:1473
 TProfile2D.cxx:1474
 TProfile2D.cxx:1475
 TProfile2D.cxx:1476
 TProfile2D.cxx:1477
 TProfile2D.cxx:1478
 TProfile2D.cxx:1479
 TProfile2D.cxx:1480
 TProfile2D.cxx:1481
 TProfile2D.cxx:1482
 TProfile2D.cxx:1483
 TProfile2D.cxx:1484
 TProfile2D.cxx:1485
 TProfile2D.cxx:1486
 TProfile2D.cxx:1487
 TProfile2D.cxx:1488
 TProfile2D.cxx:1489
 TProfile2D.cxx:1490
 TProfile2D.cxx:1491
 TProfile2D.cxx:1492
 TProfile2D.cxx:1493
 TProfile2D.cxx:1494
 TProfile2D.cxx:1495
 TProfile2D.cxx:1496
 TProfile2D.cxx:1497
 TProfile2D.cxx:1498
 TProfile2D.cxx:1499
 TProfile2D.cxx:1500
 TProfile2D.cxx:1501
 TProfile2D.cxx:1502
 TProfile2D.cxx:1503
 TProfile2D.cxx:1504
 TProfile2D.cxx:1505
 TProfile2D.cxx:1506
 TProfile2D.cxx:1507
 TProfile2D.cxx:1508
 TProfile2D.cxx:1509
 TProfile2D.cxx:1510
 TProfile2D.cxx:1511
 TProfile2D.cxx:1512
 TProfile2D.cxx:1513
 TProfile2D.cxx:1514
 TProfile2D.cxx:1515
 TProfile2D.cxx:1516
 TProfile2D.cxx:1517
 TProfile2D.cxx:1518
 TProfile2D.cxx:1519
 TProfile2D.cxx:1520
 TProfile2D.cxx:1521
 TProfile2D.cxx:1522
 TProfile2D.cxx:1523
 TProfile2D.cxx:1524
 TProfile2D.cxx:1525
 TProfile2D.cxx:1526
 TProfile2D.cxx:1527
 TProfile2D.cxx:1528
 TProfile2D.cxx:1529
 TProfile2D.cxx:1530
 TProfile2D.cxx:1531
 TProfile2D.cxx:1532
 TProfile2D.cxx:1533
 TProfile2D.cxx:1534
 TProfile2D.cxx:1535
 TProfile2D.cxx:1536
 TProfile2D.cxx:1537
 TProfile2D.cxx:1538
 TProfile2D.cxx:1539
 TProfile2D.cxx:1540
 TProfile2D.cxx:1541
 TProfile2D.cxx:1542
 TProfile2D.cxx:1543
 TProfile2D.cxx:1544
 TProfile2D.cxx:1545
 TProfile2D.cxx:1546
 TProfile2D.cxx:1547
 TProfile2D.cxx:1548
 TProfile2D.cxx:1549
 TProfile2D.cxx:1550
 TProfile2D.cxx:1551
 TProfile2D.cxx:1552
 TProfile2D.cxx:1553
 TProfile2D.cxx:1554
 TProfile2D.cxx:1555
 TProfile2D.cxx:1556
 TProfile2D.cxx:1557
 TProfile2D.cxx:1558
 TProfile2D.cxx:1559
 TProfile2D.cxx:1560
 TProfile2D.cxx:1561
 TProfile2D.cxx:1562
 TProfile2D.cxx:1563
 TProfile2D.cxx:1564
 TProfile2D.cxx:1565
 TProfile2D.cxx:1566
 TProfile2D.cxx:1567
 TProfile2D.cxx:1568
 TProfile2D.cxx:1569
 TProfile2D.cxx:1570
 TProfile2D.cxx:1571
 TProfile2D.cxx:1572
 TProfile2D.cxx:1573
 TProfile2D.cxx:1574
 TProfile2D.cxx:1575
 TProfile2D.cxx:1576
 TProfile2D.cxx:1577
 TProfile2D.cxx:1578
 TProfile2D.cxx:1579
 TProfile2D.cxx:1580
 TProfile2D.cxx:1581
 TProfile2D.cxx:1582
 TProfile2D.cxx:1583
 TProfile2D.cxx:1584
 TProfile2D.cxx:1585
 TProfile2D.cxx:1586
 TProfile2D.cxx:1587
 TProfile2D.cxx:1588
 TProfile2D.cxx:1589
 TProfile2D.cxx:1590
 TProfile2D.cxx:1591
 TProfile2D.cxx:1592
 TProfile2D.cxx:1593
 TProfile2D.cxx:1594
 TProfile2D.cxx:1595
 TProfile2D.cxx:1596
 TProfile2D.cxx:1597
 TProfile2D.cxx:1598
 TProfile2D.cxx:1599
 TProfile2D.cxx:1600
 TProfile2D.cxx:1601
 TProfile2D.cxx:1602
 TProfile2D.cxx:1603
 TProfile2D.cxx:1604
 TProfile2D.cxx:1605
 TProfile2D.cxx:1606
 TProfile2D.cxx:1607
 TProfile2D.cxx:1608
 TProfile2D.cxx:1609
 TProfile2D.cxx:1610
 TProfile2D.cxx:1611
 TProfile2D.cxx:1612
 TProfile2D.cxx:1613
 TProfile2D.cxx:1614
 TProfile2D.cxx:1615
 TProfile2D.cxx:1616
 TProfile2D.cxx:1617
 TProfile2D.cxx:1618
 TProfile2D.cxx:1619
 TProfile2D.cxx:1620
 TProfile2D.cxx:1621
 TProfile2D.cxx:1622
 TProfile2D.cxx:1623
 TProfile2D.cxx:1624
 TProfile2D.cxx:1625
 TProfile2D.cxx:1626
 TProfile2D.cxx:1627
 TProfile2D.cxx:1628
 TProfile2D.cxx:1629
 TProfile2D.cxx:1630
 TProfile2D.cxx:1631
 TProfile2D.cxx:1632
 TProfile2D.cxx:1633
 TProfile2D.cxx:1634
 TProfile2D.cxx:1635
 TProfile2D.cxx:1636
 TProfile2D.cxx:1637
 TProfile2D.cxx:1638
 TProfile2D.cxx:1639
 TProfile2D.cxx:1640
 TProfile2D.cxx:1641
 TProfile2D.cxx:1642
 TProfile2D.cxx:1643
 TProfile2D.cxx:1644
 TProfile2D.cxx:1645
 TProfile2D.cxx:1646
 TProfile2D.cxx:1647
 TProfile2D.cxx:1648
 TProfile2D.cxx:1649
 TProfile2D.cxx:1650
 TProfile2D.cxx:1651
 TProfile2D.cxx:1652
 TProfile2D.cxx:1653
 TProfile2D.cxx:1654
 TProfile2D.cxx:1655
 TProfile2D.cxx:1656
 TProfile2D.cxx:1657
 TProfile2D.cxx:1658
 TProfile2D.cxx:1659
 TProfile2D.cxx:1660
 TProfile2D.cxx:1661
 TProfile2D.cxx:1662
 TProfile2D.cxx:1663
 TProfile2D.cxx:1664
 TProfile2D.cxx:1665
 TProfile2D.cxx:1666
 TProfile2D.cxx:1667
 TProfile2D.cxx:1668
 TProfile2D.cxx:1669
 TProfile2D.cxx:1670
 TProfile2D.cxx:1671
 TProfile2D.cxx:1672
 TProfile2D.cxx:1673
 TProfile2D.cxx:1674
 TProfile2D.cxx:1675
 TProfile2D.cxx:1676
 TProfile2D.cxx:1677
 TProfile2D.cxx:1678
 TProfile2D.cxx:1679
 TProfile2D.cxx:1680
 TProfile2D.cxx:1681
 TProfile2D.cxx:1682
 TProfile2D.cxx:1683
 TProfile2D.cxx:1684
 TProfile2D.cxx:1685
 TProfile2D.cxx:1686
 TProfile2D.cxx:1687
 TProfile2D.cxx:1688
 TProfile2D.cxx:1689
 TProfile2D.cxx:1690
 TProfile2D.cxx:1691
 TProfile2D.cxx:1692
 TProfile2D.cxx:1693
 TProfile2D.cxx:1694
 TProfile2D.cxx:1695
 TProfile2D.cxx:1696
 TProfile2D.cxx:1697
 TProfile2D.cxx:1698
 TProfile2D.cxx:1699
 TProfile2D.cxx:1700
 TProfile2D.cxx:1701
 TProfile2D.cxx:1702
 TProfile2D.cxx:1703
 TProfile2D.cxx:1704
 TProfile2D.cxx:1705
 TProfile2D.cxx:1706
 TProfile2D.cxx:1707
 TProfile2D.cxx:1708
 TProfile2D.cxx:1709
 TProfile2D.cxx:1710
 TProfile2D.cxx:1711
 TProfile2D.cxx:1712
 TProfile2D.cxx:1713
 TProfile2D.cxx:1714
 TProfile2D.cxx:1715
 TProfile2D.cxx:1716
 TProfile2D.cxx:1717
 TProfile2D.cxx:1718
 TProfile2D.cxx:1719
 TProfile2D.cxx:1720
 TProfile2D.cxx:1721
 TProfile2D.cxx:1722
 TProfile2D.cxx:1723
 TProfile2D.cxx:1724
 TProfile2D.cxx:1725
 TProfile2D.cxx:1726
 TProfile2D.cxx:1727
 TProfile2D.cxx:1728
 TProfile2D.cxx:1729
 TProfile2D.cxx:1730
 TProfile2D.cxx:1731
 TProfile2D.cxx:1732
 TProfile2D.cxx:1733
 TProfile2D.cxx:1734
 TProfile2D.cxx:1735
 TProfile2D.cxx:1736
 TProfile2D.cxx:1737
 TProfile2D.cxx:1738
 TProfile2D.cxx:1739
 TProfile2D.cxx:1740
 TProfile2D.cxx:1741
 TProfile2D.cxx:1742
 TProfile2D.cxx:1743
 TProfile2D.cxx:1744
 TProfile2D.cxx:1745
 TProfile2D.cxx:1746
 TProfile2D.cxx:1747
 TProfile2D.cxx:1748
 TProfile2D.cxx:1749
 TProfile2D.cxx:1750
 TProfile2D.cxx:1751
 TProfile2D.cxx:1752
 TProfile2D.cxx:1753
 TProfile2D.cxx:1754
 TProfile2D.cxx:1755
 TProfile2D.cxx:1756
 TProfile2D.cxx:1757
 TProfile2D.cxx:1758
 TProfile2D.cxx:1759
 TProfile2D.cxx:1760
 TProfile2D.cxx:1761
 TProfile2D.cxx:1762
 TProfile2D.cxx:1763
 TProfile2D.cxx:1764
 TProfile2D.cxx:1765
 TProfile2D.cxx:1766
 TProfile2D.cxx:1767
 TProfile2D.cxx:1768
 TProfile2D.cxx:1769
 TProfile2D.cxx:1770
 TProfile2D.cxx:1771
 TProfile2D.cxx:1772
 TProfile2D.cxx:1773
 TProfile2D.cxx:1774
 TProfile2D.cxx:1775
 TProfile2D.cxx:1776
 TProfile2D.cxx:1777
 TProfile2D.cxx:1778
 TProfile2D.cxx:1779
 TProfile2D.cxx:1780
 TProfile2D.cxx:1781
 TProfile2D.cxx:1782
 TProfile2D.cxx:1783
 TProfile2D.cxx:1784
 TProfile2D.cxx:1785
 TProfile2D.cxx:1786
 TProfile2D.cxx:1787
 TProfile2D.cxx:1788
 TProfile2D.cxx:1789
 TProfile2D.cxx:1790
 TProfile2D.cxx:1791
 TProfile2D.cxx:1792
 TProfile2D.cxx:1793
 TProfile2D.cxx:1794
 TProfile2D.cxx:1795
 TProfile2D.cxx:1796
 TProfile2D.cxx:1797
 TProfile2D.cxx:1798
 TProfile2D.cxx:1799
 TProfile2D.cxx:1800
 TProfile2D.cxx:1801
 TProfile2D.cxx:1802
 TProfile2D.cxx:1803
 TProfile2D.cxx:1804
 TProfile2D.cxx:1805
 TProfile2D.cxx:1806
 TProfile2D.cxx:1807
 TProfile2D.cxx:1808
 TProfile2D.cxx:1809
 TProfile2D.cxx:1810
 TProfile2D.cxx:1811
 TProfile2D.cxx:1812
 TProfile2D.cxx:1813
 TProfile2D.cxx:1814
 TProfile2D.cxx:1815
 TProfile2D.cxx:1816
 TProfile2D.cxx:1817
 TProfile2D.cxx:1818
 TProfile2D.cxx:1819
 TProfile2D.cxx:1820
 TProfile2D.cxx:1821
 TProfile2D.cxx:1822
 TProfile2D.cxx:1823
 TProfile2D.cxx:1824
 TProfile2D.cxx:1825
 TProfile2D.cxx:1826
 TProfile2D.cxx:1827
 TProfile2D.cxx:1828
 TProfile2D.cxx:1829
 TProfile2D.cxx:1830
 TProfile2D.cxx:1831
 TProfile2D.cxx:1832
 TProfile2D.cxx:1833
 TProfile2D.cxx:1834
 TProfile2D.cxx:1835
 TProfile2D.cxx:1836
 TProfile2D.cxx:1837
 TProfile2D.cxx:1838
 TProfile2D.cxx:1839
 TProfile2D.cxx:1840
 TProfile2D.cxx:1841
 TProfile2D.cxx:1842
 TProfile2D.cxx:1843
 TProfile2D.cxx:1844
 TProfile2D.cxx:1845
 TProfile2D.cxx:1846
 TProfile2D.cxx:1847
 TProfile2D.cxx:1848
 TProfile2D.cxx:1849
 TProfile2D.cxx:1850
 TProfile2D.cxx:1851
 TProfile2D.cxx:1852
 TProfile2D.cxx:1853
 TProfile2D.cxx:1854
 TProfile2D.cxx:1855
 TProfile2D.cxx:1856
 TProfile2D.cxx:1857
 TProfile2D.cxx:1858
 TProfile2D.cxx:1859
 TProfile2D.cxx:1860
 TProfile2D.cxx:1861
 TProfile2D.cxx:1862
 TProfile2D.cxx:1863
 TProfile2D.cxx:1864
 TProfile2D.cxx:1865
 TProfile2D.cxx:1866
 TProfile2D.cxx:1867
 TProfile2D.cxx:1868
 TProfile2D.cxx:1869
 TProfile2D.cxx:1870
 TProfile2D.cxx:1871
 TProfile2D.cxx:1872
 TProfile2D.cxx:1873
 TProfile2D.cxx:1874
 TProfile2D.cxx:1875
 TProfile2D.cxx:1876
 TProfile2D.cxx:1877
 TProfile2D.cxx:1878
 TProfile2D.cxx:1879
 TProfile2D.cxx:1880
 TProfile2D.cxx:1881
 TProfile2D.cxx:1882
 TProfile2D.cxx:1883
 TProfile2D.cxx:1884
 TProfile2D.cxx:1885
 TProfile2D.cxx:1886
 TProfile2D.cxx:1887
 TProfile2D.cxx:1888
 TProfile2D.cxx:1889
 TProfile2D.cxx:1890
 TProfile2D.cxx:1891
 TProfile2D.cxx:1892
 TProfile2D.cxx:1893
 TProfile2D.cxx:1894
 TProfile2D.cxx:1895
 TProfile2D.cxx:1896
 TProfile2D.cxx:1897
 TProfile2D.cxx:1898
 TProfile2D.cxx:1899
 TProfile2D.cxx:1900
 TProfile2D.cxx:1901
 TProfile2D.cxx:1902
 TProfile2D.cxx:1903
 TProfile2D.cxx:1904
 TProfile2D.cxx:1905
 TProfile2D.cxx:1906
 TProfile2D.cxx:1907
 TProfile2D.cxx:1908
 TProfile2D.cxx:1909
 TProfile2D.cxx:1910
 TProfile2D.cxx:1911
 TProfile2D.cxx:1912
 TProfile2D.cxx:1913
 TProfile2D.cxx:1914
 TProfile2D.cxx:1915
 TProfile2D.cxx:1916
 TProfile2D.cxx:1917
 TProfile2D.cxx:1918
 TProfile2D.cxx:1919
 TProfile2D.cxx:1920
 TProfile2D.cxx:1921
 TProfile2D.cxx:1922
 TProfile2D.cxx:1923
 TProfile2D.cxx:1924
 TProfile2D.cxx:1925
 TProfile2D.cxx:1926
 TProfile2D.cxx:1927
 TProfile2D.cxx:1928
 TProfile2D.cxx:1929
 TProfile2D.cxx:1930
 TProfile2D.cxx:1931
 TProfile2D.cxx:1932
 TProfile2D.cxx:1933
 TProfile2D.cxx:1934
 TProfile2D.cxx:1935
 TProfile2D.cxx:1936
 TProfile2D.cxx:1937
 TProfile2D.cxx:1938
 TProfile2D.cxx:1939
 TProfile2D.cxx:1940
 TProfile2D.cxx:1941
 TProfile2D.cxx:1942
 TProfile2D.cxx:1943
 TProfile2D.cxx:1944
 TProfile2D.cxx:1945
 TProfile2D.cxx:1946
 TProfile2D.cxx:1947
 TProfile2D.cxx:1948
 TProfile2D.cxx:1949
 TProfile2D.cxx:1950
 TProfile2D.cxx:1951
 TProfile2D.cxx:1952
 TProfile2D.cxx:1953
 TProfile2D.cxx:1954
 TProfile2D.cxx:1955
 TProfile2D.cxx:1956
 TProfile2D.cxx:1957
 TProfile2D.cxx:1958
 TProfile2D.cxx:1959
 TProfile2D.cxx:1960
 TProfile2D.cxx:1961
 TProfile2D.cxx:1962
 TProfile2D.cxx:1963
 TProfile2D.cxx:1964
 TProfile2D.cxx:1965
 TProfile2D.cxx:1966
 TProfile2D.cxx:1967
 TProfile2D.cxx:1968
 TProfile2D.cxx:1969
 TProfile2D.cxx:1970
 TProfile2D.cxx:1971
 TProfile2D.cxx:1972
 TProfile2D.cxx:1973
 TProfile2D.cxx:1974
 TProfile2D.cxx:1975
 TProfile2D.cxx:1976