Skip to content

More missing trees protections and updates

PR Description

While running the categorization step, I realized that some of the output files were not containing an Events TTree: this happens when the input PreprocessRDF file has few events none of which pass the specific category selections. For example this happened for the TTto4Q sample in the DY_CR_res1b category.

Similarly to what was done in !79 (merged) for PreprocessRDF, I'm adding here a protection for the Categorization step to make sure that in case no events pass the selections, an empty Events TTree is saved in the output file.

EDIT:
Additionally the following changes/protections have been added:

  • A check on files without a TTree in MergeCategorization
  • Updated the output of MergeCategorization to have an empty TTree in case all input files are empty
  • Added a check in PrePlot to make sure that if the input TTree hase zero entries, an histogram with 0 entries is returned (without crashing 😄)

PR Validation

I was able to run the categorization step and I verified by hand that the output file had a TTree.
But, since I don't recall anyone else ever complaining about this issue (which seems a bit strange), I would still like to hear the opinion from @jmotta and @jleonhol. EDIT: the full chain from PreprocessRDF to FeaturePlot was run successfully: !82 (comment 9059199)

FYI @cepeda

Edited by Francesco Brivio

Merge request reports

Loading