Hadd does not recognize (at least) certain flags

Both the -j and -v flags produce errors in hadd.

hadd appears not to recognize the option -v:

hadd -v 0 haddout.root haddin.root

produces

hadd Target file: 0
hadd compression setting for all output: 1
hadd Source file 1: haddout.root
Error in <TFile::TFile>: file haddout.root does not exist
Error in <TFileMerger::AddFile>: cannot open file haddout.root
hadd exiting due to error in haddout.root

-j works fine if given at the front of the arguments but putting it at the back causes it to be interpreted both as the parallel argument and 8 as an input file:

hadd haddout.root haddin.root -j 8

produces

Parallelizing  with 8 processes.
hadd Target file: haddout.root
hadd compression setting for all output: 1
Each process should handle at least 3 files for efficiency. Setting the number of processes to: 1
hadd Source file 1: 8
Error in <TFile::TFile>: file 8 does not exist
Error in <TFileMerger::AddFile>: cannot open file 8
hadd exiting due to error in 8
hadd failed at the parallel stage

I have not tested any other flags.


ROOT Version: 6.19/01
Platform: macOS
Compiler: Not Provided


-v does not take any argument:

hadd -v haddout.root haddin.root

should work.

but putting it at the back

hadd only supports argument at the front (and does not do a good job of failing when they are not).

From hadd --help:

hadd ... [-v V] ...
...
  -v                                   Explicitly set the verbosity level: 0 request no output, 99 is the default

and indeed, hadd -v haddout.root haddin.root produces the same output as hadd haddout.root haddin.root (and it throws no errors).

humm … my bad, I indeed mis-read … it should have worked … but isn’t :frowning:

See https://github.com/root-project/root/pull/3914

Thank you much for your prompt response!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.