Change to hadd that breaks previously working code

Hi,

I have some code that previously worked fine, however using a recent ROOT version it no longer works.

The problem comes when I try to hadd some files. These files are ROOT files, and can be opened fine e.g. looking at them in TBrowser they are fine, but their filename does not end in .root .

Previously hadding these was fine, but now when I try to hadd them I get the error:

hadd could not validate argument “<filepath+name>” as input file

I notice that in the most recent addition to hadd.cxx [hadd] fix processing of indirect file when multiprocess is enabled (… · root-project/root@65fdf8c · GitHub

A check was added

         if (gSystem->AccessPathName(line.c_str(), kReadPermission) == kTRUE || (!TString(line).EndsWith(".root"))) {
            std::cerr << "hadd could not validate argument \"" << line << "\" as input file " << std::endl;

So hadd now fails on any file that does not end .root. Is there an option to avoid this check, and if not could one please be added? Or ideally could this check be changed to properly check if a file is a ROOT file rather than just guessing based on the filename (I guess using isZombie() could work?)

Thank you,
Jack


ROOT Version: 6.32.02
Platform: linuxx8664gcc
Compiler: g++ (GCC) 13.1.0


Hi @JackLindon,

thank you for your inquiry. I believe either @pcanal or @vpadulan could comment on this further.

Cheers,
Marta

Thanks for the report. See a proposed fix here following your suggestion: [hadd] allow ROOT files without .root extension by ferdymercury · Pull Request #16001 · root-project/root · GitHub

Hi Marta and Ferhue,

Thank you very much for the fix.

Cheers,
Jack

Is there any workaround in 6.32?

You could create a symbolic link between filename and filename.root