ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
isDSinFAX.Command Class Reference
Inheritance diagram for isDSinFAX.Command:
Collaboration diagram for isDSinFAX.Command:

Public Member Functions

def __init__ (self, cmd)
 
def run (self, timeout)
 

Public Attributes

 cmd
 
 process
 

Detailed Description

Definition at line 30 of file isDSinFAX.py.

Constructor & Destructor Documentation

◆ __init__()

def isDSinFAX.Command.__init__ (   self,
  cmd 
)

Definition at line 32 of file isDSinFAX.py.

32  def __init__(self, cmd):
33  self.cmd = cmd
34  self.process = None
35 

Member Function Documentation

◆ run()

def isDSinFAX.Command.run (   self,
  timeout 
)

Definition at line 36 of file isDSinFAX.py.

36  def run(self, timeout):
37  def target():
38 # print ('command started: ', self.cmd)
39  self.process = subprocess.Popen(self.cmd, shell=True)
40  self.process.communicate()
41 
42  thread = threading.Thread(target=target)
43  thread.start()
44 
45  thread.join(timeout)
46  if thread.is_alive():
47  print ('Terminating process')
48  self.process.terminate()
49  thread.join()
50  return self.process.returncode
51 
52 
53 #print ('Geting data from AGIS ...')
54 

Member Data Documentation

◆ cmd

isDSinFAX.Command.cmd

Definition at line 33 of file isDSinFAX.py.

◆ process

isDSinFAX.Command.process

Definition at line 34 of file isDSinFAX.py.


The documentation for this class was generated from the following file:
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
COOLRates.target
target
Definition: COOLRates.py:1106