Re: [ROOT] TChain::merge opens a X socket??

From: Stefano Lacaprara (Stefano.Lacaprara@pd.infn.it)
Date: Mon Jul 15 2002 - 18:11:11 MEST


Hi Rene,
  the version I'm using is
Version  3.01/06 10 July 2001,
(CINT/ROOT C/C++ Interpreter version 5.15.06, June 30 2001)
on: Linux 2.2.19-6.2.1.1smp #1 SMP Tue Apr 17 20:00:04 CEST 2001 i686 unknown

Running your example I have no problem, neither X connection.

It seems that this funny behavior depends on the type of trees I try to
merge: I've put a full example on

/afs/cern.ch/user/s/slacapra/public/for_Rene/TreeMerge.tgz

with merge.cpp, the Makefile I use and one of the trees I'm trying to merge.
When I try to execute
~>./merge lista
I'm asked (by mxconns) to accept an incoming connection, and, if I say ok,
the merging is successful. If I deny the permission, the jobs crashes:
...
Xlib: connection to "lxcmspc3.pd.infn.it:64.0" refused by server
Xlib: Client is not authorized to connect to Server
Error in <TGClient::TGClient>: can't open display "lxcmspc3.pd.infn.it:64.", bombing...
...

Cheers,
  Stefano

* On Sat, Jul 13, 2002 at 12:43:46PM +0200, Rene Brun wrote:
> 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-
> > 

-- 
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