From 260dca7198e5d08396d8ef58a955319be07c18d8 Mon Sep 17 00:00:00 2001
From: Danilo Piparo <danilo.piparo@cern.ch>
Date: Tue, 8 Aug 2017 10:54:09 +0200
Subject: [PATCH] [TDF] Make tutorials macros w/o main function and includes

---
 tutorials/dataframe/tdf001_introduction.C  | 13 -------------
 tutorials/dataframe/tdf002_dataModel.C     | 20 --------------------
 tutorials/dataframe/tdf004_cutFlowReport.C | 16 ----------------
 3 files changed, 49 deletions(-)

diff --git a/tutorials/dataframe/tdf001_introduction.C b/tutorials/dataframe/tdf001_introduction.C
index cb77f6b02f7..e9f9e4473bb 100644
--- a/tutorials/dataframe/tdf001_introduction.C
+++ b/tutorials/dataframe/tdf001_introduction.C
@@ -11,14 +11,6 @@
 /// \author Enrico Guiraud
 
 // ## Preparation
-// This notebook can be compiled with this invocation
-// `g++ -o tdf001_introduction tdf001_introduction.C `root-config --cflags --libs` -lTreePlayer`
-
-#include "TFile.h"
-#include "TH1F.h"
-#include "TTree.h"
-
-#include "ROOT/TDataFrame.hxx"
 
 // A simple helper function to fill a test tree: this makes the example
 // stand-alone.
@@ -168,8 +160,3 @@ int tdf001_introduction()
 
    return 0;
 }
-
-int main()
-{
-   return tdf001_introduction();
-}
diff --git a/tutorials/dataframe/tdf002_dataModel.C b/tutorials/dataframe/tdf002_dataModel.C
index 97980a35561..5ce65d765d5 100644
--- a/tutorials/dataframe/tdf002_dataModel.C
+++ b/tutorials/dataframe/tdf002_dataModel.C
@@ -9,21 +9,6 @@
 /// \date December 2016
 /// \author Danilo Piparo
 
-// ## Preparation
-// This notebook can be compiled with this invocation
-// `g++ -o tdf002_dataModel tdf002_dataModel.C `root-config --cflags --libs` -lTreePlayer`
-
-#include "Math/Vector3D.h"
-#include "Math/Vector4D.h"
-#include "TCanvas.h"
-#include "TMath.h"
-#include "TRandom3.h"
-#include "TFile.h"
-#include "TH1D.h"
-#include "TTree.h"
-
-#include "ROOT/TDataFrame.hxx"
-
 using FourVector = ROOT::Math::XYZTVector;
 using FourVectors = std::vector<FourVector>;
 using CylFourVector = ROOT::Math::RhoEtaPhiVector;
@@ -127,8 +112,3 @@ int tdf002_dataModel()
 
    return 0;
 }
-
-int main()
-{
-   return tdf002_dataModel();
-}
diff --git a/tutorials/dataframe/tdf004_cutFlowReport.C b/tutorials/dataframe/tdf004_cutFlowReport.C
index 69b4183e747..944dead643a 100644
--- a/tutorials/dataframe/tdf004_cutFlowReport.C
+++ b/tutorials/dataframe/tdf004_cutFlowReport.C
@@ -8,16 +8,6 @@
 /// \date December 2016
 /// \author Danilo Piparo
 
-#include "Math/Vector3D.h"
-#include "Math/Vector4D.h"
-#include "TCanvas.h"
-#include "TMath.h"
-#include "TRandom3.h"
-#include "TFile.h"
-#include "TTree.h"
-
-#include "ROOT/TDataFrame.hxx"
-
 using FourVector = ROOT::Math::XYZTVector;
 using FourVectors = std::vector<FourVector>;
 using CylFourVector = ROOT::Math::RhoEtaPhiVector;
@@ -80,9 +70,3 @@ void tdf004_cutFlowReport()
    std::cout << "All stats:" << std::endl;
    d.Report();
 }
-
-int main()
-{
-   tdf004_cutFlowReport();
-   return 0;
-}
-- 
GitLab