It looks like you forgot a statement like void myprogram() { Rene Brun On 21 Jun 2004, Francesco Perfetto wrote: > Hi all, > > I would like add 2 or more file in a chain. > I do in my compilated program: > > #define res_class_cxx > #include "res_class.h" > #include <iostream.h> > #include "TMath.h" > #include "TFormula.h" > #include "TH1.h" > #include "TF1.h" > #include "TROOT.h" > #include "TLorentzVector.h" > #include "TObject.h" > #include "TFile.h" > #include "TTree.h" > #include "TMinuit.h" > #include "TGraph.h" > #include "TCut.h" > #include "TChain.h" > > > Double_t func(Double_t *xv,Double_t *par) > { > Double_t z = xv[0]; > //return (1. + par[0]*z)*par[1]; > // par[0] = g = 2 alfa > return (1. + par[0]*z); > } > > const Double_t PI = 3.1415926; > const Int_t nparams = 1; > //const Int_t nparams = 2; > > TChain chain("res"); > chain.Add("/data2/perfetto/bunch_1_minuit.root"); <----THIS IS LINE 33 > chain.Add("/data2/perfetto/bunch_2_minuit.root"); <----THIS IS LINE 34 > chain.Add("/data2/perfetto/bunch_3_minuit.root"); <----THIS IS LINE 35 > ... > chain.Draw("controllo"); > ... > > When I do gmake at command line, I have the following error: > > > gmake > g++ -MM -g -D_REENTRANT -I/cern/root/include likelihood.cc > Linux/likelihood.d > In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, > from likelihood.cc:3: > /usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. > g++ -g -D_REENTRANT -I/cern/root/include -c likelihood.cc -o Linux/likelihood.o > In file included from /usr/include/c++/3.2.2/backward/iostream.h:31, > from likelihood.cc:3: > /usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. > likelihood.cc:33: syntax error before `.' token > likelihood.cc:34: syntax error before `.' token > likelihood.cc:35: syntax error before `.' token > gmake: *** [Linux/likelihood.o] Error 1 > > > There is anyone that can help me? > > Thanks in advance. > Francesco. >
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET