the error may come from the fact you don't do anyting with the file File12 in you below example ... seb. On Thu, 10 Oct 2002, Rene Brun wrote: > Please provide more information, in particular extend > the "I get error ..." to something more useful. > > Note that instead of: > TH2D* TwoHisto = File1->Get("h2"); > you should do: > TH2D* TwoHisto = (TH2D*)File1->Get("h2"); > > Rene Brun > > > On Thu, 10 Oct 2002 kmakonyi@nist.gov wrote: > > > Dear RooTers, > > > > It is possible a very beginner question, but I don't know the solution. > > I have several directory. All of them contains many data, which are analized > > directory by directory, so after the analysis in every directory conains a root > > file also. > > In the root files there are two histogram. > > I would need to the "same" histogram from every directory. > > > > The problem is, if I do this: > > { > > TFile* File1 = new TFile("one.root"); > > TH2D* OneHisto = File1->Get("h2"); > > > > TFile* File12 = new TFile("two.root"); > > TH2D* TwoHisto = File1->Get("h2"); > > > > cout << OneHisto->GetNbinsX(); > > } > > > > I get error ... > > > > What can I do, What do I do wrong? > > Thanks, k. > > > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET