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: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@4911 27541ba8-7e3a-0410-8455-c3a389f83636

Dr15Jones/root,satyarth934/root,sawenzel/root,perovic/root,bbockelm/root,nilqed/root,lgiommi/root,abhinavmoudgil95/root,gbitzes/root,simonpf/root,gbitzes/root,olifre/root,karies/root,georgtroska/root,evgeny-boger/root,pspe/root,esakellari/my_root_for_test,agarciamontoro/root,CristinaCristescu/root,simonpf/root,omazapa/root-old,omazapa/root,CristinaCristescu/root,mattkretz/root,lgiommi/root,bbockelm/root,pspe/root,zzxuanyuan/root-compressor-dummy,georgtroska/root,dfunke/root,root-mirror/root,dfunke/root,kirbyherm/root-r-tools,veprbl/root,perovic/root,karies/root,davidlt/root,veprbl/root,alexschlueter/cern-root,root-mirror/root,mkret2/root,beniz/root,vukasinmilosevic/root,olifre/root,bbockelm/root,nilqed/root,sirinath/root,CristinaCristescu/root,arch1tect0r/root,CristinaCristescu/root,thomaskeck/root,mattkretz/root,abhinavmoudgil95/root,omazapa/root-old,satyarth934/root,abhinavmoudgil95/root,vukasinmilosevic/root,omazapa/root-old,gganis/root,olifre/root,Dr15Jones/root,CristinaCristescu/root,sawenzel/root,dfunke/root,dfunke/root,BerserkerTroll/root,arch1tect0r/root,thomaskeck/root,simonpf/root,agarciamontoro/root,BerserkerTroll/root,zzxuanyuan/root,mhuwiler/rootauto,perovic/root,cxx-hep/root-cern,abhinavmoudgil95/root,agarciamontoro/root,zzxuanyuan/root,lgiommi/root,veprbl/root,omazapa/root,sbinet/cxx-root,zzxuanyuan/root,Dr15Jones/root,0x0all/ROOT,CristinaCristescu/root,alexschlueter/cern-root,0x0all/ROOT,tc3t/qoot,davidlt/root,agarciamontoro/root,mhuwiler/rootauto,kirbyherm/root-r-tools,Y--/root,mhuwiler/rootauto,vukasinmilosevic/root,mattkretz/root,pspe/root,simonpf/root,agarciamontoro/root,krafczyk/root,olifre/root,BerserkerTroll/root,vukasinmilosevic/root,perovic/root,esakellari/my_root_for_test,Y--/root,strykejern/TTreeReader,karies/root,zzxuanyuan/root,BerserkerTroll/root,simonpf/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,karies/root,jrtomps/root,esakellari/root,Y--/root,root-mirror/root,nilqed/root,veprbl/root,pspe/root,simonpf/root,Duraznos/root,dfunke/root,esakellari/my_root_for_test,evgeny-boger/root,krafczyk/root,georgtroska/root,zzxuanyuan/root,BerserkerTroll/root,root-mirror/root,tc3t/qoot,omazapa/root-old,Y--/root,dfunke/root,simonpf/root,omazapa/root-old,satyarth934/root,buuck/root,mattkretz/root,veprbl/root,georgtroska/root,mattkretz/root,esakellari/root,strykejern/TTreeReader,georgtroska/root,buuck/root,gbitzes/root,mkret2/root,satyarth934/root,Duraznos/root,gbitzes/root,esakellari/root,pspe/root,georgtroska/root,lgiommi/root,evgeny-boger/root,veprbl/root,omazapa/root-old,arch1tect0r/root,tc3t/qoot,krafczyk/root,esakellari/my_root_for_test,bbockelm/root,ffurano/root5,lgiommi/root,karies/root,sawenzel/root,jrtomps/root,lgiommi/root,gganis/root,simonpf/root,smarinac/root,root-mirror/root,Duraznos/root,nilqed/root,sawenzel/root,dfunke/root,pspe/root,alexschlueter/cern-root,bbockelm/root,georgtroska/root,esakellari/my_root_for_test,beniz/root,smarinac/root,esakellari/root,kirbyherm/root-r-tools,karies/root,Duraznos/root,kirbyherm/root-r-tools,zzxuanyuan/root,zzxuanyuan/root,alexschlueter/cern-root,buuck/root,esakellari/root,nilqed/root,root-mirror/root,mkret2/root,davidlt/root,smarinac/root,root-mirror/root,arch1tect0r/root,jrtomps/root,dfunke/root,mattkretz/root,veprbl/root,davidlt/root,satyarth934/root,perovic/root,sirinath/root,kirbyherm/root-r-tools,veprbl/root,sbinet/cxx-root,tc3t/qoot,CristinaCristescu/root,davidlt/root,zzxuanyuan/root,omazapa/root,agarciamontoro/root,cxx-hep/root-cern,buuck/root,gganis/root,olifre/root,beniz/root,beniz/root,nilqed/root,smarinac/root,gbitzes/root,mhuwiler/rootauto,agarciamontoro/root,karies/root,ffurano/root5,0x0all/ROOT,esakellari/root,pspe/root,pspe/root,arch1tect0r/root,olifre/root,pspe/root,arch1tect0r/root,sirinath/root,buuck/root,0x0all/ROOT,mkret2/root,karies/root,georgtroska/root,agarciamontoro/root,ffurano/root5,mhuwiler/rootauto,jrtomps/root,sawenzel/root,ffurano/root5,BerserkerTroll/root,abhinavmoudgil95/root,jrtomps/root,alexschlueter/cern-root,satyarth934/root,root-mirror/root,gganis/root,omazapa/root,thomaskeck/root,strykejern/TTreeReader,sirinath/root,beniz/root,Y--/root,arch1tect0r/root,bbockelm/root,BerserkerTroll/root,buuck/root,sirinath/root,jrtomps/root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,olifre/root,evgeny-boger/root,cxx-hep/root-cern,mhuwiler/rootauto,ffurano/root5,cxx-hep/root-cern,krafczyk/root,zzxuanyuan/root-compressor-dummy,agarciamontoro/root,CristinaCristescu/root,beniz/root,buuck/root,sbinet/cxx-root,CristinaCristescu/root,davidlt/root,simonpf/root,beniz/root,root-mirror/root,simonpf/root,davidlt/root,sirinath/root,mkret2/root,arch1tect0r/root,smarinac/root,nilqed/root,sirinath/root,dfunke/root,gganis/root,vukasinmilosevic/root,lgiommi/root,perovic/root,Duraznos/root,lgiommi/root,Duraznos/root,Y--/root,BerserkerTroll/root,mkret2/root,abhinavmoudgil95/root,karies/root,zzxuanyuan/root,davidlt/root,0x0all/ROOT,tc3t/qoot,beniz/root,esakellari/root,pspe/root,omazapa/root-old,root-mirror/root,abhinavmoudgil95/root,perovic/root,root-mirror/root,tc3t/qoot,sbinet/cxx-root,evgeny-boger/root,krafczyk/root,krafczyk/root,zzxuanyuan/root,gbitzes/root,agarciamontoro/root,jrtomps/root,smarinac/root,zzxuanyuan/root-compressor-dummy,omazapa/root,arch1tect0r/root,0x0all/ROOT,omazapa/root,gganis/root,cxx-hep/root-cern,beniz/root,abhinavmoudgil95/root,vukasinmilosevic/root,karies/root,sbinet/cxx-root,jrtomps/root,zzxuanyuan/root-compressor-dummy,tc3t/qoot,0x0all/ROOT,alexschlueter/cern-root,Duraznos/root,veprbl/root,zzxuanyuan/root,gganis/root,zzxuanyuan/root-compressor-dummy,cxx-hep/root-cern,veprbl/root,esakellari/root,veprbl/root,ffurano/root5,omazapa/root,agarciamontoro/root,mhuwiler/rootauto,abhinavmoudgil95/root,strykejern/TTreeReader,krafczyk/root,thomaskeck/root,sbinet/cxx-root,buuck/root,sawenzel/root,strykejern/TTreeReader,vukasinmilosevic/root,esakellari/my_root_for_test,omazapa/root-old,gbitzes/root,omazapa/root-old,vukasinmilosevic/root,Duraznos/root,nilqed/root,Y--/root,strykejern/TTreeReader,vukasinmilosevic/root,mkret2/root,Y--/root,sbinet/cxx-root,alexschlueter/cern-root,kirbyherm/root-r-tools,omazapa/root,mhuwiler/rootauto,olifre/root,omazapa/root-old,sawenzel/root,esakellari/root,krafczyk/root,satyarth934/root,smarinac/root,thomaskeck/root,kirbyherm/root-r-tools,CristinaCristescu/root,sbinet/cxx-root,Dr15Jones/root,lgiommi/root,0x0all/ROOT,thomaskeck/root,karies/root,ffurano/root5,mattkretz/root,Y--/root,evgeny-boger/root,thomaskeck/root,perovic/root,tc3t/qoot,pspe/root,olifre/root,zzxuanyuan/root-compressor-dummy,olifre/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,sbinet/cxx-root,thomaskeck/root,bbockelm/root,perovic/root,mattkretz/root,thomaskeck/root,Dr15Jones/root,mattkretz/root,mattkretz/root,krafczyk/root,gbitzes/root,BerserkerTroll/root,satyarth934/root,tc3t/qoot,omazapa/root,cxx-hep/root-cern,mkret2/root,gbitzes/root,sirinath/root,krafczyk/root,sawenzel/root,Duraznos/root,nilqed/root,buuck/root,gbitzes/root,BerserkerTroll/root,mkret2/root,beniz/root,sbinet/cxx-root,BerserkerTroll/root,davidlt/root,zzxuanyuan/root,perovic/root,Y--/root,Y--/root,georgtroska/root,gganis/root,vukasinmilosevic/root,omazapa/root-old,jrtomps/root,esakellari/root,sbinet/cxx-root,CristinaCristescu/root,dfunke/root,vukasinmilosevic/root,krafczyk/root,sawenzel/root,beniz/root,bbockelm/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,georgtroska/root,sirinath/root,sirinath/root,evgeny-boger/root,davidlt/root,esakellari/my_root_for_test,bbockelm/root,cxx-hep/root-cern,esakellari/my_root_for_test,omazapa/root,arch1tect0r/root,evgeny-boger/root,abhinavmoudgil95/root,nilqed/root,smarinac/root,dfunke/root,satyarth934/root,nilqed/root,esakellari/my_root_for_test,Duraznos/root,strykejern/TTreeReader,smarinac/root,thomaskeck/root,gganis/root,omazapa/root,jrtomps/root,sawenzel/root,buuck/root,bbockelm/root,simonpf/root,sawenzel/root,Dr15Jones/root,olifre/root,esakellari/root,evgeny-boger/root,mkret2/root,mkret2/root,buuck/root,gbitzes/root,Dr15Jones/root,perovic/root,satyarth934/root,esakellari/my_root_for_test,evgeny-boger/root,mattkretz/root,0x0all/ROOT,davidlt/root,jrtomps/root,mhuwiler/rootauto,satyarth934/root,sirinath/root,georgtroska/root,bbockelm/root,mhuwiler/rootauto,gganis/root,mhuwiler/rootauto,abhinavmoudgil95/root,lgiommi/root,tc3t/qoot,gganis/root,smarinac/root