for cross-checking results between analyses, I need to take a root tuple and convert it identical to the style of another root tuple. What would be the most straight-forward way for doing this?
The original format does not have all the variables that the desired format has, and in these cases just zeroes have to be filled to the unavailable variables.
I have tried to do this by using the (desired format) class generated by TTree->MakeClass(“convert”), cloning the tree structure and subsituting the variable values with values from the original format, but I have not had luck with this approach.
my code is attached, the main piece being TupleTransformer.C.
I managed to add a new item to the tree, but when trying to change values of an existing variable I face problems. I manage to affect the variable EvtHdr__mRun; it gets filled with a very big number 100 times instead of the loop variable that I try to fill it with.
Also, in my ResultTuple.root (attached) all the variables are just filled with zeroes instead of tha values from the DesiredFormat.root.