Dear ROOT developers,
here is a use case. I have a sort of a copier application, which is getting serialized objects from elswhere (a server, database, etc.) in a form of a bytestream, which was prepared by someone else by running proper streamers against various persistent classes. My copier would fill TBuffer from that input bytestream. My ultimate goal is to to put the contents of the TBuffer into TTree w/o going through an intermediate stage of deserializing an object. And of course I have (my application is linked against) a proper dictionary for the relevant persisent classes (though, ideally I’d like not to do it at all). Now I’m trying to use the following operation:
TBranch::SetBufferAddress(TBuffer&)
which is supposed to do what I need. A problem is that I also need to create a branch where I’ll be storing my objects. I’ve looked at a contract of the TTree class and it appears that all relevant factory methods for TBranch require me to prepare a pointer of a valid persistent class. Needless to say that I don’t want to do it in my application. If I’m trying to pass a pointer of “void”, “TObject”, etc. types then the branch creation method is failing complainig about a missmatch between a type of a pointer and a type of a final persistent class (which I also know).
What would be a technique for creating branches in this case? Is this possible at all?
My second question - which ‘splitlevel’ I need to set for this case to make working the above mentioned method ‘SetBufferAddress()’?
BTW, I’m using ROOT v5.10 if this matters.
Thank you for the help!
Igor