Feeding non-existing source files to hadd


when using hadd on non-existing source files like

hadd 1.root 2.root 3.root

(given neither 2.root nor 3.root exist), hadd tends to create the 1.root anyway, and its size is not null. I could not find a proper way to tell hadd not to create the 1.root in such case - did I miss it? If not and such functionality is indeed missing, can a flag to achieve this be added please?


ROOT Version: ROOT 6.14/04
Platform: linuxx8664gcc

One get an error message:

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

But I agree 1.root is created. May be check the existence of 2.root and 3.root before calling hadd.

Okay, good idea, thanks!

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