ATLAS Offline Software
Generators
PowhegControl
python
algorithms
generators
output_validator.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon
import
Logging
4
from
...decorators
import
timed
5
import
os
6
7
8
logger = Logging.logging.getLogger(
"PowhegControl"
)
9
10
11
@
timed
(
"output validation"
)
12
def
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."
)
python.decorators.timed.timed
def timed(name)
Decorator to output function execution time.
Definition:
timed.py:12
python.algorithms.generators.output_validator.output_validator
def output_validator(powheg_LHE_output)
Check for required output file.
Definition:
output_validator.py:12
Generated on Thu Nov 7 2024 21:23:04 for ATLAS Offline Software by
1.8.18