ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Herwig7Utils.Process Class Reference

Class for handling a single process. More...

Collaboration diagram for Herwig7Utils.Process:

Public Member Functions

def __init__ (self, ID, command, logfile_title)
 
def poll (self)
 

Public Attributes

 ID
 
 logfile_title
 
 logfile
 
 process
 

Detailed Description

Class for handling a single process.

This class provides the infrastructure to spawn a new subprocess from python, pipe the output to a logfile and check the status of the subprocess

Definition at line 92 of file Herwig7Utils.py.

Constructor & Destructor Documentation

◆ __init__()

def Herwig7Utils.Process.__init__ (   self,
  ID,
  command,
  logfile_title 
)

Definition at line 94 of file Herwig7Utils.py.

94  def __init__(self, ID, command, logfile_title):
95 
96  athMsgLog.info(ansi_format_info("Starting subprocess #{} with command '{}' and logfile '{}'".format(ID, ' '.join(command), logfile_title)))
97  self.ID = ID
98  self.logfile_title = logfile_title
99  self.logfile = open(logfile_title, 'w')
100  self.process = subprocess.Popen(command, stdout=self.logfile, stderr=self.logfile)
101 

Member Function Documentation

◆ poll()

def Herwig7Utils.Process.poll (   self)

Definition at line 102 of file Herwig7Utils.py.

102  def poll(self):
103  return(self.process.poll())
104 
105 

Member Data Documentation

◆ ID

Herwig7Utils.Process.ID

Definition at line 97 of file Herwig7Utils.py.

◆ logfile

Herwig7Utils.Process.logfile

Definition at line 99 of file Herwig7Utils.py.

◆ logfile_title

Herwig7Utils.Process.logfile_title

Definition at line 98 of file Herwig7Utils.py.

◆ process

Herwig7Utils.Process.process

Definition at line 100 of file Herwig7Utils.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::open
@ open
Definition: BinningType.h:40
Herwig7Utils.ansi_format_info
def ansi_format_info(text)
Blue colouring.
Definition: Herwig7Utils.py:262