xerader
#1
When I try to run a .C file, i receive an error:
**error:** **no matching member function for call to 'BookMethod'**
factory->BookMethod( TMVA::Types::kCuts, "Cuts",
The part of the code is
if (Use["Cuts"])
factory->BookMethod( TMVA::Types::kCuts, "Cuts",
"!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart" );
I had to change factory->AddVariable to dataloader->AddVariable in order to add variables. What do I have to change here?
I am currently running root 6.14 on MacOS Mojave (10.14). The file I am trying to run was built for an older version of root.
xerader
#2
For anyone else, this problem is solved. I reinstalled an older version of root (6.08) and it worked without a hitch.
Axel
#3
@moneta @kialbert - what’s the replacement for BookMethod
?
Hi,
Starting with ROOT version 6.10 the syntax is
TMVA::DataLoader * dataloader = new TMVA::DataLoader("dataset");
// ...snip...
if (Use["Cuts"])
factory->BookMethod( dataloader, TMVA::Types::kCuts, "Cuts",
"!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart" );
You can check $ROOTSYS/tutorials/tmva/TMVAClassification.C
for the syntax applicable to you installed version.
Cheers,
Kim
1 Like