Hi Jan, you can do: #include <TROOT.h> #include <TFile.h> int main() { //TROOT simple("analyze","Analysing of noidentical particle correlations"); gROOT->SetBatch(); // go in batch mode doesn't open X11 connection TFile *file; file = new TFile("~/public/QINVpi-p_3905_3909_2.root","UPDATE","File"); file->Close(); } note that TROOT is not needed anymore (is automatically created by system and always accessable via gROOT pointer). Cheers, Fons. Jan Smolik wrote: > > Dear Rooters > > I tried to compile and execute following simple code on machine without > X connection (using ROOT 3.02/04): > > > #include <TROOT.h> > #include <TFile.h> > > int main() { > > TROOT simple("analyze","Analysing of noidentical particle > correlations"); > TFile *file; > file = new TFile("~/public/QINVpi-p_3905_3909_2.root","UPDATE","File"); > file->Close(); > } > > The program crash with this message > > X11 connection rejected because of wrong authentication at Wed Dec 5 > 18:29:57 2001. > a > Rejected connection at Wed Dec 5 18:29:57 2001: X11 connection from > na49i02.cern.ch port 2013 > > X connection to na49i04:10.0 broken (explicit kill or server shutdown). > > *** Break *** segmentation violation > Abort (core dumped) > > How can I avoid this problem ? > > Thanks in advance > > Jan Smolik > > -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:11 MET