Project

General

Profile

Bug #674

clear_root fails

Added by Rogers, Chris almost 11 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
Start date:
15 August 2011
Due date:
% Done:

0%

Estimated time:

Description

common.clear_root() is supposed to delete root histograms - doesn't seem to work though

#1

Updated by Rogers, Chris over 7 years ago

  • Status changed from Open to Rejected

This script appears to work as expected - suspect user (f***ing idiot) was not clearing local variables...

import xboa.common

xboa.common.make_root_canvas("canvas")
xboa.common.make_root_histogram("hist", [], "", 10)
xboa.common.make_root_graph("graph", [1, 1, 1], "", [2, 2, 2], "")
print "Clearing root ... press enter to continue" 
raw_input()

xboa.common.clear_root()
print "Cleared root ... press enter to run again" 
raw_input()

canvas = xboa.common.make_root_canvas("canvas")
hist = xboa.common.make_root_histogram("hist", [], "", 10)
hist, graph = xboa.common.make_root_graph("graph", [1, 1, 1], "", [2, 2, 2], "")
xboa.common.clear_root()
print "Cleared root ... press enter to clear local" 
raw_input()
del(canvas)
del(hist)
del(graph)
print "Cleared root ... press enter to finish" 
raw_input()

Also available in: Atom PDF