def writeHistos(self): """Write all histogram files. This function will write all of the histogram files into the nstat directory. **WARNING: THE 'nstat' DIRECTORY MUST BE PRESENT! """ cviewHisto.writeToFiles()
def writeHistos(self): """Write all histogram files. This function will write all of the histogram files into the nstat directory. **WARNING: THE 'nstat' DIRECTORY MUST BE PRESENT! """ cviewHisto.writeToFiles()
for i in range(numChildren): outputPipeList[i].write('\n') # send xtra '\n' to avoid deadlocks outputPipeList[i].close() # wait for results to be sent back from children while inputPipeList != []: (readable, wL, xL) = select.select(inputPipeList, [], []) for reader in readable: childHistos = pickle.loads(reader.read()) for h in childHistos.keys(): if not histos.has_key(h): histos[h] = cviewHisto(childHistos[h].group, childHistos[h].desc, childHistos[h].rate, childHistos[h].isCumulative, childHistos[h].isSharedY) histos[h].merge(childHistos[h]) # clean up the child that just finished reader.close() inputPipeList.remove(reader) (cpid, status) = os.wait() if status != 0: errMssg = 'Child pid ' + str(cpid) + ' exit status = ' + str(status) sys.stderr.write(errMssg + '\n') # write all histos to files os.chdir(homeDir) cviewHisto.writeToFiles()
for i in range(numChildren): outputPipeList[i].write('\n') # send xtra '\n' to avoid deadlocks outputPipeList[i].close() # wait for results to be sent back from children while inputPipeList != []: (readable, wL, xL) = select.select(inputPipeList, [], []) for reader in readable: childHistos = pickle.loads(reader.read()) for h in childHistos.keys(): if not histos.has_key(h): histos[h] = cviewHisto(childHistos[h].group, childHistos[h].desc, childHistos[h].rate, childHistos[h].isCumulative, childHistos[h].isSharedY) histos[h].merge(childHistos[h]) # clean up the child that just finished reader.close() inputPipeList.remove(reader) (cpid, status) = os.wait() if status != 0: errMssg = 'Child pid ' + str(cpid) + ' exit status = ' + str( status) sys.stderr.write(errMssg + '\n') # write all histos to files os.chdir(homeDir) cviewHisto.writeToFiles()