ATLAS Offline Software
Loading...
Searching...
No Matches
rhadd.haddJob Class Reference
Inheritance diagram for rhadd.haddJob:
Collaboration diagram for rhadd.haddJob:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

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

Protected Attributes

 _inputFiles = inputFiles
 _outputFile = outputFile
 _exitCode = None

Detailed Description

A single hadd job

Definition at line 40 of file rhadd.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 42 of file rhadd.py.

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

Member Function Documentation

◆ __call__()

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

Definition at line 78 of file rhadd.py.

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

◆ __str__()

rhadd.haddJob.__str__ ( self)

Definition at line 75 of file rhadd.py.

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

◆ exe()

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

Definition at line 60 of file rhadd.py.

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

◆ exitCode() [1/2]

rhadd.haddJob.exitCode ( self)

Definition at line 52 of file rhadd.py.

52 def exitCode(self):
53 return self._exitCode
54

◆ exitCode() [2/2]

rhadd.haddJob.exitCode ( self,
value )

Definition at line 57 of file rhadd.py.

57 def exitCode(self, value):
58 self._exitCode = value
59

◆ outputFile()

rhadd.haddJob.outputFile ( self)

Definition at line 48 of file rhadd.py.

48 def outputFile(self):
49 return(self._outputFile)
50

Member Data Documentation

◆ _exitCode

rhadd.haddJob._exitCode = None
protected

Definition at line 45 of file rhadd.py.

◆ _inputFiles

rhadd.haddJob._inputFiles = inputFiles
protected

Definition at line 43 of file rhadd.py.

◆ _outputFile

rhadd.haddJob._outputFile = outputFile
protected

Definition at line 44 of file rhadd.py.


The documentation for this class was generated from the following file: