TMVA - unwanted prefix to fWeightFileDir

Dear developers,

Thanks for all of the improvements to TMVA!
In the version, in ROOT v6.8, we have in src/Factory.cxx, the following:

       fFileDir=loader->GetName();
       fFileDir+="/"+gConfig().GetIONames().fWeightFileDir;

root.cern.ch/doc/v608/tmva_2tmv … tml#l00384
(Similarly, this affects l675 in MethodBoost.cxx and l205 in MethodCompositeBase.cxx).

This sets the name of the TMVA::DataLoader as a prefix for the directory name of the output xml.

This new feature is not always wanted, as generally, codes dependent on TMVA might need to explicitly control the location of the derived xml file, e.g., by manipulating gConfig().GetIONames().fWeightFileDir .

I would like to request a modification, which could be one of the following two (or something in this spirit):
(1). Change this to:

       fFileDir = gConfig().GetIONames().fWeightFileDir + "/" + loader->GetName();

(postfix instead of prefix)

(2). Add a job option to TMVA::DataLoader which would allow to define a prefix by hand, or to just avoid the prefix altogether, i.e., something like:

      fFileDir="";
      if(loader->UseWeightFileDirPrefix()) {
         fFileDir=loader->GetName()+"/";
      }
      fFileDir+=gConfig().GetIONames().fWeightFileDir;
   }

The user can then for instance, set the UseWeightFileDirPrefix to false and return to the expected behavior from previous releases of TMVA.

Thanks,

Iftach.

Hi ,

Thank you for your suggestion. We will think about to examine what could be the best solution for this problem.

Best Regards

Lorenzo