Hi, this way it works... Thanks for all the answers. Cyril Lachaud. On Mon, 20 Nov 2000, Stephen Bailey wrote: > > Hi Cyril. > > Replace > TH1F *htemp; > with > TH1F *htemp = gROOT->FindObject("htemp"); > > "htemp" is the name of the histogram out in RootSpace that > you have to get your pointer to point to. You could have > called your pointer TH1F* hblat if you wanted; the important > part is to get a pointer to what Root named "htemp". > In compiled code, I'm not sure what you need to do (if > anything) to gain access to gROOT, but you need to make > a call to TROOT::FindObject() to get the pointer. > > Ciao. > > Stephen > > On Mon, 20 Nov 2000, Cyril Lachaud wrote: > > > > > Hi again, > > > > thank you for the answer... but I'm still not satisfied... > > > > Here is my code: > > > > fFiles_chained->Draw("variable"); > > fHCanvas->Update(); // it gives me the good histogramm : htemp > > TH1F *htemp; > > htemp->SetXTitle("toto"); > > > > The last command gives the following error: > > *** Break *** segmentation violation > > > > If you have the answer... > > > > Cyril Lachaud. > > > > > > On Mon, 20 Nov 2000, Rene Brun wrote: > > > > > Hi Cyril, > > > > > > If htemp is in your current pad gPad, from the command line, you can do: > > > htemp->GetXaxis()->SetTimeDisplay(1); > > > htemp->GetXaxis()->SetTimeFormat("some format"); > > > > > > Rene Brun > > > > > > Cyril Lachaud wrote: > > > > > > > > Hi Rooters, > > > > > > > > I'm working on a shared library (so not "in line"). > > > > > > > > I would like to know how to access to the histo filled after the > > > > TChain->Draw method... (to modify axis for time format for example). > > > > > > > > As far as I know this histo is called by default "htemp". But how can I do > > > > htemp->GetXaxis->SetTimeFormat() ? > > > > > > > > Thank you. > > > > > > > > Cyril Lachaud > > > > > > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET