Closed nshadskiy closed 2 weeks ago
I propose ths following solution:
adapt the return codes here (https://github.com/KIT-CMS/CROWN/blob/78bd17644e7ab0ecbde54cf4d1f45c67ca076a9a/code_generation/analysis_template_friends.cxx#L117) and here (https://github.com/KIT-CMS/CROWN/blob/78bd17644e7ab0ecbde54cf4d1f45c67ca076a9a/code_generation/analysis_template_friends.cxx#L110) to some special value (e.g. 55
)
Catch this return code in Kingmaker to treat CROWN executables with this return code in a special way, so the jobs to not fail, and its okay that they do not produce any output (or produce some dummy output for the TChain)
@ralfschmieder was working on a solution to this if i remember correctly ?
resolved in https://github.com/KIT-CMS/CROWN/pull/281
It might happen that no events are selected during ntupling. e.g. here for a data nanoAOD
The output ntuple is still saved with all the information but since no events are selected no "ntuple" tree is saved. e.g.
If now a friend should be generated the code is checking if the "ntuple" tree is present: https://github.com/KIT-CMS/CROWN/blob/78bd17644e7ab0ecbde54cf4d1f45c67ca076a9a/code_generation/analysis_template_friends.cxx#L45-L65 If this is not the case a error is thrown and no friend tree file is generated.
Maybe this could be handled by introducing a check for the last bin of the cutflow additionally to the check of the "ntuple" tree.