after succeeded to write my class deriving from TObject to a file, i found another issue to solve.
(One solution opens a more complicated problem, often ).
I have to hadd many files and of course by default my user class is not handled.
Looking into hadd.cxx i saw that i can implement a Merge(TCollections*) method to sum my class over multiple files. Can you kindly point me to an example to understand “how” i have to implement it ?
Did you create a rootmap file for your class(es)? if not, hadd cannot dynamically link your shared lib.
An alternative for you is to use the class TFileMerger that provides the same functionality as hadd.
i tried with TFileMerger compiling a small C++ code linking my class dictionary.
When i run it, it merges histograms but just copies my class without calling my Merge method.
Am i missing something?