From 0ddaba04a6b4f2776c33dd0a9f8f87b01d1e9896 Mon Sep 17 00:00:00 2001
From: Danilo Piparo <danilo.piparo@cern.ch>
Date: Sat, 2 Sep 2017 12:15:34 +0200
Subject: [PATCH] Promote mt tutorials to notebook translation

now we can deal with thread safety in presence of several transactions
being treated.
---
 tutorials/multicore/imt001_parBranchProcessing.C          | 1 +
 tutorials/multicore/imt101_parTreeProcessing.C            | 3 ++-
 tutorials/multicore/mp101_fillNtuples.C                   | 2 +-
 tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C   | 4 ++--
 tutorials/multicore/mt101_fillNtuples.C                   | 1 +
 tutorials/multicore/mt102_readNtuplesFillHistosAndFit.C   | 1 +
 tutorials/multicore/mt103_fillNtupleFromMultipleThreads.C | 2 +-
 tutorials/multicore/mt201_parallelHistoFill.C             | 1 +
 tutorials/multicore/mtbb001_fillHistos.C                  | 1 +
 tutorials/multicore/mtbb101_fillNtuples.C                 | 1 +
 tutorials/multicore/mtbb201_parallelHistoFill.C           | 1 +
 11 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/tutorials/multicore/imt001_parBranchProcessing.C b/tutorials/multicore/imt001_parBranchProcessing.C
index e393576ff2d..4a32590a244 100644
--- a/tutorials/multicore/imt001_parBranchProcessing.C
+++ b/tutorials/multicore/imt001_parBranchProcessing.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Demonstrate how to activate and use the implicit parallelisation of TTree::GetEntry.
 /// Such parallelisation creates one task per top-level branch of the tree being read.
 /// In this example, most of the branches are floating point numbers, which are very fast to read.
diff --git a/tutorials/multicore/imt101_parTreeProcessing.C b/tutorials/multicore/imt101_parTreeProcessing.C
index 02e5c62750d..38759b6f238 100644
--- a/tutorials/multicore/imt101_parTreeProcessing.C
+++ b/tutorials/multicore/imt101_parTreeProcessing.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Illustrate the usage of the TTreeProcessorMT::Process method.
 /// Such method provides an implicit parallelisation of the reading and processing of a TTree.
 /// In particular, when invoking Process, the user provides a function that iterates on a subrange
@@ -8,7 +9,7 @@
 /// potentially run in parallel, the function code must be thread safe.
 /// The example also introduces a new class, ROOT::TThreadedObject, which makes objects
 /// thread private. With the help of this class, histograms can be filled safely inside the
-/// user function and then merged at the end to get the final result. 
+/// user function and then merged at the end to get the final result.
 ///
 /// \macro_code
 ///
diff --git a/tutorials/multicore/mp101_fillNtuples.C b/tutorials/multicore/mp101_fillNtuples.C
index 132543a1f27..58220d3ae0e 100644
--- a/tutorials/multicore/mp101_fillNtuples.C
+++ b/tutorials/multicore/mp101_fillNtuples.C
@@ -36,7 +36,7 @@ Int_t mp101_fillNtuples()
    gROOT->SetBatch();
 
    //---------------------------------------
-   // Perform the operation sequentially 
+   // Perform the operation sequentially
 
    // Create a random generator and and Ntuple to hold the numbers
    TRandom3 rndm(1);
diff --git a/tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C b/tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C
index 307ed8cbf61..7597bca2cd3 100644
--- a/tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C
+++ b/tutorials/multicore/mp102_readNtuplesFillHistosAndFit.C
@@ -17,7 +17,7 @@ Int_t mp102_readNtuplesFillHistosAndFit()
    gROOT->SetBatch();
 
    //---------------------------------------
-   // Perform the operation sequentially 
+   // Perform the operation sequentially
    TChain inputChain("multiCore");
    inputChain.Add("mp101_multiCore_*.root");
    if (inputChain.GetNtrees() <= 0) {
@@ -29,7 +29,7 @@ Int_t mp102_readNtuplesFillHistosAndFit()
    outHisto.Fit("gaus");
 
    //---------------------------------------
-   // We now go MP! 
+   // We now go MP!
    // TProcessExecutor offers an interface to directly process trees and chains without
    // the need for the user to go through the low level implementation of a
    // map-reduce.
diff --git a/tutorials/multicore/mt101_fillNtuples.C b/tutorials/multicore/mt101_fillNtuples.C
index c2894004f50..ff404f8913d 100644
--- a/tutorials/multicore/mt101_fillNtuples.C
+++ b/tutorials/multicore/mt101_fillNtuples.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Fill n-tuples in distinct workers.
 /// This tutorial illustrates the basics of how it's possible with ROOT to
 /// offload heavy operations on multiple threads and how it's possible to write
diff --git a/tutorials/multicore/mt102_readNtuplesFillHistosAndFit.C b/tutorials/multicore/mt102_readNtuplesFillHistosAndFit.C
index 75bf4284611..21ea530fe23 100644
--- a/tutorials/multicore/mt102_readNtuplesFillHistosAndFit.C
+++ b/tutorials/multicore/mt102_readNtuplesFillHistosAndFit.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Read n-tuples in distinct workers, fill histograms, merge them and fit.
 /// Knowing that other facilities like TProcessExecutor might be more adequate for
 /// this operation, this tutorial complements mc101, reading and merging.
diff --git a/tutorials/multicore/mt103_fillNtupleFromMultipleThreads.C b/tutorials/multicore/mt103_fillNtupleFromMultipleThreads.C
index 1370c15908b..6eb904b84a8 100644
--- a/tutorials/multicore/mt103_fillNtupleFromMultipleThreads.C
+++ b/tutorials/multicore/mt103_fillNtupleFromMultipleThreads.C
@@ -1,6 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
-///
+/// \notebook
 /// Fill the same TNtuple from different threads.
 /// This tutorial illustrates the basics of how it's possible with ROOT
 /// to write simultaneously to a single output file using TBufferMerger.
diff --git a/tutorials/multicore/mt201_parallelHistoFill.C b/tutorials/multicore/mt201_parallelHistoFill.C
index f8f02dbe82a..f602348ce20 100644
--- a/tutorials/multicore/mt201_parallelHistoFill.C
+++ b/tutorials/multicore/mt201_parallelHistoFill.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Parallel fill of a histogram.
 /// This tutorial shows how a histogram can be filled in parallel
 /// with a multithreaded approach. The difference with the multiprocess case,
diff --git a/tutorials/multicore/mtbb001_fillHistos.C b/tutorials/multicore/mtbb001_fillHistos.C
index cc5b7b3b1b8..5898ba706ad 100644
--- a/tutorials/multicore/mtbb001_fillHistos.C
+++ b/tutorials/multicore/mtbb001_fillHistos.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Fill histograms in parallel and write them on file.
 /// This example expresses the parallelism of the mt001_fillHistos.C tutorial
 /// with multiprocessing techniques.
diff --git a/tutorials/multicore/mtbb101_fillNtuples.C b/tutorials/multicore/mtbb101_fillNtuples.C
index 0ac716f160c..9e34689fca2 100644
--- a/tutorials/multicore/mtbb101_fillNtuples.C
+++ b/tutorials/multicore/mtbb101_fillNtuples.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Fill n-tuples in distinct workers.
 /// This tutorial illustrates the basics of how it's possible with ROOT to
 /// offload heavy operations on multiple processes and how it's possible to write
diff --git a/tutorials/multicore/mtbb201_parallelHistoFill.C b/tutorials/multicore/mtbb201_parallelHistoFill.C
index 1de92cf15f7..e5ff0dc0004 100644
--- a/tutorials/multicore/mtbb201_parallelHistoFill.C
+++ b/tutorials/multicore/mtbb201_parallelHistoFill.C
@@ -1,5 +1,6 @@
 /// \file
 /// \ingroup tutorial_multicore
+/// \notebook
 /// Parallel fill of a histogram.
 /// This tutorial shows how a histogram can be filled in parallel
 /// with a multiprocess approach.
-- 
GitLab