Hi Stefano, I cannot reproduce this problem. Which version are you using? Could you do the following cd $ROOTSYS/tutorials root -b -q hsimple.C g++ -o cmerge cmerge.cxx `root-config --cflags --libs` cmerge where cmerge.cxx is the file below Rene Brun //file cmerge.cxx #include "TChain.h" int main(int argc, char **argv) { TChain dataset("ntuple"); dataset.Add("hsimple.root"); dataset.Add("hsimple.root"); dataset.Merge("dataset.root"); dataset.Print(); } On Fri, 12 Jul 2002, Stefano Lacaprara wrote: > Hi, > I've written a simple program which takes a list of Trees and merge them in > a TChain object > > int main(int argc, char **argv) > { > TROOT loop("loop","Loop on events"); > > char* datasetname=""; > if(argc>=2) datasetname = argv[1]; > > //Reset ROOT and connect tree file > TChain dataset("MuonRecoTree"); > > FILE *filelist = fopen(datasetname,"r"); > char line[80]; > > while(fscanf(filelist,"%s",&line)>0) > dataset.Add(line); > > fclose(filelist); > dataset.Merge("dataset.root"); > dataset.Print(); > } > where the first argument is the name of a file which contains the list of > trees to be merged. > > Running it on a remote host behind a firewall, I've noticed that the issue > of TChain::Merge tries to open a X connection to my machine: this fails and > the process aborts. If the socket can be opened, then the merging is ok. > > Why (and who -) it tries to open a X connection? Does it make sense? > > Cheers, > Stefano Lacaprara > > -- > Stefano Lacaprara Ph.D Lacaprara@pd.infn.it \\\|/// > I.N.F.N. & Universita' di Padova \\ - - // > http://www.pd.infn.it/~lacaprar ( 0 0 ) > PHONE +39-049-8277100 FAX +39-049-8756233 -oOOo-(_)-oOOo- >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:59 MET