-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun_All.cpp
32 lines (30 loc) · 1.67 KB
/
Run_All.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "TString.h"
#include "TSystem.h"
#include "TROOT.h"
void Run_All(TString myopt="")
{
gSystem->AddIncludePath((string("-I ")+gSystem->GetWorkingDirectory()+"/Simulation").c_str());
gSystem->AddIncludePath((string("-I ")+gSystem->GetWorkingDirectory()+"/Reconstruction").c_str());
gSystem->AddIncludePath((string("-I ")+gSystem->GetWorkingDirectory()+"/Build").c_str());
TString opt;
if (myopt.Contains("force"))
opt="kfg-"; //k mantiene il .so, f forza la compilazione (come mettere il ++), g serve se vogliamo usare un debugger
else
opt="kg-";
if (myopt.Contains("clean"))
gSystem->Exec("./clean.sh");
gSystem->CompileMacro("Simulation/Particle.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/MaterialBudget.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/Detector.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/AngularHandler.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/DetectorHandler.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/Event.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/MultHandler.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/VertexHandler.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/Run.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Simulation/Simulation.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Reconstruction/Reconstruction.cpp",opt.Data(),"","Build");
gSystem->CompileMacro("Reconstruction/RunAnalysis.cpp",opt.Data(),"","Build");
gROOT->ProcessLine("Simulation()");
gROOT->ProcessLine("RunAnalysis()");
}