Hi Root people, I have a macro that was written for ROOT on the NT. This macro utilizes two global TStrings that are set by the user prior to calling the macro. The macro then attempts to use these strings as the arguments in a call to TTree::Draw(), one argument for the variable, one for the cut. This yields no problem on the NT machine, but on the Linux (RedHad 5.2, using ecgs 1.0.3, and Root 2.21/01) this generates an error: TString varname = "x" TString cut = "D>.3" //macro begins { // sample routine to plot the results c1 = new TCanvas("PDE:Results","PDE Results",131,0,698,830); Pad1 = new TPad("Signal","Signal",0.0341297,0.538576,0.464164,0.970326,21); Pad2 = new TPad("Background","Background",0.520478,0.540059,0.950512,0.974777,21); Pad3 = new TPad("Test","Test",0.0307167,0.074184,0.460751,0.5,21); Pad4 = new TPad("pad4","The Surface",0.518771,0.075667,0.947099,0.50,21); c1->Draw(); Pad1->Draw(); Pad2->Draw(); Pad3->Draw(); Pad1->cd(); cout << varname << endl; cout << cut << endl; pdeSignalResult->Draw(varname,cut); ... Where pdeSignalResult is a TTree that contains the variable x. It is this last line that generates the error: Error: Can't call TTree::Draw() in current scope FILE:plotit.C LINE:16 *** Interpreter error recovered *** Thanks, Andrew Askew
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET