I have  a class MyDirClass inherited from TDirectory
and tree structure of such objects in TFile.
Written once  this file can not be read again.
 The possible solution of this problem
in correction of TObject::Write() (see TObject source)
substituting the string 
   if (IsA() == TDirectory::Class()) {
by  
   if (InheritsFrom("TDirectory")) {
    
             Good luck to everybody!     Valery