Error using TMVA on lxplus

Hi,

I failed to run TMVAClassification.C with default settings on lxplus. Is there anything I need to set up before using TMVA? There are bunches of errors:

Processing ./TMVAClassification.C(“Fisher,Likelihood”)…
In file included from input_line_8:1:
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:43:10: fatal error: ‘TMVAGui.C’ file not found
#include “TMVAGui.C”
^~~~~~~~~~~
Warning in TInterpreter::TCling::RegisterModule: Problems in compiling forward declarations for module libGraf3d: ’
#line 1 “libGraf3d dictionary forward declarations’ payload”

/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:183:13: error: no member named ‘AddVariable’ in ‘TMVA::Factory’
factory->AddVariable( “myvar1 := var1+var2”, ‘F’ );

/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:184:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "myvar2 := var1-var2", "Expression 2", "", 'F' );
~~~~~~~  ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:185:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "var3",                "Variable 3", "units", 'F' );
~~~~~~~  ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:186:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "var4",                "Variable 4", "units", 'F' );
~~~~~~~  ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:191:13: error: no member named 'AddSpectator' in 'TMVA::Factory'
factory->AddSpectator( "spec1 := var1*2",  "Spectator 1", "units", 'F' );
~~~~~~~  ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:192:13: error: no member named 'AddSpectator' in 'TMVA::Factory'
factory->AddSpectator( "spec2 := var1*3",  "Spectator 2", "units", 'F' );

Hi and welcome to the forums!

I would hazard you are using root6 with a TMVAClassification.C from an earlier version. Check the version found in $ROOTSYS, or here.

In the newer TMVA versions a data loader was introduce to add a bit more separation of concerns; The Factory had many responsibilities bundled into one.

Please let me know how it goes.

Cheers,
Kim

Hi Kim,

Thanks for your reply. Yes, it works now.

BTW, can I ask another question. For the windows release of ROOT, does it come with TMVA or not? It seems that it doesn’t come with TMVA.

Best,
Feng

@bellenot: Would you have the possibility to illuminate us? :slight_smile:

Could you, Feng, elaborate a bit on how you acquired the windows release? Did you download it from somewhere, build it yourself, etc.?

Cheers,
Kim

Hi,

TMVA was not supported on Windows until very recently. It should be available in the next release (6.20/0)

Cheers, Bertrand.

Thanks Bertrand!

That should be ROOT version 6.20/0 (not 5.20/0).

I would edit the post directly had I the ability to do so :slight_smile:

Cheers,
Kim

Hi,

WOW!! Great! Looking forward to the new version!!

Cheers,
Feng

You’re right, sorry. Now fixed