Skip to content
Snippets Groups Projects
Commit 0ddaba04 authored by Danilo Piparo's avatar Danilo Piparo
Browse files

Promote mt tutorials to notebook translation

now we can deal with thread safety in presence of several transactions
being treated.
parent 5c8c3e8c
No related branches found
No related tags found
No related merge requests found
/// \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.
......
/// \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
///
......
......@@ -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);
......
......@@ -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.
......
/// \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
......
/// \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.
......
/// \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.
......
/// \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,
......
/// \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.
......
/// \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
......
/// \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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment