RootUtils: Workaround for pyroot __pair_base issue.
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.
Showing
- Control/RootUtils/RootUtils/PyROOTTypePatch.h 64 additions, 0 deletionsControl/RootUtils/RootUtils/PyROOTTypePatch.h
- Control/RootUtils/RootUtils/RootUtilsPyROOTDict.h 3 additions, 1 deletionControl/RootUtils/RootUtils/RootUtilsPyROOTDict.h
- Control/RootUtils/RootUtils/selection_PyROOT.xml 1 addition, 0 deletionsControl/RootUtils/RootUtils/selection_PyROOT.xml
- Control/RootUtils/python/PyROOTFixes.py 5 additions, 52 deletionsControl/RootUtils/python/PyROOTFixes.py
- Control/RootUtils/src/pyroot/PyROOTTypePatch.cxx 171 additions, 0 deletionsControl/RootUtils/src/pyroot/PyROOTTypePatch.cxx
Loading
Please register or sign in to comment