Krzysztof, What I have been doing in this case, first I declare const Int_t NHists = 200, NCanvas = 12; TH1F *myhists[NHists]; TCanvas *Canvas[NCanvas]; Char_t infile[200], hname[100], cname[50], ctitle[50], subdir[100]; next I open a file with my histograms TFile *cfile = (TFile*)gROOT->GetListOfFiles()->FindObject(infile); if (!cfile) { TFile *cfile = new TFile(infile, "READ"); } // go to appropriate subdirectory sprintf(subdir, "/TOP"); cfile -> cd(subdir); // create a new canvas Int_t ik = 0; Canvas[ik] = new TCanvas(cname, ctitle, 600, 800); // create NHists pads Canvas[ik] -> Divide(1, NHists, 0.01, 0.01, 0); // Finally, I loop through the histograms for (Int_t hidx = 0; hidx < NHists; hidx++) { myhists[hidx] = (TH1F *) gDirectory -> Get(hname); Canvas[ik] -> cd(hidx + 1); // draw ticks on all four axis gPad -> SetTicks(); myhists[hidx] -> DrawCopy(); } Canvas[ik] -> Update(); Regards, Michal Lijowski > From owner-roottalk@hpsalo.cern.ch Mon Aug 30 12:09:21 1999 > Delivered-To: lijowski@cosray2.wustl.edu > X-Authentication-Warning: smtp1.cern.ch: Host sual06.cern.ch [137.138.93.32] claimed to be cern.ch > Date: Mon, 30 Aug 1999 12:38:58 +0200 > From: Krzysztof Zelazowski <Krzysztof.Zelazowski@cern.ch> > X-Accept-Language: en > MIME-Version: 1.0 > To: Roottalk <roottalk@hpsalo.cern.ch> > Subject: Histogram browsing > > Dear ROOTers, > > I my monitoring program I would like to browse through a series of > histograms. For this I create a directory file, just as it was shown in > the ROOT tutorial "Creation of a hierarchy of histograms in > direrctories". > > I would like to have a browser which would allow the user to select n or > All histograms from a specified directory and plot them in the > appropriate number of pads (all in one canvas). > > My question is: Is there a ready to use browser which would provide the > functionality mentioned above ? I have tried using the standard > TBrowser, however, in using this, I can only plot one histogram per > canvas, even if I have previously subdivided the canvas into a number of > pads. > > I would be very grateful if you could give me some hints. > > Best regards, > Krzysztof
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET