From 5e225665e546878f2f98e173d896343f9edad755 Mon Sep 17 00:00:00 2001
From: Pau Miquel <paumm2006@yahoo.es>
Date: Wed, 31 Aug 2016 20:37:54 +0200
Subject: [PATCH] Fixed TMVA notebooks

---
 documentation/doxygen/converttonotebook.py             | 4 ++--
 tutorials/tmva/TMVAClassificationCategory.C            | 2 +-
 tutorials/tmva/TMVAClassificationCategoryApplication.C | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/documentation/doxygen/converttonotebook.py b/documentation/doxygen/converttonotebook.py
index d94bb7f638b..47dbcf24653 100644
--- a/documentation/doxygen/converttonotebook.py
+++ b/documentation/doxygen/converttonotebook.py
@@ -630,7 +630,7 @@ def isCpp():
 def findTimeout():
    listLongtutorials = ["OneSidedFrequentistUpperLimitWithBands", "StandardBayesianNumericalDemo",
    "TwoSidedFrequentistUpperLimitWithBands" , "HybridStandardForm", "rs401d_FeldmanCousins",
-   "TMVAMultipleBackgroundExample", "TMVARegression"]
+   "TMVAMultipleBackgroundExample", "TMVARegression", "TMVAClassification"]
    if tutName in listLongtutorials:
       return 300
    else:
@@ -753,7 +753,7 @@ def mainfunction(text):
     if r != 0:
         sys.stderr.write("NOTEBOOK_CONVERSION_WARNING: Nbconvert failed for notebook %s with return code %s\n" %(outname,r))
     if isJsroot:
-        subprocess.call(["jupyter", "trust",  os.path.join(outdir + outnameconverted)])
+        subprocess.call(["jupyter", "trust",  os.path.join(outdir, outnameconverted)])
     if r == 0:  # Only remove notebook without output if nbconvert succeedes 
         os.remove(outPathName)
 
diff --git a/tutorials/tmva/TMVAClassificationCategory.C b/tutorials/tmva/TMVAClassificationCategory.C
index dc52e0f12b7..a557d6ae746 100644
--- a/tutorials/tmva/TMVAClassificationCategory.C
+++ b/tutorials/tmva/TMVAClassificationCategory.C
@@ -87,7 +87,7 @@ void TMVAClassificationCategory()
    // Load the signal and background event samples from ROOT trees
    TFile *input(0);
    TString fname = TString(gSystem->DirName(__FILE__) ) + "/data/";
-   if (gSystem->AccessPathName( fname )) {
+   if (gSystem->AccessPathName( fname + "toy_sigbkg_categ_offset.root")) {
       // if directory data not found try using tutorials dir
       fname = TString(gROOT->GetTutorialsDir()) + "/tmva/data/";
    }
diff --git a/tutorials/tmva/TMVAClassificationCategoryApplication.C b/tutorials/tmva/TMVAClassificationCategoryApplication.C
index 44ded6ed607..e2387352805 100644
--- a/tutorials/tmva/TMVAClassificationCategoryApplication.C
+++ b/tutorials/tmva/TMVAClassificationCategoryApplication.C
@@ -84,7 +84,7 @@ void TMVAClassificationCategoryApplication()
    //
    TString fname = TString(gSystem->DirName(__FILE__) ) + "/data/";
    // if directory data not found try using tutorials dir
-   if (gSystem->AccessPathName( fname )) {
+   if (gSystem->AccessPathName( fname + "toy_sigbkg_categ_offset.root"  )) {
       fname = TString(gROOT->GetTutorialsDir()) + "/tmva/data/";
    }
    if (UseOffsetMethod) fname += "toy_sigbkg_categ_offset.root";
-- 
GitLab