Home | News | Documentation | Download

Python vs CINT

Hello, I’m thinking about writing some analysis program based on ROOT, and I would like to integrate some scripting into it for configuration and steering. My current options are python and CINT (embedded using a TRint object): both of them seem to be able to handle all the possible use-cases that come into my mind, and I don’t see clear advantages in choosing one or another. Python is a native scripting language,is largely used by many LHC experiments and PyROOT provides ROOT support for it, but it requires some effort to write bindings for newly introduced C++ classes (I currently rely on Boost.Python). On the other hand, it is very easy to generate the CINT dictionary for a new class using rootcint, and one does not need to learn python.
I am fairly new to python, willing to learn it but I can’t see obvious advantages in using it for ROOT-based analysis; nevertheless, it is vastly used by HEP community so it must have some big feature that I am missing.
Can anyone shed some light on this topic? Thanks

PyROOT, sitting squarely on top of CINT (note for that matter that you can have CINT w/o PyROOT, but not PyROOT w/o CINT), readily makes available to Python any class for which a CINT dictionary is provided; no boost::python necessary.

Cheers,
Wim

PyROOT, sitting squarely on top of CINT (note for that matter that you can have CINT w/o PyROOT, but not PyROOT w/o CINT), readily makes available to Python any class for which a CINT dictionary is provided; no boost::python necessary.

Cheers,
Wim[/quote]
Thanks Wim, after I published my post I did some additional research on the web and found some more info about PyROOT which more or less fits your answer. It is very nice to have dictionary-based python bindings, I will explore this opportunity.