Loading TObjects from Splitlevel=99 TTree

Hey Root,

I am trying to implement some data reduction methods in a data structure; however, I need to keep back compatibility with old analysis scripts. Our old data class had 3 Double_t 's, these have been replaced with 4 UShort_ts that can be used to calculate the 3 Double_ts. The idea is to make the 3 Double_ts transient and have them recalculated when the TObject is read in with a custom Streamer. I hit a road block when I realized that with splitlevel=99, the TTree does not use the Streamer. Is there still a away to have these transients calculated when an entry is loaded? Is there an operator or constructor method that I could overwrite to do this?

My other question is if there is a way to have a branch saved in a tree that is nothing more than a formula? My thought is that I can replace the Double_t variables’s branches in the TTree with simply the formula that is used to calculate these variables from the 4 UShort_t’s. Would it be possible to load a branch with the same object that the TTreeViewer uses for its E() objects? I am trying to keep the simple tree->Draw(“Double_tVariable”) functionality but with now only having the UShort_ts saved to disk.



The I/O customization rules are designed for this purpose, for example#pragma read sourceClass="RooProduct" targetClass="RooProduct" version="[1]" source="RooSetProxy _compRSet" target="_compRSet" code="{ _compRSet.add(onfile._compRSet) ; }"

You can also attach a ‘formula’ to the TTree withtree->SetAlias("summary","val1+val2");