I’m trying to merge files that have TTrees that are output of geant simulations, as well as objects of other custom classes, e.g. “Info” classes that contain common parameters used to do the simulation. However, “hadd” chokes on the custom class objects, and so none. of the info objects get into the final file. This effectively eliminates the advantage of parallel computing, particularly important when dealing with geant.
I searched this forum for similar questions, and find that there is apparently anonymous “documentation” that describes how to write mergeable classes, but it’s not clear where that documentation exists, could someone please point me to it?
Alternatively, it seems hadd could stand to have additional options that give the user some flexibility without having to generate additional code, e.g.:
have the object from the first (or nth) file copied to the output; this would be useful in the case that all of the files have the same information in that object
have all such objects copied to the final output without merging, and with version specifiers, e.g. “;1”, “;2”, “;3”, etc.
we take note of your request for a better documentation about mergeable classes: we’ll take an action about this.
For the time being, did you try to implement for your classes a Merge method like the one of TH1, i.e. with the signature Long64_t MyClass::Merge(TCollection*)?
So I have run across this problem again, having forgotten that I already asked about this last fall - I don’t see any updates to the howtos. Is there any progress on this?