]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/QA/detectorQAscripts/EMC.sh
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / QA / detectorQAscripts / EMC.sh
CommitLineData
97a28f97 1#available variables:
2# $dataType e.g. data or sim
3# $year e.g. 2011
4# $period e.g. LHC13g
5# $runNumber e.g. 169123
6# $pass e.g. cpass1,pass1,passMC
7
8runLevelQA()
9{
10qaFile=$1
11MACRODIR=$ALICE_ROOT/PWGPP/EMCAL/QA/macros
12SaveImages=0
13
14suffix=".root"
15new_suffix=".root"
16
17echo "processing $qaFile"
18echo
19
20aliroot -b << EOF
21gSystem->AddIncludePath("-I${ALICE_ROOT}/include")
22gSystem->SetBuildDir("./",kTRUE)
23.L $MACRODIR/CreateEMCALRunQA.C+g
24CreateEMCALRunQA("$qaFile","$runNumber","$period","$pass",$SaveImages)
25.q
26EOF
27
28if [[ $qaFile == *outer* ]]
29then
30suffix=_outer.root
31new_suffix=_barrel.root
32fi
33
34if [[ $qaFile == *barrel* ]]
35then
36suffix=_barrel.root
37new_suffix=_outer.root
38fi
39
40if [[ "$suffix" != ".root" ]]
41then
42
43mv trending.root trending$suffix
44mv ${period}_${pass}_${runNumber}_QAplots.root ${period}_${pass}_${runNumber}_QAplots$suffix
45
46qaFile=${qaFile/$suffix/$new_suffix}
47
48echo
49echo "processing $qaFile"
50echo
51
52aliroot -b << EOF
53gSystem->AddIncludePath("-I${ALICE_ROOT}/include")
54gSystem->SetBuildDir("./",kTRUE)
55.L $MACRODIR/CreateEMCALRunQA.C+g
56CreateEMCALRunQA("$qaFile","$runNumber","$period","$pass",$SaveImages)
57.q
58EOF
59
60mv trending.root trending$new_suffix
61mv ${period}_${pass}_${runNumber}_QAplots.root ${period}_${pass}_${runNumber}_QAplots$new_suffix
62
63echo
64
65hadd -v 1 -f trending.root trending_*.root
66rm -f trending_*.root
67
68fi
69
70rm -f *.d *.so *.txt
71
72}
73
74periodLevelQA()
75{
76
77trendingFile=$1
78MACRODIR=$ALICE_ROOT/PWGPP/EMCAL/QA/macros
79SaveImages=0
80
81echo
82echo "Producing PeriodLevel QA plots"
83echo
84
85root -b << EOF
86gSystem->AddIncludePath("-I${ALICE_ROOT}/include");
87gSystem->SetBuildDir("./",kTRUE)
88.L $MACRODIR/PlotEMCALQATrendingTree.C
89PlotEMCALQATrendingTree("$trendingFile",$SaveImages)
90.q
91EOF
92
93mv trendingPlots.root ${period}_${pass}_trendingPlots.root
94
95echo
96
97hadd -v 1 -f ${period}_${pass}_EMCALQA.root */*QAplot*.root ${period}_${pass}_trendingPlots.root $trendingFile
98
99echo
100echo "Producing QA PDF file"
101echo
102
103root -b -l << EOF
104gSystem->AddIncludePath("-I${ALICE_ROOT}/include")
105gSystem->SetBuildDir("./",kTRUE)
106.L $MACRODIR/MakeQAPdf.C+g
107MakeQAPdf("${period}_${pass}_EMCALQA.root")
108.q
109EOF
110
111rm -f *.d *.C *.so ${period}_${pass}_trendingPlots.root
112
113}