cint

ROOT's interpreter and reflection information

Do we need yet another custom C++ interpreter?

Hi,

"A ROOT User" asks "Is it really necessary to replace CINT dictionary with cling?", bringing up very reasonable concerns and arguments against re-implementing CINT. I will try to answer his comments to clarify why we do it, and how it connects with the rest.

Dictionaries in CINT and cling

Hi,

Marcelo asked about how I see the future of dictionaries with cling, if we manage to replace CINT with cling. Given that many people probably don't know what those "dictionaries" really do, I decided to post it! I'll keep it as simple and short as possible.

AIX and dladdr

Hi!

This is a post that is relevant to about 0.000000% (o, I forgot a "1"!) of the readers: how to implement the missing dladdr() in AIX5. I could not find it anywhere, nobody seemed to have an implementation - and CINT needs it. So when porting v5.28.00 to AIX5 I needed to deal with it.

To save other people from going mad, here's the code:

A CINT day

Hi there,

given that we usually only let our code speak, I thought it might be a good idea to write a few lines, once a while, on what we do. You will mostly get to hear what I am up to because I don't want to speak (too much :-) for my colleagues. My main responsibility is CINT and Reflex, i.e. ROOT's interpreter and dictionary engines, stuff that you probably only hear about because you ended up reading this page! :-)

PyROOT

How to use ROOT with Python (PyROOT)

PyROOT is a Python extension module that allows the user to interact with any ROOT class from the Python interpreter. This is done generically using the ROOT dictionary, therefore there is no need to generate any Python wrapper code to include new ROOT classes. At the same time PyROOT offers the possibility to execute and evaluate any Python command or start a Python shell from the ROOT/CINT prompt. Further details are available in the PyROOT manual.

CINT stub suppression statistics

Tests with traditional setup including stubs (i.e.

CINT stub suppression

Dictionary With Symbol-Based Function Calls

This is an experimental feature of the CINT dictionaries that allows CINT to call a function given the function's symbol, instead of a generated and compiled call wrapper. Since the wrappers do not have to be written, the dictionaries' source code is reduced in a significant way (close to 50%). This will also allow us, in the future, to store all the information about a function in a plain ROOT file instead of having it inside source code_/_object files.

This new feature has to be activated when configuring ROOT.

Selecting Dictionary Entries: Linkdef.h

To select who should go into a dictionary you will want to specify a Linkdef.h file when you manually invoke rootcint. It is passed as the last argument to rootcint, and it must end on Linkdef.h, LinkDef.h, or linkdef.h. E.g. My_Linkdef.h is good, Linkdef_mine.h is not.

Interacting with Shared Libraries: rootcint

Not only can CINT interpret C++, it can also call functions inside libraries! But it needs a bit of help: the dictionary. These dictionaries are also needed to write a class to a ROOT file.

Dictionaries

A dictionary ("reflection database") contains information about the types and functions that are available in a library. Most LHC experiments use Reflex for that - here we will focus on the CINT / rootcint way, which is a lot easier to handle when working with ROOT.

Interpreter

CINT is ROOT's C++ interpreter. You usually don't see it, you don't invoke it - it's just there. It comes in two parts that are relevant for users: as ROOT's prompt and when you deal with libraries.

CINT can also be used as a separate program, independently of ROOT. The page for standalone CINT contains much more in-depth information about CINT - far too detailed for regular users.

Another prompt interface for ROOT is PyROOT: it uses python on top of CINT.

Syndicate content