Hello Rooters, During my analysis I ran into something which I find really hard to understand (in fact, I dont understand it at all) and I hope that someone knows where this problem comes from. The problem is the following: I have 15 data-files which contain a couple of TH1F histograms. One of these histograms, called signalX (where X = 1...15), has errors that are not the default sqrt(N) but some other number. I have calculated this number for all the bins, and set all the errors. I know for sure that this is done correctly, because when I look at the files interactively, I get error-bars of the size that one would expect for this data. However, I want to plot all these 15 signal histograms in a certain fashion on one pad. To do this i divide the pad (6 x 6) and I extract the histograms from the file with a line like: TH1F signalX("signalX","signalX",.....); signalX.Add((TH1F *)(TFile("binX.root")->Get("SignalX")),1.0); But, of course, then the errors dont get copied, so I had to change this code somewhat. What was encouraging was the fact that I could plot all the signals in the way that I wanted to. To take the errors into account, I changed the above code into: TH1F signalX("signalX","signalX",....); PrepSignal(signalX,X,number_of_bins); with: void PrepSignal(TH1F& signal, int bin, int num_bins) { cout << "doing cycle " << bin << endl; TFile myfile(GetDaNameToo(bin),"READ"); TH1F *data = (TH1F *)(myfile.Get(GetSignal(bin))); signal.Add(data,1.0); for(int i = 1; i < num_bins; i++){ signal.SetBinError(i,data->GetBinError(i)); } } the 'GetDaNameToo' and 'GetSignal' return the names of the appropriate file and Signal for the bin. This code workes all in all very nice, expect for the fact that I can not plot two of my 15 bins. When I try to plot one of them, the program starts hanging, and I don't get an update of my canvas or pad. When I exclude them, I get a nice plot, with the rest of the signals and with the correct errors. I checked the Dump's of the original signal's of these two bins (produced them while running root interactively) and compared them with the ones that are produced by the above procedure. According to the data that I then get, both of them are completly identical. So, my question is: what can cause this strange behaviour, and more important, how can I solve this ? Sven Schagen -- ********************************************************************** Sven E.S. Schagen Zeus Analysis Bladmoshof 6 NIKHEF Amsterdam 1441 LN Purmerend Kruislaan 409 The Netherlands 1098 SJ Amsterdam (0)299 436995 The Netherlands (0)20 592 5025 Student of Physics, Don't turn your back on your friend, University of Amsterdam no matter what! (schagen@beta.uva.nl) -Call Upon My Brothers Ignite **********************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET