Another hint:
When using 5.25/02 on mac osx, and commenting out all close statements, I don’t get a horrible crash, but a weird error message:
> root -l plotFromMultipleFiles.C
root [0]
Processing plotFromMultipleFiles.C...
Opened QCD_Pt15_Summer09.root
Opened QCD_Pt30_Summer09.root
root.exe(607) malloc: *** error for object 0x14776e4: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
root [1]
I know that CINT’s parser is limited - it was designed to understand simple code, and nowadays that’s just not good enough anymore. So pyroot is indeed a way to work around it. The major disadvantage is that you cannot convert your code easily into the compiled world. So please promise me that you don’t write time critical analysis code in pyroot!
I suppose I can only say that I’ve been amazed by how much code development time has decreased for me when using pyroot and python.
I’ve created several scripts in python/pyroot that took me an hour or two to write - whereas writing macros in C sometimes took me a whole workday or two.
Axel or me do not claim that python is not a nice language.
It is not appropriate for data analysis. You can write a toy script to analyze a modest amount of data, but will be disappointed by the performance when doing real analysis. In this case you must use compile code and you are stuck with python at this point because you have to translate to C++ anyhow.
When writing analysis code, use ACLIC and you will see that the development + run time will be much better that what you can do with a simple python script.
By the way do not discuss python related problems in this thread. We have a dedicated thread on the Forum.
Thanks for the responses, this is interesting to hear.
I’m sorry about that, my posts were about a problem I was having with CINT.
I didn’t intend to discuss python, but I would like to respond to
[quote]Axel or me do not claim that python is not a nice language.
It is not appropriate for data analysis. You can write a toy script to analyze a modest amount of data, but will be disappointed by the performance when doing real analysis.[/quote]
The creator of Python said a few days ago:
Guido van Rossum said that on his blog after he met with a group at Berkley dedicated to developing Python-based tools for scientific research (Py4Science).
He mentioned some examples from that meeting including
What I’ve been reading recently in Python Scripting for Computational Science has also shown python to be effective and appropriate in data analysis and other scientific aspects.
none of this contradicts the fact that python is incredibly slow compared to compiled C++ code. It’s a dynamic interpreted language, there is no way out. And that’s all that Rene and I insist on pointing out Ask the guys at Google, who now try to accelerate youtube (mostly python) and who have a hard time, simply because the language won’t let them. I can understand that Guido can Rossum doesn’t go into detail here So use it like bash or perl: it’s easy to write but slow to run.