Skip to content

PMGAnalysisInterfaces Fix, 21.2 branch (2020.01.10.)

This is a second try after !29355 (merged)... 😛

Fixed the dictionaries generated by PMGAnalysisInterfaces. Triggered by some exchange on PATHelp yesterday. It turned out, that instantiating PMG tools through their dictionaries in the current setup produces the following very distressing errors:

Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for IHFORSelectionTool.h
   requested to autoload type IHFORSelectionTool
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
   Missing FileEntry for IPMGSherpaVjetsSysTool.h
   requested to autoload type PMGTools::IPMGSherpaVjetsSysTool
libPMGAnalysisInterfacesDict dictionary payload:43:10: fatal error: 'IHFORSelectionTool.h' file not found
#include "IHFORSelectionTool.h"
         ^~~~~~~~~~~~~~~~~~~~~~
TInterpreter::AutoParse   ERROR   Error parsing payload code for class PMGTools::IPMGTruthWeightTool with content:

#line 1 "libPMGAnalysisInterfacesDict dictionary payload"

#ifndef G__VECTOR_HAS_CLASS_ITERATOR
  #define G__VECTOR_HAS_CLASS_ITERATOR 1
#endif
#ifndef HAVE_PRETTY_FUNCTION
  #define HAVE_PRETTY_FUNCTION 1
#endif
#ifndef HAVE_64_BITS
  #define HAVE_64_BITS 1
#endif
#ifndef __IDENTIFIER_64BIT__
  #define __IDENTIFIER_64BIT__ 1
#endif
#ifndef ATLAS
  #define ATLAS 1
#endif
#ifndef ROOTCORE
  #define ROOTCORE 1
#endif
#ifndef XAOD_STANDALONE
  #define XAOD_STANDALONE 1
#endif
#ifndef XAOD_ANALYSIS
  #define XAOD_ANALYSIS 1
#endif
#ifndef ROOTCORE_RELEASE_SERIES
  #define ROOTCORE_RELEASE_SERIES 25
#endif
#ifndef PACKAGE_VERSION
  #define PACKAGE_VERSION "PMGAnalysisInterfaces-00-00-00"
#endif
#ifndef PACKAGE_VERSION_UQ
  #define PACKAGE_VERSION_UQ PMGAnalysisInterfaces-00-00-00
#endif
#ifndef EIGEN_DONT_VECTORIZE
  #define EIGEN_DONT_VECTORIZE 1
#endif
...

There were multiple problems:

  • PMGAnalysisInterfacesDict.h was not including the headers of the pacage with the correct incantation;
  • No dictionary was generated for IPMGCrossSectionTool;
  • The HFORTypes enum was using type names (kill...) that could not be used in the global namespace.

The last issue showed up at runtime like:

In file included from libPMGAnalysisInterfacesDict dictionary payload:48:
In file included from <foo>/build/x86_64-ubuntu1804-gcc7-opt/include/PMGAnalysisInterfaces/IHFORSelectionTool.h:10:
<foo>/build/x86_64-ubuntu1804-gcc7-opt/include/PMGAnalysisInterfaces/HFORTypes.h:6:45: error: redefinition of 'kill'
  isBB = 0, isCC = 1, isC = 2, isLight = 3, kill = 4, noType = 5
                                            ^
/usr/include/signal.h:112:12: note: previous definition is here
extern int kill (__pid_t __pid, int __sig) __THROW;
           ^
TInterpreter::AutoParse   ERROR   Error parsing payload code for class PMGTools::IPMGTruthWeightTool with content:

#line 1 "libPMGAnalysisInterfacesDict dictionary payload"

#ifndef G__VECTOR_HAS_CLASS_ITERATOR
  #define G__VECTOR_HAS_CLASS_ITERATOR 1
#endif
#ifndef HAVE_PRETTY_FUNCTION
  #define HAVE_PRETTY_FUNCTION 1
#endif
#ifndef HAVE_64_BITS
  #define HAVE_64_BITS 1
#endif
...

Finally, the code in DerivationFrameworkMCTruth also had to be slightly adjusted to deal with this change in the HFORType definition. But hopefully this does not offend anyone... (tagging @zmarshal)

Merge request reports

Loading