Skip to content

Patch up fragile use of TMVA-generated code

Olli Lupton requested to merge olupton_tmva into master

Avoids the stdout spam and errors seen e.g. in this test.

This seems to be connected with the extraordinarily fragile code that TMVA generates, which we do not protect when including it in the stack.

TMVA emits code such as:

#ifndef IClassifierReader__def
#  define IClassifierReader__def
class IClassifierReader { ... };
#endif

in every file it generates. The ... is not consistent in all such files in the stack. This means that, depending on how the compiler chooses to inline and so on, you can get wrong and inconsistent results.

This MR changes removes two inconsistent definitions of IClassifierReader. The virtual interface wasn't needed anyway in those two cases. It improves the situation in the sense of making some failing tests pass. It makes the situation worse in the sense that it hides the symptoms of a problem without making the codebase any more robust. Future inclusion of TMVA-generated code could break this again if TMVA decided to tweak how it emits code, and we would probably be none the wiser until some time later. Similarly any attempt to manually "improve" the generated code risks breaking things.

cc: @rmatev

Edited by Olli Lupton

Merge request reports