- What's New
Reflex stores and handles reflection information (types, members, etc). It is written in C++. Its reflection catalog can be queried by a small set of simple API classes. See the chapter Accessing Reflex Data.
Unlike many other languages, C++ does not offer a way to determine which functions and data members are available for a certain class, or to call functions given their name, or to determine the memory offset of a data member given its name. Reflex adds all of that: it adds a type description layer on top of C++. It is non-intrusive: you do not have to change your types to use it.
Generating Reflection Data
The database is usually populated with information extracted from C++ headers. Several tools, e.g. GCCXML / genreflex and CINT, can parse header files and extract reflection information, which gets then written as C++ sources (dictionaries) that can be compiled, linked, and loaded to make the data available to Reflex. See Generating Reflex Dictionaries for further info.
Querying Reflection Data
Reflex features an interface that is amazingly clear when considering the complexity of C++. It only has a few classes that allow to query the database, insert new data dynamically, generate objects of available types, and invoke their methods.
You can download a snapshot of Reflex's sources from April 15, 2010: reflex-2010-04-15_0.tgz (320kB).
If this is too old or if you want the latest bug fixes please download the sources from the subversion repository. This is what you need to type:
svn co http://root.cern.ch/svn/root/branches/dev/cint/reflex. We have an introduction to subversion if you need some help.
There have been a lot of contributions to Reflex - many thanks to all! But because the CERN experiments are very hesitant to change Reflex I cannot put them into the version of Reflex used at CERN. If you want the CERN production version with limited powers then do
svn co http://root.cern.ch/svn/root/trunk/cint/reflex.
Reflex uses a CMake based build system. It is expected to work on all known Linux flavors of the universe, on Windows with Microsoft Visual C++ >= 7.1 (aka 2003), on MacOS >= 10.4, and on Solaris. Your mileage may vary with other OSes; patches adding support for new platforms are always welcome.
Reflex is used to store terabytes of data, it will be used by LHCb, CMS and Atlas to store petabyes of data. That probably qualifies for the attribute "mature". There are several users outside of ROOT, even outside of CERN - and even outside of High Energy Physics! One could say that Reflex is a part of High Energy Physic's contribution to society.
The addition of new features is driven by outside contributions. New features include annotations by Philippe Bourgau, Murex.
As is obvious in such a context, Reflex is of course well supported (at least we try our best!). Bug reports should be submitted via Savannah, select "CINT" as the category. If you need human help you can post to the ROOT Forum and as the last resort (please!) you can send an email to email@example.com or to firstname.lastname@example.org.
Reflex has its own test suite. It is also based on CMake, and integrates nicely with Reflex's build system. It is pretty versatile - you might want to extract it and use it for your own projects! Check its license if you care about reusing it. And say "Thanks!" to Hady for creating it!
We have a few of the current developers:
- Axel Naumann at CERN,
- Hady Zalek at Murex,
- Philippe Bourgau at Murex, and
- Philippe Canal at Fermilab.
That list is rather short, and these people are working on Reflex anywhere between 30% and 5% of their time. So we don't get everything done ourselves: we really appreciate contributions, feedback, ideas and discussions!
Reflex was developed at CERN starting around 2003. In 2007, Axel inherited it from Stefan Roiser, one of the main authors, who was responsible for it for several years, together with Pere Mato.
We are happy to list some of the alternative implementations - you just make your choice yourself :-) Google claims that these try to do the same:
Right, so that was it. Let me know if I overlooked your package so I can add it!