Hi, writing a TClass to file works without any problems, it's just that the read TClass is pretty much unusable. This makes kind of sense, as TClass is more or less a static object. But there are some cases where storing a TClass* would be helpful, e.g.: A map from TClass* to whatever-baseclass*, where the TClass* allows to identify and access objects deriving from whatever-baseclass. Now, the suggestion I have is to make TClass store only the class name, and when reading back, to let TClass's streamer search for the TClass already instantiated which belongs to this class name. I believe this would be the naive expectation of what a persistent TClass* does. The questions I have are: * What do you (users and rootdev) think about that? Does it interfere with what other people do with a persistent TClass? * Reading a member of type TClass*, is there any way ROOT can set this pointer to the TClass object already instatiated or will we end up with two instatiations for the same class? Cheers, Axel.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:02 MET