ATLAS Offline Software
Generators
PowhegControl
python
algorithms
preprocessors
preprocessors/directory_cleaner.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
glob
6
import
os
7
8
9
logger = Logging.logging.getLogger(
"PowhegControl"
)
10
11
12
@
timed
(
"directory cleaner"
)
13
def
directory_cleaner
(*args):
14
"""! Clean up the directory before running.
15
16
Remove any existing LHE files to avoid repeated events.
17
18
@author James Robinson <james.robinson@cern.ch>
19
"""
20
for
LHE_file
in
glob.glob(
"*.lhe"
) + glob.glob(
"*.ev*ts"
):
21
logger.warning(
"Removing existing LHE file: {}"
.
format
(LHE_file))
22
os.remove(LHE_file)
python.decorators.timed.timed
def timed(name)
Decorator to output function execution time.
Definition:
timed.py:12
vtune_athena.format
format
Definition:
vtune_athena.py:14
python.algorithms.preprocessors.directory_cleaner.directory_cleaner
def directory_cleaner(*args)
Clean up the directory before running.
Definition:
preprocessors/directory_cleaner.py:13
Generated on Mon Dec 23 2024 21:09:27 for ATLAS Offline Software by
1.8.18