ATLAS Offline Software
external_base.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 ..configurable import Configurable
5 import os
6 
7 
8 logger = Logging.logging.getLogger("PowhegControl")
9 
10 
12  """! Base class for external processes.
13 
14  All external processes inherit from this class.
15 
16  @author James Robinson <james.robinson@cern.ch>
17  """
18 
19  def __init__(self, name, *executable_path):
20  """! Constructor.
21 
22  @param name name of this external process.
23  @param executable_path path to appropriate PowhegBox executable.
24  """
25  super(ExternalBase, self).__init__()
26 
27 
28  self.name = name
29 
30 
31  if executable_path:
32  self.executable = os.path.join(*executable_path)
33  else:
34  self.executable = None
35 
36  def needs_scheduling(self, process):
37  """! Report whether this external process should be scheduled.
38 
39  @param process PowhegBox process.
40  """
41  raise AttributeError("Must be implemented by children!")
python.processes.external.external_base.ExternalBase.__init__
def __init__(self, name, *executable_path)
Constructor.
Definition: external_base.py:19
python.processes.external.external_base.ExternalBase
Base class for external processes.
Definition: external_base.py:11
python.processes.external.external_base.ExternalBase.needs_scheduling
def needs_scheduling(self, process)
Report whether this external process should be scheduled.
Definition: external_base.py:36
python.processes.external.external_base.ExternalBase.name
name
Name of this external process.
Definition: external_base.py:28
python.processes.external.external_base.ExternalBase.executable
executable
External executable that will be used.
Definition: external_base.py:32
python.processes.configurable.Configurable
Class for any process which can be configured.
Definition: configurable.py:10