Hi again,
I am trying to implement one script that reads data from a ntuple and prints it in a png file. Pretty simple…
So I read the data from “n” ntuples and fill a python array; then I create a canvas, split it in 5 pads (one for each channel which I am interested) , drawClone() them and print the canvas…
This procedure is repeated inside a for statement… about 250 times, So I am waiting for 250 plots in the end of the program’s execution…
Everything seems to work fine… Just TCanvas.Print() is giving me a headache…
First I tried
canvas.Print("%s%s_%s.png"%(PLOTPATH,drawer, brick))
It worked for 20 times… and in 21° time crashed with the following error message:
I though this was pretty strange, however I decide to change anyway to
canvas.Print(“%s%s_%s.png”%(PLOTPATH,drawer, brick), “png”)
For my surprise I got this message:
[quote]Traceback (most recent call last):
File “/afs/cern.ch/user/t/tilecom/public/www/DCS/version1.5/bin/dcsGenerateAnalysis.py”, line 329, in
Main(timeRange[0], timeRange[1])
File “/afs/cern.ch/user/t/tilecom/public/www/DCS/version1.5/bin/dcsGenerateAnalysis.py”, line 288, in Main
canvas.Print(“%s%s_%s.png”%(PLOTPATH,drawer, brick), “png”)
TypeError: none of the 2 overloaded methods succeeded. Full details:
void TPad::Print(const char* filename = “”) =>
takes at most 1 arguments (2 given)
problem in C++; program state has been reset
[/quote]
So now I am lost… I guess the “problem in C++; program state has been reset” warning is relevant, but I don’t know what I can do about…
FYI:
I am running it under lx32slc4
and my environment is set like this
os.environ['ROOTSYS'] = "/afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/"
os.environ['PYTHONDIR']= "/afs/cern.ch/sw/lcg/external/Python/2.5/slc4_ia32_gcc34"
os.environ['PYTHONPATH']="/afs/cern.ch/atlas/software/releases/14.0.0/external/NumPy/1.0.4/i686-slc4-gcc34-opt/lib/python2.5/site-packages:%s
/lib"%(os.environ["ROOTSYS"])
os.environ['LD_LIBRARY_PATH'] = "%s/lib:%s/lib:%s"%(os.environ['ROOTSYS'], os.environ['PYTHONDIR'],os.environ['LD_LIBRARY_PATH'])
os.environ['PATH'] = "%s/bin:%s/bin:%s"%( os.environ['ROOTSYS'], os.environ['PYTHONDIR'], os.environ['PATH'])
Can you help me???
Cheers