![]() |
ATLAS Offline Software
|
Work around pyroot problem with __pair_base. More...
#include <PyROOTTypePatch.h>
Static Public Member Functions | |
static void | initialize () |
Initialize the workaround. More... | |
static void | scan_one (TClass *cls) |
Scan a single class. More... | |
Work around pyroot problem with __pair_base.
In gcc8, std::pair derives from the (empty) base class std::__pair_base. When ROOT makes dictionaries, it likes to strip std:: qualifiers. When it then tries to look up cling information for a TClass, if the lookup fails, it tries again with the std:: reinserted for all STL classes (with TClassEdit::InsertStd()). However, that doesn't work for __pair_base, because it's not a class that ROOT knows about. The upshot is that we see errors like:
Error in <TClass::LoadClassInfo>: no interpreter information for class __pair_base<unsigned int,string> is available even though it has a TClass initialization routine.
We work around this by hooking into ROOT's TClass creation. If we see a std::pair class, we erase the base class information from its TClass.
Definition at line 42 of file PyROOTTypePatch.h.
|
static |
Initialize the workaround.
Scan all known classes, and also hook into class creation so that we'll scan all future classes.
Definition at line 134 of file PyROOTTypePatch.cxx.
|
static |
Scan a single class.
cls | The class to scan. |
Definition at line 166 of file PyROOTTypePatch.cxx.