Skim: hadd doesn't work when first file has no selected events
Because of the way Snapshot
works, if a batch job runs on too few events for any of them to be kept, the output tree will have no defined branches.
This in turn causes problems if that very same file is the first file passed to the final hadd
after all jobs have finished: because the tree structure is taken from that first file, the merged output file will have no branches as well.
Perhaps a simple workaround would be to detect and remove the files with empty trees before running the hadd... but that is handled by the batch backend and not the skimmer module, so it's not the ideal place to do it.
Edited by Sebastien Wertz