TMVA parameters are seen as unidentified

When I run a .C File without any parameters for TMVA, it runs fine.

root -l TMVAClassification.C

works fine.

But when i enter a parameter:

root -l 'TMVAClassification.C(LD,Likelihood)'

I get an error saying undeclared identifier.

rocessing TMVAClassification.C(LD,Likelihood)...
input_line_24:2:21: error: use of undeclared identifier 'LD'
 TMVAClassification(LD,Likelihood) /* invoking function corresponding to '.x' */
                    ^
input_line_24:2:24: error: use of undeclared identifier 'Likelihood'
 TMVAClassification(LD,Likelihood) /* invoking function corresponding to '.x' */

How do i solve this?

1 Like

Hi Biratal,

Weird. Does this work for you:

cd $ROOTSYS/tutorials
root.exe -l -b -q 'hsimple.C(1)'
...
Processing hsimple.C(1)...
(TFile *) 0x55b0bbd9c9b0
...

If not: what is your shell, OS / distribution, ROOT version?

Cheers, Axel.

Hi,

The following code: root -l 'TMVAClassification.C("LD,Likelihood")' should do the trick! (The macro accepts a single string as its input argument).

Cheers,
Kim