Re: TTree::GetMinimum()

Rene Brun (Rene.Brun@cern.ch)
Wed, 12 May 1999 09:33:16 +0000


Hi Oliver,
This is one of the side effects of inheritance!
TChain derives from TTree but does not implement GetMinimum,Getmaximum.
What happens in your case is that GetMinimum takes the minimum of the
first tree in the chain only.
I have to implement TChain::GetMinimum with a loop on all Trees in the
chain.

Rene Brun

Oliver Mang wrote:
>
> Dear ROOTers,
> I found an odd behaviour of TTree::GetMinimum() (ROOT 2.21.08/SUSe Linux
> 6.1) :
> root [48] .p cr_on.GetMaximum("mjd");
> (Float_t)5.117500000000e+04
> root [49] .p cr_on.GetMinimum("mjd");
> (Float_t)5.116100000000e+04
> root [50] .p cr_on.GetEstimate();
> (Int_t)1019098
> root [51] cr_on.Draw("mjd");
>
> The resulting histogram however has entries ranging from 50855 to 51175.
> cr_on is a TChain, I have used
> cr_on.SetEstimate(cr_on.GetEntries());
> and all other histograms (created via TTree::Draw() ) are fine. Seems that
> TTree::GetMinimum() gives a wrong result. I have also tried Macros based
> on the ROOT source code, they show the same behaviour.
>
> Is it my fault (somehow) or is it bug ?
> Any help is appreciated,
> Oliver
>
> --
> Oliver Mang
> Institut fuer Experimentelle und Angewandte Physik, CAU Kiel
> Phone: ++49/431/880-2482 E-Mail: mang@ifkhep.uni-kiel.de
> ---------------------------------------------------------------
> "The future is not what it used to be"