TMVA Conditional Compilation

Dear Experts,
I’m in the need of producing a code that uses TMVA and is able to be run on ROOT v5 and v6.
Since the TMVA API has changed I was thinking about a conditional compilation of the code so that I do not have to apply twice the same changes in the codes.

Something like

#if RootVersion > XX,YY,ZZ
Compile this stuff here with the data loader
Compile this other stuff

So my questions are the following:

  • How can I retrieve the root version in order to do this ?
  • When has the API changed ?



do you also know the XX,YY,ZZ values when the API has changed?

If I remember correctly, the change was in 6.08 (= first version with new API).