ROOT logo


Reflex is ROOT's (or actually CINT's) reflection database. It knows everything about all classes, types, and members in the system. We are currently in the process of a major update of Reflex, including changes in the API and its internal structures. Bare with us - you will get proper documentation once this upgrade is finished. Until then this is what you need to know:

Filling Reflex

Reflex is a container - it does not know anything by itself. You can use genreflex, a python script wrapping GCCXML, or rootcint -reflex or regular rootcint and Cintex, by calling Cintex::Enable(). In the near future, CINT will use Reflex directly; any dictionary loaded by CINT will automatically populate Reflex.

Retrieving data

The main user interface to the Reflex data consists of

represents any type, from basic ones like int to e.g. ROOT::Reflex::Type itself.
represents a namespace, class, struct, union, etc - anything that can have members, e.g. the global scope :: or ROOT::Reflex::Type.
represents a data or function member of a scope.

Note that conversions exist, e.g. ROOT::Reflex::Member is both a scope and a type, thus a ROOT::Reflex::Scope representing ROOT::Reflex::Member can be converted to a ROOT::Reflex::Type. Just check the list of member functions for these types - they are easy to understand.


Once you have filled your reflection data into Reflex you can e.g. query it for the first parameter of the function ROOT::Reflex::Scope::SubTypeByName():
using ROOT::Reflex; // save typing
Scope s = Scope::ByName("ROOT::Reflex::Scope"); // the scope containing the member we want to query
Member m = s.FunctionMemberByName("SubTypeByName"); // get the function member
Type mt = m.TypeOf(); // we need its type
Type arg = mt.FunctionParameterAt(0); // the type of the first function parameter
cout << arg.Name(SCOPED | QUALIFIED) << endl; // print the scoped and qualified name


Class reference

Further Reading


List of Classes

Class Index

Jump to

R Reflex: Reflex::M Reflex::O Reflex::P Reflex::S Reflex::T Reflex::U Reflex::V