ATLAS Offline Software
Loading...
Searching...
No Matches
output_validator.py
Go to the documentation of this file.
1# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3from AthenaCommon import Logging
4from ...decorators import timed
5import os
6
7
8logger = Logging.logging.getLogger("PowhegControl")
9
10
11@timed("output validation")
12def output_validator(powheg_LHE_output):
13 """! Check for required output file.
14
15 @param powheg_LHE_output Name of LHE file produced by PowhegBox.
16
17 @author James Robinson <james.robinson@cern.ch>
18 """
19 if not os.path.isfile(powheg_LHE_output):
20 logger.warning("No output LHEF file found! Probably because the Powheg process was killed before finishing.")
21 raise RuntimeError("No output LHEF file produced by Powheg. Terminating job.")