ATLAS Offline Software
external_photos.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 .external_base import ExternalBase
5 
6 
7 logger = Logging.logging.getLogger("PowhegControl")
8 
9 
11  """! Class for running external PHOTOS process.
12 
13  @author James Robinson <james.robinson@cern.ch>
14  """
15 
16  def __init__(self, *args):
17  """! Constructor.
18 
19  @param process PHOTOS process
20  """
21  super(ExternalPHOTOS, self).__init__("PHOTOS", *args)
22 
23  # Add parameters used by PHOTOS
24  self.add_keyword("PHOTOS_enabled")
25 
26  def needs_scheduling(self, process):
27  """! Report whether the PHOTOS process should be scheduled.
28 
29  @param process PowhegBox process.
30  """
31  # Check that PHOTOS is not disabled
32  self.expose()
33  if self.PHOTOS_enabled:
34  logger.info("Running with PHOTOS enabled")
35  else:
36  logger.info("Running without PHOTOS")
37  return False
38  return True
python.processes.configurable.Configurable.expose
def expose(self)
Add all names to the interface of this object.
Definition: configurable.py:46
python.processes.external.external_photos.ExternalPHOTOS.__init__
def __init__(self, *args)
Constructor.
Definition: external_photos.py:16
python.processes.configurable.Configurable.add_keyword
def add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs)
Register configurable parameter that is exposed to the user.
Definition: configurable.py:21
python.processes.external.external_photos.ExternalPHOTOS.needs_scheduling
def needs_scheduling(self, process)
Report whether the PHOTOS process should be scheduled.
Definition: external_photos.py:26
python.processes.external.external_base.ExternalBase
Base class for external processes.
Definition: external_base.py:11
python.processes.external.external_photos.ExternalPHOTOS
Class for running external PHOTOS process.
Definition: external_photos.py:10