I/O Problem with Class derived from TDirectory

From: Dylan Maxwell <dylan.g.maxwell_at_gmail.com>
Date: Mon, 6 Jun 2005 11:52:36 -0600


Dear ROOTtalk,

I want to extend the capabilities of TDirectory so I've written a class TMyDir which inherits from TDirectory. (See the attached files) I compile TMyDir using ACLiC. I can create a new TMyDir within a TFile, but when I close the TFile and then re-open it, I get the follow error when I try to Get() the TMyDir object. I've included a short script, TestMyDir.C, that recreates the error. I'm running Fedora Core 3.


FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.169, Mar 14 2005 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] .x TestMyDir.C
Info in <TUnixSystem::ACLiC>: creating shared library /mnt/clshome/maxweld/Code/cpp/LTP/src/./TMyDir_cxx.so

TFile**         mydir.root
 TFile*         mydir.root

  KEY: TMyDir MyDir;1 MyDirectory
Error in <TClass::ReadBuffer2>: class: TUUID, attempting to access a wrong version: 127, object skipped at offset 97 SysError in <TFile::Seek>: cannot seek to position 60798594976055296 in file mydir.root, retpos=1 (Invalid argument) Error in <TFile::ReadBuffer>: error reading all requested bytes from file mydir.root,
got 153 of 3342396

Have I missed something obvious in my implementation of TMyDir?

Thank You in Advance,
Dylan Maxwell

Received on Mon Jun 06 2005 - 19:52:46 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET