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

Public Member Functions

def __init__ (self, inputFiles, outputFile)
 
def outputFile (self)
 
def exitCode (self)
 
def exitCode (self, value)
 
def exe (self)
 
def __str__ (self)
 
def __call__ (self)
 

Private Attributes

 _inputFiles
 
 _outputFile
 
 _exitCode
 

Detailed Description

A single hadd job

Definition at line 42 of file rhadd.py.

Constructor & Destructor Documentation

◆ __init__()

def rhadd.haddJob.__init__ (   self,
  inputFiles,
  outputFile 
)

Definition at line 44 of file rhadd.py.

44  def __init__(self, inputFiles, outputFile):
45  self._inputFiles = inputFiles
46  self._outputFile = outputFile
47  self._exitCode = None
48 

Member Function Documentation

◆ __call__()

def rhadd.haddJob.__call__ (   self)
Wrapper to call my own exe function and return the exit code of hadd

Definition at line 80 of file rhadd.py.

80  def __call__(self):
81  '''Wrapper to call my own exe function and return the exit code of hadd'''
82  self.exe()
83  return self._exitCode
84 
85 

◆ __str__()

def rhadd.haddJob.__str__ (   self)

Definition at line 77 of file rhadd.py.

77  def __str__(self):
78  return str(self._inputFiles) + ' -> ' + str(self._outputFile)
79 

◆ exe()

def rhadd.haddJob.exe (   self)
Execute the hadd command

Definition at line 62 of file rhadd.py.

62  def exe(self):
63  '''Execute the hadd command'''
64  mergeCmd = ['hadd', '-f'] # -f because our output file was touched to be safely created
65  mergeCmd.append(self._outputFile)
66  mergeCmd.extend(self._inputFiles)
67 
68  logging.info('Will now execute merge: %s' % ' '.join(mergeCmd))
69  output = []
70  job = Popen(mergeCmd, stdout=PIPE, stderr=STDOUT, bufsize=1, close_fds=True)
71  while job.poll() is None:
72  output.append(job.stdout.readline().strip())
73  self._exitCode = job.returncode
74  if self._exitCode != 0:
75  logging.warning('Non zero return code from hadd. STDOUT/ERR follows:\n%s' % os.linesep.join(output))
76 

◆ exitCode() [1/2]

def rhadd.haddJob.exitCode (   self)

Definition at line 54 of file rhadd.py.

54  def exitCode(self):
55  return self._exitCode
56 

◆ exitCode() [2/2]

def rhadd.haddJob.exitCode (   self,
  value 
)

Definition at line 59 of file rhadd.py.

59  def exitCode(self, value):
60  self._exitCode = value
61 

◆ outputFile()

def rhadd.haddJob.outputFile (   self)

Definition at line 50 of file rhadd.py.

50  def outputFile(self):
51  return(self._outputFile)
52 

Member Data Documentation

◆ _exitCode

rhadd.haddJob._exitCode
private

Definition at line 47 of file rhadd.py.

◆ _inputFiles

rhadd.haddJob._inputFiles
private

Definition at line 45 of file rhadd.py.

◆ _outputFile

rhadd.haddJob._outputFile
private

Definition at line 46 of file rhadd.py.


The documentation for this class was generated from the following file:
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
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
str
Definition: BTagTrackIpAccessor.cxx:11