Change THistPainter::PaintStat and PaintStat2 to implement the new logic with TPaveStats. The "stats" object is now added to the list of functions instead of being a member of THistPainter. With this change, it is easy to support multiple stats box in the same pad. // // With the option "same", the statistic box is not redrawn. // With the option "sames", the statistic box is drawn. If it hiddes // the previous statistics box, you can change its position // with these lines (if h is the pointer to the histogram): // //  Root > TPaveStats *st = (TPaveStats*)h->GetListOfFunctions()->FindObject("stats") //  Root > st->SetX1NDC(newx1); //new x start position //  Root > st->SetX2NDC(newx2); //new x end position
Change THistPainter::PaintStat and PaintStat2 to implement the new logic
with TPaveStats. The "stats" object is now added to the list of functions
instead of being a member of THistPainter. With this change, it is easy
to support multiple stats box in the same pad.
//
// With the option "same", the statistic box is not redrawn.
// With the option "sames", the statistic box is drawn. If it hiddes
// the previous statistics box, you can change its position
// with these lines (if h is the pointer to the histogram):
//
//  Root > TPaveStats *st = (TPaveStats*)h->GetListOfFunctions()->FindObject("stats")
//  Root > st->SetX1NDC(newx1); //new x start position
//  Root > st->SetX2NDC(newx2); //new x end position

It is not necessary anymore to change the name of the stats box if one wants
to add a new stats box. For example, the following works correctly:
  hpx.draw();
  hprof.Draw("sames"); //move teh position of teh stats box with the mouse

Note that the system is backward compatible is a user calls
  TPaveStats *stats = (TPaveStats*)gpad->GetPrimitive("stats")
thanks to the new logic in TPad::GetPrimitive calling FindObject on each
object in the list.


git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@4911 27541ba8-7e3a-0410-8455-c3a389f83636

bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root