root/root-setcachefiledir.patch
Mattias Ellert 82f0a3aaee Avoid unneeded build requirement on srm-ifce-devel
Do not export Python modules in CMake config
Drop patch root-clang-ignore-gcc-options.patch
  ("Recent ROOT does not send all possible compiler flags to rootcling.")
2020-08-21 01:41:39 +02:00

30 lines
1.3 KiB
Diff

From 532e02a0e5373d26f73495183dc13055e7f13421 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Mon, 29 Jun 2020 12:08:15 +0200
Subject: [PATCH] Add missing call to TFile::SetCacheFileDir(".")
Without it the following TFile::Open call using the CACHEREAD option
will not work as intended:
inputFile = TFile::Open(inputFileLink, "CACHEREAD");
---
tutorials/tmva/TMVA_Higgs_Classification.C | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tutorials/tmva/TMVA_Higgs_Classification.C b/tutorials/tmva/TMVA_Higgs_Classification.C
index 6b4a8ed028..85dffc2790 100644
--- a/tutorials/tmva/TMVA_Higgs_Classification.C
+++ b/tutorials/tmva/TMVA_Higgs_Classification.C
@@ -72,9 +72,8 @@ Define now input data file and signal and background trees
if (!inputFile) {
// download file from Cernbox location
Info("TMVA_Higgs_Classification","Download Higgs_data.root file");
+ TFile::SetCacheFileDir(".");
inputFile = TFile::Open(inputFileLink, "CACHEREAD");
- //gSystem->Exec( TString::Format("wget -O %s %s",inputFileName.Data(), downloadLinkFile.Data() ) );
- //inputFile = TFile::Open( inputFileName);
if (!inputFile) {
Error("TMVA_Higgs_Classification","Input file cannot be downloaded - exit");
return;
--
2.26.2