I have an existing ROOT script (.C) which loops over a parameter value (particle mass in this case) and for each value merges some RooStats output from multiple directories. We have just added some additional output to those directories in the form of .root files containing a single TTree, so it will be enough to use
hadd to create a summed file for that parameter value (mass value). I would like to just do this summation from the existing .C script, since it is already doing the loop I need.
My question is:
Is it possible to use
hadd from within a ROOT script? I’ve only ever used from the bash command line directly, so I’m not sure how this can be achieved. Thanks!