Blob Blame History Raw
From 430c06386ec70a40265c77047ccc1e980322091e Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 22 Nov 2018 16:59:55 +0100
Subject: [PATCH] Make tutorial filenames unique to avoid overwrites

---
 tutorials/multicore/mp001_fillHistos.C   | 2 +-
 tutorials/multicore/mt001_fillHistos.C   | 2 +-
 tutorials/multicore/mtbb001_fillHistos.C | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tutorials/multicore/mp001_fillHistos.C b/tutorials/multicore/mp001_fillHistos.C
index 081d5a3645a..6fd461b4442 100644
--- a/tutorials/multicore/mp001_fillHistos.C
+++ b/tutorials/multicore/mp001_fillHistos.C
@@ -23,7 +23,7 @@ Int_t mp001_fillHistos()
    auto workItem = [](UInt_t workerID) {
       // One generator, file and ntuple per worker
       TRandom3 workerRndm(workerID); // Change the seed
-      TFile f(Form("myFile_%u.root", workerID), "RECREATE");
+      TFile f(Form("myFile_mp001_%u.root", workerID), "RECREATE");
       TH1F h(Form("myHisto_%u", workerID), "The Histogram", 64, -4, 4);
       for (UInt_t i = 0; i < nNumbers; ++i) {
          h.Fill(workerRndm.Gaus());
diff --git a/tutorials/multicore/mt001_fillHistos.C b/tutorials/multicore/mt001_fillHistos.C
index 4a4c08558c1..d293e1f2b7d 100644
--- a/tutorials/multicore/mt001_fillHistos.C
+++ b/tutorials/multicore/mt001_fillHistos.C
@@ -26,7 +26,7 @@ Int_t mt001_fillHistos()
    auto workItem = [](UInt_t workerID) {
       // One generator, file and ntuple per worker
       TRandom3 workerRndm(workerID); // Change the seed
-      TFile f(Form("myFile_%u.root", workerID), "RECREATE");
+      TFile f(Form("myFile_mt001_%u.root", workerID), "RECREATE");
       TH1F h(Form("myHisto_%u", workerID), "The Histogram", 64, -4, 4);
       for (UInt_t i = 0; i < nNumbers; ++i) {
          h.Fill(workerRndm.Gaus());
diff --git a/tutorials/multicore/mtbb001_fillHistos.C b/tutorials/multicore/mtbb001_fillHistos.C
index 9f967938017..64390b2d4cc 100644
--- a/tutorials/multicore/mtbb001_fillHistos.C
+++ b/tutorials/multicore/mtbb001_fillHistos.C
@@ -23,7 +23,7 @@ Int_t mtbb001_fillHistos()
    auto workItem = [](UInt_t workerID) {
       // One generator, file and ntuple per worker
       TRandom3 workerRndm(workerID); // Change the seed
-      TFile f(Form("myFile_%u.root", workerID), "RECREATE");
+      TFile f(Form("myFile_mtbb001_%u.root", workerID), "RECREATE");
       TH1F h(Form("myHisto_%u", workerID), "The Histogram", 64, -4, 4);
       for (UInt_t i = 0; i < nNumbers; ++i) {
          h.Fill(workerRndm.Gaus());