forked from rgerosa/boostedWWAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Automatic_Setup.py
62 lines (40 loc) · 1.52 KB
/
Automatic_Setup.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /usr/bin/env python
import os
import glob
import math
import array
import ROOT
import ntpath
import sys
import subprocess
from optparse import OptionParser
from subprocess import Popen
from ROOT import gROOT, gStyle, gSystem, TLatex
parser = OptionParser()
parser.add_option('--vclean', help='clean all the so files', type=int, default=0.)
(options, args) = parser.parse_args()
if __name__ == "__main__":
ROOT.gSystem.AddIncludePath("-I$ROOFITSYS/include");
inPath = os.getenv("PWD")
os.chdir(inPath+"/PlotStyle");
if options.vclean : os.system("rm Util_cxx.so ; rm PlotUtils_cxx.so");
ROOT.gROOT.ProcessLine(".L Util.cxx+");
ROOT.gSystem.Load("Util_cxx.so");
ROOT.gROOT.ProcessLine(".L PlotUtils.cxx+");
ROOT.gSystem.Load("PlotUtils_cxx.so");
os.chdir(inPath+"/PDFs");
if options.vclean : os.system("rm PdfDiagonalizer_cc.so ; rm HWWLVJRooPdfs_cxx.so ; rm MakePdf_cxx.so");
ROOT.gROOT.ProcessLine(".L PdfDiagonalizer.cc+");
ROOT.gSystem.Load("PdfDiagonalizer_cc.so");
ROOT.gROOT.ProcessLine(".L HWWLVJRooPdfs.cxx+");
ROOT.gSystem.Load("HWWLVJRooPdfs_cxx.so");
ROOT.gROOT.ProcessLine(".L MakePdf.cxx+");
ROOT.gSystem.Load("MakePdf_cxx.so");
os.chdir(inPath+"/BiasStudy");
if options.vclean : os.system("rm BiasUtils_cxx.so");
ROOT.gROOT.ProcessLine(".L BiasUtils.cxx+");
ROOT.gSystem.Load("BiasUtils_cxx.so");
os.chdir(inPath+"/FitUtils");
if options.vclean : os.system("rm FitUtils_cxx.so");
ROOT.gROOT.ProcessLine(".L FitUtils.cxx+");
ROOT.gSystem.Load("FitUtils_cxx.so");