Hi,
there is something which is not clear to me, maybe you can help: If I get an object using TDirectory::Get, is this object still valid when the file is closed?
Would the following work?
TObject *ReadObject(const char *filename, const char *objname)
{
TFile f(filename, "READ");
return f.Get(objname);
}
void main()
{
TObject *o = ReadObject("myfile.root", "MyObject");
// Do something with it
delete o;
}
Thanks,
Thomas.
Received on Mon Apr 18 2005 - 17:12:17 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET