def qfunc( queue, qglobals ):
    while True:
        try: mycall = queue.get( timeout = 5 )
        except ( Empty, IOError ): break
        exec( mycall )
        ROOT.gROOT.GetListOfCanvases().Clear()
        qglobals.nfinished += 1
        report_progress( qglobals.nfinished, qglobals.ntotal,
                        'plots', 'png' )
        queue.task_done()
Exemplo n.º 2
0
queue = multi.JoinableQueue()
qglobals = multi.Manager().Namespace()
qglobals.nfinished = 0
qglobals.ntotal = len(calls)
for call in calls:
    queue.put(call)


def qfunc(queue, qglobals):
    from Queue import Empty
    while True:
        try:
            mycall = queue.get(timeout=5)
        except (Empty, IOError):
            break
        exec(mycall)
        ROOT.gROOT.GetListOfCanvases().Clear()
        qglobals.nfinished += 1
        report_progress(qglobals.nfinished, qglobals.ntotal, 'plots', 'png')
        queue.task_done()


for i in range(24):
    p = multi.Process(target=qfunc, args=(queue, qglobals))
    p.daemon = True
    p.start()
queue.join()
report_progress(len(calls), len(calls), 'plots', 'png')
print ''
Exemplo n.º 3
0
canvas.SaveAs('plots/hMass_15To20_0To0.8_Pass.png')
""")


queue = multi.JoinableQueue()
qglobals = multi.Manager().Namespace()
qglobals.nfinished = 0
qglobals.ntotal = len(calls)
for call in calls:
    queue.put(call)

def qfunc(queue, qglobals):
    from Queue import Empty
    while True:
        try: mycall = queue.get(timeout=5)
        except (Empty, IOError): break
        exec(mycall)
        ROOT.gROOT.GetListOfCanvases().Clear()
        qglobals.nfinished += 1
        report_progress(qglobals.nfinished, qglobals.ntotal, 
                        'plots', 'png')
        queue.task_done()

for i in range(24):
    p = multi.Process(target=qfunc, args=(queue, qglobals))
    p.daemon = True
    p.start()
queue.join()
report_progress(len(calls), len(calls), 'plots', 'png')
print ''
Exemplo n.º 4
0
""")

queue = multi.JoinableQueue()
qglobals = multi.Manager().Namespace()
qglobals.nfinished = 0
qglobals.ntotal = len(calls)
for call in calls:
    queue.put(call)


def qfunc(queue, qglobals):
    while True:
        try:
            mycall = queue.get(timeout=5)
        except (Empty, IOError):
            break
        exec(mycall)
        ROOT.gROOT.GetListOfCanvases().Clear()
        qglobals.nfinished += 1
        report_progress(qglobals.nfinished, qglobals.ntotal, 'plots', 'root')
        queue.task_done()


for i in range(8):
    p = multi.Process(target=qfunc, args=(queue, qglobals))
    p.daemon = True
    p.start()
queue.join()
report_progress(len(calls), len(calls), 'plots', 'root')
print ''