Hi, Why chains do not have their own name ? It is thus impossible to access them via gROOT->FindObject(). Here's my problem. I would like to have a macro that create a chain, and then at the prompt line I would like to play with this chain : void macro(Int_t i1, Int_t i2) { ... TChain* chain = new TChain("thetreename"); for (i=i1;i<=i2;i++) chain->Add(filename[i]) ; } root[1] .x macro.C(702,781) root[2] TChain* p=(TChain*)gROOT->FindObject("thetreename"); root[3] ...play with p... It seems to me that of course in line 2, it's the tree object that will be found. Why not a chain constructor like TChain::TChain(char* chainname, char* treename) ? Thanks. -- APHECETCHE Laurent (mailto:aphecetche@ganil.fr) GANIL, B.P. 5027, 14076, Caen Cedex 5, France Vox: +33 (0)2 31 45 45 85 - Fax: +33 (0)2 31 45 46 65 WWW: http://ganp03.in2p3.fr/nof/ & (perso.) http://www.mygale.org/~p0mp0n
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:32 MET