ROOT logo
// @(#)root/hist:$Id: TProfile.cxx 28988 2009-06-15 08:19:24Z moneta $
// Author: Rene Brun   29/09/95

/*************************************************************************
 * 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 "TProfile.h"
#include "TMath.h"
#include "TF1.h"
#include "THLimitsFinder.h"
#include "Riostream.h"
#include "TVirtualPad.h"
#include "TError.h"
#include "TClass.h"

#include "TProfileHelper.h"

Bool_t TProfile::fgApproximate = kFALSE;

ClassImp(TProfile)

//______________________________________________________________________________
//
//  Profile histograms are used to display the mean
//  value of Y and its RMS for each bin in X. Profile histograms are in many cases an
//  elegant replacement of two-dimensional histograms : the inter-relation of two
//  measured quantities X and Y can always be visualized by a two-dimensional
//  histogram or scatter-plot; its representation on the line-printer is not particularly
//  satisfactory, except for sparse data. If Y is an unknown (but single-valued)
//  approximate function of X, this function is displayed by a profile 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 bin J.
//
//                                                    2
//      H(J)  =  sum Y                  E(J)  =  sum Y
//      l(J)  =  sum l                  L(J)  =  sum l
//      h(J)  =  H(J)/L(J)              s(J)  =  sqrt(E(J)/L(J)- h(J)**2)
//      e(J)  =  s(J)/sqrt(L(J))
//
//  In the special case where s(J) is zero (eg, case of 1 entry only in one bin)
//  e(J) is computed from the average of the s(J) for all bins.
//  This simple/crude approximation was suggested in order to keep the bin
//  during a fit operation.
//
//           Example of a profile histogram with its graphics output
//{
//  TCanvas *c1 = new TCanvas("c1","Profile histogram example",200,10,700,500);
//  hprof  = new TProfile("hprof","Profile of pz versus px",100,-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;
//     hprof->Fill(px,pz,1);
//  }
//  hprof->Draw();
//}
//Begin_Html
/*
<img src="gif/profile.gif">
*/
//End_Html
//

//______________________________________________________________________________
TProfile::TProfile() : TH1D()
{
//*-*-*-*-*-*Default constructor for Profile histograms*-*-*-*-*-*-*-*-*
//*-*        ==========================================

   BuildOptions(0,0,"");
}

//______________________________________________________________________________
TProfile::~TProfile()
{
//*-*-*-*-*-*Default destructor for Profile histograms*-*-*-*-*-*-*-*-*
//*-*        =========================================

}

//______________________________________________________________________________
TProfile::TProfile(const char *name,const char *title,Int_t nbins,Double_t xlow,Double_t xup,Option_t *option)
    : TH1D(name,title,nbins,xlow,xup)
{
//*-*-*-*-*-*Normal Constructor for Profile histograms*-*-*-*-*-*-*-*-*-*
//*-*        ==========================================
//
//  The first five parameters are similar to TH1D::TH1D.
//  All values of y are accepted at filling time.
//  To fill a profile histogram, one must use TProfile::Fill function.
//
//  Note that when filling the profile histogram the function Fill
//  checks if the variable y is betyween fYmin and fYmax.
//  If a minimum or maximum value is set for the Y scale before filling,
//  then all values below ymin or above ymax will be discarded.
//  Setting the minimum or maximum value for the Y scale before filling
//  has the same effect as calling the special TProfile constructor below
//  where ymin and ymax are specified.
//
//  H(J) is printed as the channel contents. The errors displayed are s(J) if CHOPT='S'
//  (spread option), or e(J) if CHOPT=' ' (error on mean).
//
//        See TProfile::BuildOptions for explanation of parameters
//
// see also comments in the TH1 base class constructors

   BuildOptions(0,0,option);
   if (fgDefaultSumw2) Sumw2();    // optionally create sum of squares of weights
}

//______________________________________________________________________________
TProfile::TProfile(const char *name,const char *title,Int_t nbins,const Float_t *xbins,Option_t *option)
    : TH1D(name,title,nbins,xbins)
{
//*-*-*-*-*-*Constructor for Profile histograms with variable bin size*-*-*-*-*
//*-*        =========================================================
//
//        See TProfile::BuildOptions for more explanations on errors
//
// see also comments in the TH1 base class constructors

   BuildOptions(0,0,option);
   if (fgDefaultSumw2) Sumw2();    // optionally create sum of squares of weights
}

//______________________________________________________________________________
TProfile::TProfile(const char *name,const char *title,Int_t nbins,const Double_t *xbins,Option_t *option)
    : TH1D(name,title,nbins,xbins)
{
//*-*-*-*-*-*Constructor for Profile histograms with variable bin size*-*-*-*-*
//*-*        =========================================================
//
//        See TProfile::BuildOptions for more explanations on errors
//
// see also comments in the TH1 base class constructors

   BuildOptions(0,0,option);
   if (fgDefaultSumw2) Sumw2();    // optionally create sum of squares of weights
}

//______________________________________________________________________________
TProfile::TProfile(const char *name,const char *title,Int_t nbins,const Double_t *xbins,Double_t ylow,Double_t yup,Option_t *option)
    : TH1D(name,title,nbins,xbins)
{
//*-*-*-*-*-*Constructor for Profile histograms with variable bin size*-*-*-*-*
//*-*        =========================================================
//
//        See TProfile::BuildOptions for more explanations on errors
//
// see also comments in the TH1 base class constructors

   BuildOptions(ylow,yup,option);
   if (fgDefaultSumw2) Sumw2();    // optionally create sum of squares of weights
}

//______________________________________________________________________________
TProfile::TProfile(const char *name,const char *title,Int_t nbins,Double_t xlow,Double_t xup,Double_t ylow,Double_t yup,Option_t *option)
    : TH1D(name,title,nbins,xlow,xup)
{
//*-*-*-*-*-*Constructor for Profile histograms with range in y*-*-*-*-*-*
//*-*        ==================================================
//  The first five parameters are similar to TH1D::TH1D.
//  Only the values of Y between ylow and yup will be considered at filling time.
//  ylow and yup will also be the maximum and minimum values
//  on the y scale when drawing the profile.
//
//        See TProfile::BuildOptions for more explanations on errors
//
// see also comments in the TH1 base class constructors

   BuildOptions(ylow,yup,option);
   if (fgDefaultSumw2) Sumw2();    // optionally create sum of squares of weights
}


//______________________________________________________________________________
void TProfile::BuildOptions(Double_t ymin, Double_t ymax, Option_t *option)
{
//*-*-*-*-*-*-*Set Profile histogram structure and options*-*-*-*-*-*-*-*-*
//*-*          ===========================================
//
//    If a bin has N data points all with the same value Y (especially
//    possible when dealing with integers), the spread in Y for that bin
//    is zero, and the uncertainty assigned is also zero, and the bin is
//    ignored in making subsequent fits. If SQRT(Y) was the correct error
//    in the case above, then SQRT(Y)/SQRT(N) would be the correct error here.
//    In fact, any bin with non-zero number of entries N but with zero spread
//    should have an uncertainty SQRT(Y)/SQRT(N).
//
//    Now, is SQRT(Y)/SQRT(N) really the correct uncertainty?
//    that it is only in the case where the Y variable is some sort
//    of counting statistics, following a Poisson distribution. This should
//    probably be set as the default case. However, Y can be any variable
//    from an original NTUPLE, not necessarily distributed "Poissonly".
//    The computation of errors is based on the parameter option:
//    option:
//     ' '  (Default) Errors are Spread/SQRT(N) for Spread.ne.0. ,
//                      "     "  SQRT(Y)/SQRT(N) for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//     's'            Errors are Spread  for Spread.ne.0. ,
//                      "     "  SQRT(Y)  for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//     'i'            Errors are Spread/SQRT(N) for Spread.ne.0. ,
//                      "     "  1./SQRT(12.*N) for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//
//    The third case above corresponds to Integer Y values for which the
//    uncertainty is +-0.5, with the assumption that the probability that Y
//    takes any value between Y-0.5 and Y+0.5 is uniform (the same argument
//    goes for Y uniformly distributed between Y and Y+1); this would be
//    useful if Y is an ADC measurement, for example. 
//     Other, fancier options
//    would be possible, at the cost of adding one more parameter to the PROFILE
//    command. For example, if all Y variables are distributed according to some
//    known Gaussian of standard deviation Sigma (which can be different for each measurement), 
//    and the profile has been filled  with a weight equal to 1/Sigma**2, 
//    then one cam use the following option: 
// 
//     'G'            Errors are 1./SQRT(Sum(1/sigma**2)) 
//    For example, this would be useful when all Y's are experimental quantities
//    measured with different precision Sigma_Y.
//
//

   SetErrorOption(option);

   fBinEntries.Set(fNcells);  //*-* create number of entries per bin array

   TH1::Sumw2();                   //*-* create sum of squares of weights array times y

   fYmin = ymin;
   fYmax = ymax;
   fScaling = kFALSE;
   fTsumwy = fTsumwy2 = 0;
}

//______________________________________________________________________________
TProfile::TProfile(const TProfile &profile) : TH1D()
{
   // Copy constructor.

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


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

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


//______________________________________________________________________________
void TProfile::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;
   }
   if (!h1->InheritsFrom("TProfile")) {
      Error("Add","Attempt to add a non-profile object");
      return;
   }
   
   TProfileHelper::Add(this, this, h1, 1, c1);
}

//______________________________________________________________________________
void TProfile::Add(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2)
{
//*-*-*-*-*Replace contents of this profile by the addition of h1 and h2*-*-*
//*-*      =============================================================
//
//   this = c1*h1 + c2*h2
//
//   c1 and c2 are considered as weights applied to the two summed profiles. 
//   The operation acts therefore like merging the two profiles with a weight c1 and c2
//

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


//______________________________________________________________________________
void TProfile::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 profile is less than 1002
//  - the bin number of entries is small ( <5)
//  - the estimated bin error is extremely small compared to the bin content
//  (see TProfile::GetBinError)

   fgApproximate = approx;
}

//______________________________________________________________________________
Int_t TProfile::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();
      fBuffer = buffer;
   }
   if (TestBit(kCanRebin) || fXaxis.GetXmax() <= fXaxis.GetXmin()) {
      //find min, max of entries in buffer
      Double_t xmin = fBuffer[2];
      Double_t xmax = xmin;
      for (Int_t i=1;i<nbentries;i++) {
         Double_t x = fBuffer[3*i+2];
         if (x < xmin) xmin = x;
         if (x > xmax) xmax = x;
      }
      if (fXaxis.GetXmax() <= fXaxis.GetXmin()) {
         THLimitsFinder::GetLimitsFinder()->FindGoodLimits(this,xmin,xmax);
      } else {
         fBuffer = 0;
         Int_t keep = fBufferSize; fBufferSize = 0;
         if (xmin <  fXaxis.GetXmin()) RebinAxis(xmin,&fXaxis);
         if (xmax >= fXaxis.GetXmax()) RebinAxis(xmax,&fXaxis);
         fBuffer = buffer;
         fBufferSize = keep;
      }
   }

   fBuffer = 0;

   for (Int_t i=0;i<nbentries;i++) {
      Fill(buffer[3*i+2],buffer[3*i+3],buffer[3*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 TProfile::BufferFill(Double_t x, Double_t y, 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

   if (!fBuffer) return -2;
   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();
         fBuffer = buffer;
      }
   }
   if (3*nbentries+3 >= fBufferSize) {
      BufferEmpty(1);
      return Fill(x,y,w);
   }
   fBuffer[3*nbentries+1] = w;
   fBuffer[3*nbentries+2] = x;
   fBuffer[3*nbentries+3] = y;
   fBuffer[0] += 1;
   return -2;
}

//______________________________________________________________________________
void TProfile::Copy(TObject &obj) const
{
//*-*-*-*-*-*-*-*Copy a Profile histogram to a new profile histogram*-*-*-*-*
//*-*            ===================================================

   TH1D::Copy(((TProfile&)obj));
   fBinEntries.Copy(((TProfile&)obj).fBinEntries);
   fBinSumw2.Copy(((TProfile&)obj).fBinSumw2);
   for (int bin=0;bin<fNcells;bin++) {
      ((TProfile&)obj).fArray[bin]        = fArray[bin];
      ((TProfile&)obj).fSumw2.fArray[bin] = fSumw2.fArray[bin];
   }

   ((TProfile&)obj).fYmin = fYmin;
   ((TProfile&)obj).fYmax = fYmax;
   ((TProfile&)obj).fScaling   = fScaling;
   ((TProfile&)obj).fErrorMode = fErrorMode;
   ((TProfile&)obj).fTsumwy    = fTsumwy;
   ((TProfile&)obj).fTsumwy2   = fTsumwy2;
}


//______________________________________________________________________________
void TProfile::Divide(TF1 *, Double_t )
{
   // Performs the operation: this = this/(c1*f1)

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

//______________________________________________________________________________
void TProfile::Divide(const TH1 *h1)
{
//*-*-*-*-*-*-*-*-*-*-*Divide this profile by h1*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  =========================
//
//   this = this/h1
// This function accepts to divide a TProfile by a histogram
//

   if (!h1) {
      Error("Divide","Attempt to divide a non-existing profile");
      return;
   }
   if (!h1->InheritsFrom("TH1")) {
      Error("Divide","Attempt to divide by a non-profile or non-histogram object");
      return;
   }
   TProfile *p1 = (TProfile*)h1;

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

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

//*-*- Loop on bins (including underflows/overflows)
   Int_t bin;
   Double_t *cu1=0, *er1=0, *en1=0;
   Double_t e0,e1,c12;
   if (h1->InheritsFrom("TProfile")) {
      cu1 = p1->GetW();
      er1 = p1->GetW2();
      en1 = p1->GetB();
   }
   Double_t c0,c1,w,z,x;
   for (bin=0;bin<=nbinsx+1;bin++) {
      c0  = fArray[bin];
      if (cu1) c1  = cu1[bin];
      else     c1  = h1->GetBinContent(bin);
      if (c1) w = c0/c1;
      else    w = 0;
      fArray[bin] = w;
      z = TMath::Abs(w);
      x = fXaxis.GetBinCenter(bin);
      fEntries++;
      fTsumw   += z;
      fTsumw2  += z*z;
      fTsumwx  += z*x;
      fTsumwx2 += z*x*x;
      fTsumwy  += z*c1;
      fTsumwx2 += z*c1*c1;
      e0 = fSumw2.fArray[bin];
      if (er1) e1 = er1[bin];
      else    {e1 = h1->GetBinError(bin); e1*=e1;}
      c12= c1*c1;
      if (!c1) fSumw2.fArray[bin] = 0;
      else     fSumw2.fArray[bin] = (e0*c1*c1 + e1*c0*c0)/(c12*c12);
      if (!en1) continue;
      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();
   }
   
}


//______________________________________________________________________________
void TProfile::Divide(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2, Option_t *option)
{
//*-*-*-*-*Replace contents of this profile by the division of h1 by h2*-*-*
//*-*      ============================================================
//
//   this = c1*h1/(c2*h2)
//

   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 profile");
      return;
   }
   if (!h1->InheritsFrom("TProfile")) {
      Error("Divide","Attempt to divide a non-profile object");
      return;
   }
   TProfile *p1 = (TProfile*)h1;
   if (!h2->InheritsFrom("TProfile")) {
      Error("Divide","Attempt to divide by a non-profile object");
      return;
   }
   TProfile *p2 = (TProfile*)h2;

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

   //THE ALGORITHM COMPUTING THE ERRORS IS WRONG. HELP REQUIRED
   printf("WARNING!!: The algorithm in TProfile::Divide computing the errors is not accurate\n");
   printf(" Instead of Divide(TProfile *h1, TProfile *h2, do:\n");
   printf("   TH1D *p1 = h1->ProjectionX();\n");
   printf("   TH1D *p2 = h2->ProjectionX();\n");
   printf("   p1->Divide(p2);\n");

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

//*-*- Loop on bins (including underflows/overflows)
   Int_t bin;
   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,ac1,ac2;
   //d1 = c1*c1;
   //d2 = c2*c2;
   ac1 = TMath::Abs(c1);
   ac2 = TMath::Abs(c2);
   for (bin=0;bin<=nbinsx+1;bin++) {
      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(bin);
      fEntries++;
      fTsumw   += z;
      fTsumw2  += z*z;
      fTsumwx  += z*x;
      fTsumwx2 += z*x*x;
      //fTsumwy  += z*x;
      //fTsumwy2 += z*x*x;
      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)/b2);
         } else {
          //fSumw2.fArray[bin] = d1*d2*(e1*b2*b2 + e2*b1*b1)/(b22*b22);
            fSumw2.fArray[bin] = ac1*ac2*(e1*b2*b2 + e2*b1*b1)/(b22*b22);
         }
      }
      if (en2[bin]) fBinEntries.fArray[bin] = en1[bin]/en2[bin];
      else          fBinEntries.fArray[bin] = 0;
   }

   // 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();
   }

}

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

//______________________________________________________________________________
Int_t TProfile::Fill(Double_t x, Double_t y)
{
//*-*-*-*-*-*-*-*-*-*-*Fill a Profile histogram (no weights)*-*-*-*-*-*-*-*
//*-*                  =====================================

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

   Int_t bin;
   if (fYmin != fYmax) {
      if (y <fYmin || y> fYmax) return -1;
   }

   fEntries++;
   bin =fXaxis.FindBin(x);
   AddBinContent(bin, y);
   fSumw2.fArray[bin] += (Double_t)y*y;
   fBinEntries.fArray[bin] += 1;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += 1;
   if (bin == 0 || bin > fXaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   fTsumw++;
   fTsumw2++;
   fTsumwx  += x;
   fTsumwx2 += x*x;
   fTsumwy  += y;
   fTsumwy2 += y*y;
   return bin;
}

//______________________________________________________________________________
Int_t TProfile::Fill(const char *namex, Double_t y)
{
// Fill a Profile histogram (no weights)
//
   Int_t bin;
   if (fYmin != fYmax) {
      if (y <fYmin || y> fYmax) return -1;
   }

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

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

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

   Int_t bin;
   if (fYmin != fYmax) {
      if (y <fYmin || y> fYmax) return -1;
   }

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

//______________________________________________________________________________
Int_t TProfile::Fill(const char *namex, Double_t y, Double_t w)
{
// Fill a Profile histogram with weights
//
   Int_t bin;

   if (fYmin != fYmax) {
      if (y <fYmin || y> fYmax) return -1;
   }

   Double_t u= (w > 0 ? w : -w);
   fEntries++;
   bin =fXaxis.FindBin(namex);
   AddBinContent(bin, u*y);
   fSumw2.fArray[bin] += u*y*y;
   fBinEntries.fArray[bin] += u;
   if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += u*u;
   if (bin == 0 || bin > fXaxis.GetNbins()) {
      if (!fgStatOverflows) return -1;
   }
   Double_t x = fXaxis.GetBinCenter(bin);
   fTsumw   += u;
   fTsumw2  += u*u;
   fTsumwx  += u*x;
   fTsumwx2 += u*x*x;
   fTsumwy  += u*y;
   fTsumwy2 += u*y*y;
   return bin;
}


//______________________________________________________________________________
void TProfile::FillN(Int_t ntimes, const Double_t *x, const Double_t *y, const Double_t *w, Int_t stride)
{
//*-*-*-*-*-*-*-*-*-*-*Fill a Profile histogram with weights*-*-*-*-*-*-*-*
//*-*                  =====================================
   Int_t bin,i;
   ntimes *= stride;
   for (i=0;i<ntimes;i+=stride) {
      if (fYmin != fYmax) {
         if (y[i] <fYmin || y[i]> fYmax) continue;
      }

      Double_t u= (w[i] > 0 ? w[i] : -w[i]);
      fEntries++;
      bin =fXaxis.FindBin(x[i]);
      AddBinContent(bin, u*y[i]);
      fSumw2.fArray[bin] += u*y[i]*y[i];
      fBinEntries.fArray[bin] += u;
      if (fBinSumw2.fN)  fBinSumw2.fArray[bin] += u*u;
      if (bin == 0 || bin > fXaxis.GetNbins()) {
         if (!fgStatOverflows) continue;
      }
      fTsumw   += u;
      fTsumw2  += u*u;
      fTsumwx  += u*x[i];
      fTsumwx2 += u*x[i]*x[i];
      fTsumwy  += u*y[i];
      fTsumwy2 += u*y[i]*y[i];
   }
}

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

   if (fBuffer) ((TProfile*)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 TProfile::GetBinEntries(Int_t bin) const
{
//*-*-*-*-*-*-*Return bin entries of a Profile histogram*-*-*-*-*-*-*-*-*-*
//*-*          =========================================

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

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

//______________________________________________________________________________
Double_t TProfile::GetBinEffectiveEntries(Int_t bin) const
{
//            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((TProfile*)this, bin);
}

//______________________________________________________________________________
Double_t TProfile::GetBinError(Int_t bin) const
{
// *-*-*-*-*-*-*Return bin error of a Profile histogram*-*-*-*-*-*-*-*-*-*
// *-*          =======================================
//
// Computing errors: A moving field
// =================================
// The computation of errors for a TProfile has evolved with the versions
// of ROOT. The difficulty is in computing errors for bins with low statistics.
// - prior to version 3.00, 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.
// - in version 3.00 (18 Dec 2000), the algorithm is protected for values of
//   eprim2 very small and the bin errors set to the average bin errors, following
//   recommendations from a group of users.
// - in version 3.01 (19 Apr 2001), it is realized that the algorithm above
//   should be applied only to low statistic bins.
// - in version 3.02 (26 Sep 2001), the same group of users recommend instead
//   to take two times the average error on all bins for these low
//   statistics bins giving a very small value for eprim2.
// - in version 3.04 (Nov 2002), the algorithm is modified/protected for the case
//   when a TProfile is projected (ProjectionX). The previous algorithm
//   generated a N^2 problem when projecting a TProfile with a large number of
//   bins (eg 100000).
// - in version 3.05/06, a new static function TProfile::Approximate
//   is introduced to enable or disable (default) the approximation.
//
// Ideas for improvements of this algorithm are welcome. No suggestions
// received since our call for advice to roottalk in Jul 2002.
// see for instance: http://root.cern.ch/root/roottalk/roottalk02/2916.html

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

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

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

//______________________________________________________________________________
char* TProfile::GetObjectInfo(Int_t px, Int_t py) const
{
   //   Redefines TObject::GetObjectInfo.
   //   Displays the profile info (bin number, contents, eroor, entries per bin
   //   corresponding to cursor position px,py
   //
   if (!gPad) return (char*)"";
   static char info[200];
   Double_t x  = gPad->PadtoX(gPad->AbsPixeltoX(px));
   Double_t y  = gPad->PadtoY(gPad->AbsPixeltoY(py));
   Int_t binx   = GetXaxis()->FindFixBin(x);
   sprintf(info,"(x=%g, y=%g, binx=%d, binc=%g, bine=%g, binn=%d)", x, y, binx, GetBinContent(binx), GetBinError(binx), (Int_t)GetBinEntries(binx));
   return info;
}

//______________________________________________________________________________
void TProfile::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
   //
   // 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) ((TProfile*)this)->BufferEmpty();

   // Loop on bins
   Int_t bin, binx;
   if (fTsumw == 0 || fXaxis.TestBit(TAxis::kAxisRange)) {
      for (bin=0;bin<6;bin++) stats[bin] = 0;
      if (!fBinEntries.fArray) return;
      Int_t firstBinX = fXaxis.GetFirst();
      Int_t lastBinX  = fXaxis.GetLast();
      // include underflow/overflow if TH1::StatOverflows(kTRUE) in case no range is set on the axis
      if (fgStatOverflows && !fXaxis.TestBit(TAxis::kAxisRange)) {
         if (firstBinX == 1) firstBinX = 0;
         if (lastBinX ==  fXaxis.GetNbins() ) lastBinX += 1;
      }
      for (binx = firstBinX; binx <= lastBinX; binx++) {
         Double_t w   = fBinEntries.fArray[binx];
         Double_t w2  = (fBinSumw2.fN ? fBinSumw2.fArray[binx] : w*w );  
         Double_t x   = fXaxis.GetBinCenter(binx);
         stats[0] += w;
         stats[1] += w2;
         stats[2] += w*x;
         stats[3] += w*x*x;
         stats[4] += fArray[binx];
         stats[5] += fSumw2.fArray[binx];
      }
   } else {
      if (fTsumwy == 0 && fTsumwy2 == 0) {
         //this case may happen when processing TProfiles with version <=3
         TProfile *p = (TProfile*)this; // chheting with const
         for (binx=fXaxis.GetFirst();binx<=fXaxis.GetLast();binx++) {
            p->fTsumwy  += fArray[binx];
            p->fTsumwy2 += fSumw2.fArray[binx];
         }
      }
      stats[0] = fTsumw;
      stats[1] = fTsumw2;
      stats[2] = fTsumwx;
      stats[3] = fTsumwx2;
      stats[4] = fTsumwy;
      stats[5] = fTsumwy2;
   }
}

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

   TProfileHelper::LabelsDeflate(this, option);
}

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

  TProfileHelper::LabelsInflate(this, options); 
}

//___________________________________________________________________________
void TProfile::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)

   THashList *labels = fXaxis.GetLabels();
   if (!labels) {
      Warning("LabelsOption","Cannot sort. No labels");
      return;
   }
   TString opt = option;
   opt.ToLower();
   if (opt.Contains("h")) {
      fXaxis.SetBit(TAxis::kLabelsHori);
      fXaxis.ResetBit(TAxis::kLabelsVert);
      fXaxis.ResetBit(TAxis::kLabelsDown);
      fXaxis.ResetBit(TAxis::kLabelsUp);
   }
   if (opt.Contains("v")) {
      fXaxis.SetBit(TAxis::kLabelsVert);
      fXaxis.ResetBit(TAxis::kLabelsHori);
      fXaxis.ResetBit(TAxis::kLabelsDown);
      fXaxis.ResetBit(TAxis::kLabelsUp);
   }
   if (opt.Contains("u")) {
      fXaxis.SetBit(TAxis::kLabelsUp);
      fXaxis.ResetBit(TAxis::kLabelsVert);
      fXaxis.ResetBit(TAxis::kLabelsDown);
      fXaxis.ResetBit(TAxis::kLabelsHori);
   }
   if (opt.Contains("d")) {
      fXaxis.SetBit(TAxis::kLabelsDown);
      fXaxis.ResetBit(TAxis::kLabelsVert);
      fXaxis.ResetBit(TAxis::kLabelsHori);
      fXaxis.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 n = TMath::Min(fXaxis.GetNbins(), labels->GetSize());
   Int_t *a = new Int_t[n+2];
   Int_t i,j;
   Double_t *cont   = new Double_t[n+2];
   Double_t *sumw   = new Double_t[n+2];
   Double_t *errors = new Double_t[n+2];
   Double_t *ent    = new Double_t[n+2];
   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
      for (i=1;i<=n;i++) {
         sumw[i-1]   = fArray[i];
         errors[i-1] = fSumw2.fArray[i];
         ent[i-1]    = fBinEntries.fArray[i];
         if (fBinEntries.fArray[i] == 0) cont[i-1] = 0;
         else cont[i-1] = fArray[i]/fBinEntries.fArray[i];
      }
      if (sort ==1) TMath::Sort(n,cont,a,kTRUE);  //sort by decreasing values
      else          TMath::Sort(n,cont,a,kFALSE); //sort by increasing values
      for (i=1;i<=n;i++) {
         fArray[i] = sumw[a[i-1]];
         fSumw2.fArray[i] = errors[a[i-1]];
         fBinEntries.fArray[i] = ent[a[i-1]];
      }
      for (i=1;i<=n;i++) {
         obj = labold->At(a[i-1]);
         labels->Add(obj);
         obj->SetUniqueID(i);
      }
   } 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=1;i<=n;i++) {
         sumw[i]   = fArray[a[i]];
         errors[i] = fSumw2.fArray[a[i]];
         ent[i]    = fBinEntries.fArray[a[i]];
      }
      for (i=1;i<=n;i++) {
         fArray[i] = sumw[i];
         fSumw2.fArray[i] = errors[i];
         fBinEntries.fArray[i] = ent[i];
      }
   }
   delete labold;
   if (a)      delete [] a;
   if (sumw)   delete [] sumw;
   if (cont)   delete [] cont;
   if (errors) delete [] errors;
   if (ent)    delete [] ent;
}

//______________________________________________________________________________
Long64_t TProfile::Merge(TCollection *li)
{
   //Merge all histograms in the collection in this histogram.
   //This function computes the min/max for the x axis,
   //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 axis x 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);
}


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

   if (!f1) {
      Error("Multiply","Attempt to multiply by a null function");
      return;
   }

   Int_t nbinsx = GetNbinsX();

//*-*- Add statistics
   Double_t xx[1], cf1, ac1 = TMath::Abs(c1);
   Double_t s1[10];
   Int_t i;
   for (i=0;i<10;i++) {s1[i] = 0;}
   PutStats(s1);

   SetMinimum();
   SetMaximum();

//*-*- Loop on bins (including underflows/overflows)
   Int_t bin;
   for (bin=0;bin<=nbinsx+1;bin++) {
      xx[0] = fXaxis.GetBinCenter(bin);
      if (!f1->IsInside(xx)) continue;
      TF1::RejectPoint(kFALSE);
      cf1 = f1->EvalPar(xx);
      if (TF1::RejectedPoint()) continue;
      fArray[bin]             *= c1*cf1;
      //see http://savannah.cern.ch/bugs/?func=detailitem&item_id=14851
      //fSumw2.fArray[bin]      *= c1*c1*cf1*cf1;
      fSumw2.fArray[bin]      *= ac1*cf1*cf1;
      //fBinEntries.fArray[bin] *= ac1*TMath::Abs(cf1);
   }
}

//______________________________________________________________________________
void TProfile::Multiply(const TH1 *)
{
//*-*-*-*-*-*-*-*-*-*-*Multiply this profile by h1*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  =============================
//
//   this = this*h1
//
   Error("Multiply","Multiplication of profile histograms not implemented");
}


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

   Error("Multiply","Multiplication of profile histograms not implemented");
}

//______________________________________________________________________________
TH1D *TProfile::ProjectionX(const char *name, Option_t *option) const
{
//*-*-*-*-*Project this profile into a 1-D histogram along X*-*-*-*-*-*-*
//*-*      =================================================
//
//   The projection is always of the type TH1D.
//
//   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,
//      otherwise (default) it will be equal to GetBinContent(bin)
//   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 TH1D using the 2-nd value as a weight. 
//       This makes sense only for profile filled with weights =1. If not, the error of the 
//        projected histogram obtained with this option will not be correct.


   TString opt = option;
   opt.ToLower();
   Int_t nx = fXaxis.GetNbins();

// Create the projection histogram
   char *pname = (char*)name;
   if (strcmp(name,"_px") == 0) {
      Int_t nch = strlen(GetName()) + 4;
      pname = new char[nch];
      sprintf(pname,"%s%s",GetName(),name);
   }
   TH1D *h1;
   const TArrayD *bins = fXaxis.GetXbins();
   if (bins->fN == 0) {
      h1 = new TH1D(pname,GetTitle(),nx,fXaxis.GetXmin(),fXaxis.GetXmax());
   } else {
      h1 = new TH1D(pname,GetTitle(),nx,bins->fArray);
   }
   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 ) h1->Sumw2();
   if (pname != name)  delete [] pname;

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

      if (binEntries)         cont = GetBinEntries(bin);
      else if (cequalErrors)  cont = GetBinError(bin);
      else if (binWeight)     cont = fArray[bin];  // bin content * bin entries
      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 filled with weights =1
      if (binWeight) h1->SetBinError(bin , TMath::Sqrt(fSumw2.fArray[bin] ) );
      // in case of bin entries and h1 has sumw2 set, we need to set also the bin error
      if (binEntries && h1->GetSumw2() ) {
         Double_t err2;
         if (fBinSumw2.fN) 
            err2 = fBinSumw2.fArray[bin]; 
         else 
            err2 = cont; // this is fBinEntries.fArray[bin]
         h1->SetBinError(bin, TMath::Sqrt(err2 ) ); 
      }

   }

   // Copy the axis attributes and the axis labels if needed.
   h1->GetXaxis()->ImportAttributes(this->GetXaxis());
   h1->GetYaxis()->ImportAttributes(this->GetYaxis());
   THashList* labels=this->GetXaxis()->GetLabels();
   if (labels) {
      TIter iL(labels);
      TObjString* lb;
      Int_t i = 1;
      while ((lb=(TObjString*)iL())) {
         h1->GetXaxis()->SetBinLabel(i,lb->String().Data());
         i++;
      }
   }
   
   h1->SetEntries(fEntries);
   return h1;
}

//______________________________________________________________________________
void TProfile::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];
}

//______________________________________________________________________________
TH1 *TProfile::Rebin(Int_t ngroup, const char*newname, const Double_t *xbins)
{
//*-*-*-*-*Rebin this profile grouping ngroup bins together*-*-*-*-*-*-*-*-*
//*-*      ================================================
//  -case 1  xbins=0
//   if newname is not blank a new temporary profile hnew is created.
//   else the current profile is modified (default)
//   The parameter ngroup indicates how many bins of this have to me 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 hp is an existing TProfile histogram with 100 bins
//     hp->Rebin();  //merges two bins in one in hp: previous contents of hp are lost
//     hp->Rebin(5); //merges five bins in one in hp
//     TProfile *hnew = hp->Rebin(5,"hnew"); // creates a new profile hnew
//                                       //merging 5 bins of hp in one bin
//
//   NOTE:  If ngroup is not an exact divider of the number of bins,
//          the top limit of the rebinned profile is changed
//          to the upper edge of the bin=newbins*ngroup and the corresponding
//          bins are added to the overflow bin.
//          Statistics will be recomputed from the new bin contents.
//
//  -case 2  xbins!=0
//   a new profile is created (you should specify newname).
//   The parameter is the number of variable size bins in the created profile
//   The array xbins must contain ngroup+1 elements that represent the low-edge
//   of the bins.
//
//   examples: if hp is an existing TProfile with 100 bins
//     Double_t xbins[25] = {...} array of low-edges (xbins[25] is the upper edge of last bin
//     hp->Rebin(24,"hpnew",xbins);  //creates a new variable bin size profile hpnew

   Int_t nbins    = fXaxis.GetNbins();
   Double_t xmin  = fXaxis.GetXmin();
   Double_t xmax  = fXaxis.GetXmax();
   if ((ngroup <= 0) || (ngroup > nbins)) {
      Error("Rebin", "Illegal value of ngroup=%d",ngroup);
      return 0;
   }
   if (!newname && xbins) {
      Error("Rebin","if xbins is specified, newname must be given");
      return 0;
   }

   Int_t newbins = nbins/ngroup;
   if (!xbins) { 
      Int_t nbg = nbins/ngroup;
      if (nbg*ngroup != nbins) {
         Warning("Rebin", "ngroup=%d must be an exact divider of nbins=%d",ngroup,nbins);
      }
   }
   else {   
   // in the case of xbins given (rebinning in variable bins) ngroup is the new number of bins.
   //  and number of grouped bins is not constant. 
   // when looping for setting the contents for the new histogram we 
   // need to loop on all bins of original histogram. Set then ngroup=nbins
      newbins = ngroup;
      ngroup = nbins;
   }

   // Save old bin contents into a new array
   Double_t *oldBins   = new Double_t[nbins+2];
   Double_t *oldCount  = new Double_t[nbins+2];
   Double_t *oldErrors = new Double_t[nbins+2];
   Double_t *oldBinw2  = (fBinSumw2.fN ? new Double_t[nbins+2] : 0  ); 
   Int_t bin, i;
   Double_t *cu1 = GetW();
   Double_t *er1 = GetW2();
   Double_t *en1 = GetB();
   Double_t *ew1 = GetB2();
   
   for (bin=0;bin<=nbins+1;bin++) {
      oldBins[bin]   = cu1[bin];
      oldCount[bin]  = en1[bin];
      oldErrors[bin] = er1[bin];
      if (fBinSumw2.fN) oldBinw2[bin]  = ew1[bin];
   }

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

   // in case of ngroup not an excat divider of nbins, 
   // top limit is changed (see NOTE in method comment) 
   if(!xbins && (newbins*ngroup != nbins)) {
      xmax = fXaxis.GetBinUpEdge(newbins*ngroup);
      hnew->fTsumw = 0; //stats must be reset because top bins will be moved to overflow bin
   }

   // set correctly the axis and resizes the bin arrays
   if(!xbins && (fXaxis.GetXbins()->GetSize() > 0)){ 
      // for rebinning of variable bins in a constant group 
      Double_t *bins = new Double_t[newbins+1];
      for(i = 0; i <= newbins; ++i) bins[i] = fXaxis.GetBinLowEdge(1+i*ngroup);
      hnew->SetBins(newbins,bins); //this also changes the bin array's
      delete [] bins;
   } else if (xbins) { 
      // when rebinning in variable bins
      hnew->SetBins(newbins,xbins);
   } else {
      hnew->SetBins(newbins,xmin,xmax);
   }

   // merge bin contents ignoring now underflow/overflows
   if (fBinSumw2.fN) hnew->Sumw2();

   Double_t *cu2 = hnew->GetW();
   Double_t *er2 = hnew->GetW2();
   Double_t *en2 = hnew->GetB();
   Double_t *ew2 = hnew->GetB2();
   Int_t oldbin = 1;
   Double_t binContent, binCount, binError, binSumw2;
   for (bin = 1;bin<=newbins;bin++) {
      binContent = 0;
      binCount   = 0;
      binError   = 0;
      binSumw2   = 0;

      Int_t imax = ngroup;
      Double_t xbinmax = hnew->GetXaxis()->GetBinUpEdge(bin);
      // in case of variables bins ngroup = nbins (number of old bins)
      for (i=0;i<ngroup;i++) {

         if( (hnew == this && (oldbin+i > nbins)) || 
             (hnew != this && (fXaxis.GetBinCenter(oldbin+i) > xbinmax)) ) {
            imax = i;
            break;
         }

         binContent += oldBins[oldbin+i];
         binCount   += oldCount[oldbin+i];
         binError   += oldErrors[oldbin+i];
         if (fBinSumw2.fN) binSumw2 += oldBinw2[oldbin+i];
      }
      cu2[bin] = binContent;
      er2[bin] = binError;
      en2[bin] = binCount;
      if (fBinSumw2.fN) ew2[bin] = binSumw2;
      oldbin += imax;
   }
   // set bin statistics for underflow/overflow bins by copying intact from original histogram
   hnew->fArray[0] = oldBins[0];
   hnew->fArray[newbins+1] = oldBins[nbins+1];
   hnew->fBinEntries[0] = oldCount[0];
   hnew->fBinEntries[newbins+1] = oldCount[nbins+1];
   hnew->fSumw2[0] = oldErrors[0];
   hnew->fSumw2[newbins+1] = oldErrors[nbins+1];
   if ( fBinSumw2.fN ) {
      hnew->fBinSumw2[0] = oldBinw2[0];
      hnew->fBinSumw2[newbins+1] = oldBinw2[nbins+1];
   }


   delete [] oldBins;
   delete [] oldCount;
   delete [] oldErrors;
   if (oldBinw2) delete [] oldBinw2; 
   return hnew;
}

//______________________________________________________________________________
void TProfile::RebinAxis(Double_t x, TAxis *axis)
{
// Profile histogram is resized along x 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);

   TProfile*  hold = TProfileHelper::RebinAxis(this, x, axis);
   if ( hold ) {
      fTsumwy  = hold->fTsumwy;
      fTsumwy2 = hold->fTsumwy2;
      
      delete hold;
   }
}

//______________________________________________________________________________
void TProfile::Reset(Option_t *option)
{
//*-*-*-*-*-*-*-*-*-*Reset contents of a Profile histogram*-*-*-*-*-*-*-*-*
//*-*                =====================================
   TH1D::Reset(option);
   fBinEntries.Reset();
   fBinSumw2.Reset();
   TString opt = option;
   opt.ToUpper();
   if (opt.Contains("ICE")) return;
   fTsumwy  = 0;
   fTsumwy2 = 0;
}

//______________________________________________________________________________
void TProfile::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

   Bool_t nonEqiX = kFALSE;
   Int_t i;
   // Check if the profile has equidistant X bins or not.  If not, we
   // create an array holding the bins.
   if (GetXaxis()->GetXbins()->fN && GetXaxis()->GetXbins()->fArray) {
      nonEqiX = kTRUE;
      out << "   Double_t xAxis[" << GetXaxis()->GetXbins()->fN
          << "] = {";
      for (i = 0; i < GetXaxis()->GetXbins()->fN; i++) {
         if (i != 0) out << ", ";
         out << GetXaxis()->GetXbins()->fArray[i];
      }
      out << "}; " << endl;
   }

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

   out<<GetName()<<" = new "<<ClassName()<<"("<<quote<<GetName()<<quote<<","<<quote<<GetTitle()<<quote
                 <<","<<GetXaxis()->GetNbins();
   if (nonEqiX)
      out << ", xAxis";
   else
      out << "," << GetXaxis()->GetXmin()
          << "," << GetXaxis()->GetXmax()
          <<","<<quote<<GetErrorOption()<<quote<<");"<<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, option);
}

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

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

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

//______________________________________________________________________________
void TProfile::SetBins(Int_t nx, Double_t xmin, Double_t xmax)
{
//*-*-*-*-*-*-*-*-*Redefine  x axis parameters*-*-*-*-*-*-*-*-*-*-*-*
//*-*              ===========================

   fXaxis.Set(nx,xmin,xmax);
   fNcells = nx+2;
   SetBinsLength(fNcells);
   fBinEntries.Set(fNcells);
   fSumw2.Set(fNcells);
   if (fBinSumw2.fN) fBinSumw2.Set(fNcells);
}

//______________________________________________________________________________
void TProfile::SetBins(Int_t nx, const Double_t *xbins)
{
//*-*-*-*-*-*-*-*-*Redefine  x axis parameters*-*-*-*-*-*-*-*-*-*-*-*
//*-*              ===========================

   fXaxis.Set(nx,xbins);
   fNcells = nx+2;
   SetBinsLength(fNcells);
   fBinEntries.Set(fNcells);
   fSumw2.Set(fNcells);
   if (fBinSumw2.fN) fBinSumw2.Set(fNcells);
}


//______________________________________________________________________________
void TProfile::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 + 3*buffersize;
   fBuffer = new Double_t[fBufferSize];
   memset(fBuffer,0,8*fBufferSize);
}

//______________________________________________________________________________
void TProfile::SetErrorOption(Option_t *option)
{
//*-*-*-*-*-*-*-*-*-*Set option to compute profile errors*-*-*-*-*-*-*-*-*
//*-*                =====================================
//
//    The computation of errors is based on the parameter option:
//    option:
//     ' '  (Default) Errors are Spread/SQRT(N) for Spread.ne.0. ,
//                      "     "  SQRT(Y)/SQRT(N) for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//     's'            Errors are Spread  for Spread.ne.0. ,
//                      "     "  SQRT(Y)  for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//     'i'            Errors are Spread/SQRT(N) for Spread.ne.0. ,
//                      "     "  1./SQRT(12.*N) for Spread.eq.0,N.gt.0 ,
//                      "     "  0.  for N.eq.0
//     'g'            Errors are 1./SQRT(W) for Spread.ne.0. , 
//                      "     "  0.  for N.eq.0
//                    W is the sum of weights of the profile. 
//                    This option is for measurements y +/ dy and  the profile is filled with 
//                    weights w = 1/dy**2
//
//   See TProfile::BuildOptions for explanation of all options

   TString opt = option;
   opt.ToLower();
   fErrorMode = kERRORMEAN;
   if (opt.Contains("s")) fErrorMode = kERRORSPREAD;
   if (opt.Contains("i")) fErrorMode = kERRORSPREADI;
   if (opt.Contains("g")) fErrorMode = kERRORSPREADG;
}

//______________________________________________________________________________
void TProfile::Streamer(TBuffer &R__b)
{
   // Stream an object of class TProfile.

   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(TProfile::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TH1D::Streamer(R__b);
      fBinEntries.Streamer(R__b);
      Int_t errorMode;
      R__b >> errorMode;
      fErrorMode = (EErrorType)errorMode;
      if (R__v < 2) {
         Float_t ymin,ymax;
         R__b >> ymin; fYmin = ymin;
         R__b >> ymax; fYmax = ymax;
      } else {
         R__b >> fYmin;
         R__b >> fYmax;
      }
      R__b.CheckByteCount(R__s, R__c, TProfile::IsA());
      //====end of old versions

   } else {
      R__b.WriteClassBuffer(TProfile::Class(),this);
   }
}
//______________________________________________________________________________
void TProfile::Sumw2()
{
   // Create 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.

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