Gaudi Framework, version v23r0 |
Home | Generated: Mon Jan 30 2012 |
Public Member Functions | |
def | __init__ |
def | execute |
def | finalize |
Public Attributes | |
log | |
Private Attributes | |
_gmpc |
GaudiPython algorithm used to clean up histos on the Reader and Workers Only has a finalize method() This retrieves a dictionary of path:histo objects and sends it to the writer. It then waits for a None flag : THIS IS IMPORTANT, as if the algorithm returns before ALL histos have been COMPLETELY RECEIVED at the writer end, there will be an error.
Definition at line 181 of file GMPBase.py.
def GaudiMP::GMPBase::CollectHistograms::__init__ | ( | self, | |
gmpcomponent | |||
) |
Definition at line 190 of file GMPBase.py.
def GaudiMP::GMPBase::CollectHistograms::execute | ( | self ) |
Definition at line 195 of file GMPBase.py.
def GaudiMP::GMPBase::CollectHistograms::finalize | ( | self ) |
Definition at line 197 of file GMPBase.py.
00198 : 00199 self.log.info('CollectHistograms Finalise (%s)'%(self._gmpc.nodeType)) 00200 self._gmpc.hDict = self._gmpc.dumpHistograms( ) 00201 ks = self._gmpc.hDict.keys() 00202 self.log.info('%i Objects in Histogram Store'%(len(ks))) 00203 # crashes occurred due to Memory Error during the sending of hundreds 00204 # histos on slc5 machines, so instead, break into chunks 00205 # send 100 at a time 00206 chunk = 100 00207 reps = len(ks)/chunk + 1 00208 for i in xrange(reps) : 00209 someKeys = ks[i*chunk : (i+1)*chunk] 00210 smalld = dict( [(key, self._gmpc.hDict[key]) for key in someKeys] ) 00211 self._gmpc.hq.put( (self._gmpc.nodeID, smalld) ) 00212 # "finished" Notification 00213 self.log.debug('Signalling end of histos to Writer') 00214 self._gmpc.hq.put( 'HISTOS_SENT' ) 00215 self.log.debug( 'Waiting on Sync Event' ) 00216 self._gmpc.sEvent.wait() 00217 self.log.debug( 'Histo Sync Event set, clearing and returning' ) 00218 self._gmpc.hvt.clearStore() 00219 root = gbl.DataObject() 00220 setOwnership(root, False) 00221 self._gmpc.hvt.setRoot( '/stat', root ) 00222 return SUCCESS 00223 00224 # =============================================================================
Definition at line 190 of file GMPBase.py.
Definition at line 190 of file GMPBase.py.