Gagik Gavalian wrote: > > Hi, > > I was wondering if somebody could give me a help with the problem a > have. > I have macro to slice histograms and get back graph of fitted gaussians > for each slice. > > void slice_fitX(TH2F *slHisto,Int_t n_slices){ > > char *hist_name; > char *mean_fit_name[20]; > // Now, my problem is how to get pointer to object with name > "hist_name"_0 or "hist_name"_01 > // There should be some call like. > > ReadObject("hist_name"_0); > Hi Gagik.. I suppose you want something like 'ReadObject("hist_name_0")': try: TH1F *hist = (TH1F*) gROOT->FindObject("hist_name_0"); see: ROOT 102 on http://www-pat.fnal.gov/root/ eg: http://www-pat.fnal.gov/root/102/Documentation/Slides/Root%20102_03/ppframe.htm slides about gROOT Peter
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET