]>
Commit | Line | Data |
---|---|---|
dab7b5d6 | 1 | #!/bin/sh |
2 | ||
3 | # - This script will handle the running of the different Macros of the Resolution of the Conversions for you. | |
4 | # - In the directory, in which this script is lying in, the different macros and header files which the macros | |
5 | # need have to be included as well. | |
6 | # - Variable #1 is the directory where your rootfiles are put in | |
7 | # - Variable #2 is the cut you want to analyse, a directory with the same name will be created in #1 | |
8 | # - You need to put in one directory the different root files for MC and data, and rename them so that they | |
9 | # contain the words MC and data an in the corresponding filename. With the outputMerge, outputPdf, outputEps | |
10 | # outputSvg and outputGif you can set the different output formats of the files by setting the specific variable | |
11 | # to 1. | |
12 | # - $backup is the the directory where a copy of the macros will be stored. | |
13 | # - The script will handle all other things for you. | |
14 | ||
15 | ||
16 | outputMerge=1 | |
17 | outputPdf=1 | |
18 | outputGif=1 | |
19 | outputEps=1 | |
20 | outputSvg=1 | |
21 | ||
22 | cp *.C $1 | |
23 | cp *.h $1 | |
24 | ||
25 | backup= /home/fredi/Dokumente/CERN/ALICE/Photon/Aktuelle\ Makros/newest\ Macros/ | |
26 | cp *.C $backup | |
27 | cp *.h $backup | |
28 | ||
29 | cd $1 | |
30 | ||
31 | data=`ls *.root | grep -v Output | grep -i data` | |
32 | mc=`ls *.root | grep -v Output | grep -i mc` | |
33 | ||
34 | echo $data | |
35 | echo $mc | |
36 | ||
37 | mkdir $2 | |
38 | cp $data $2/ | |
39 | cp $mc $2/ | |
40 | cp *.C $2 | |
41 | cp *.h $2 | |
42 | ||
43 | cd $2 | |
44 | ||
45 | echo $outputMerge | |
46 | if [ "$outputMerge" -eq 1 ]; then | |
47 | root -l -x -q -b Photon_Resolution.C\(\"$mc\"\,\"$2\"\,\"\"\,\"Photon_Resolution\"\,\"kFALSE\"\,\"eps\"\) | |
48 | fi | |
49 | ||
50 | if [ "$outputPdf" -eq 1 ]; then | |
51 | mkdir pdf | |
52 | root -l -x -q -b Photon_Resolution.C\(\"$mc\"\,\"$2\"\,\"\"\,\"Photon_Resolution\"\,\"kTRUE\"\,\"pdf\"\) | |
53 | fi | |
54 | ||
55 | if [ "$outputGif" -eq 1 ]; then | |
56 | mkdir gif | |
57 | root -l -x -q -b Photon_Resolution.C\(\"$mc\"\,\"$2\"\,\"\"\,\"Photon_Resolution\"\,\"kTRUE\"\,\"gif\"\) | |
58 | fi | |
59 | ||
60 | if [ "$outputEps" -eq 1 ]; then | |
61 | mkdir eps | |
62 | root -l -x -q -b Photon_Resolution.C\(\"$mc\"\,\"$2\"\,\"\"\,\"Photon_Resolution\"\,\"kTRUE\"\,\"eps\"\) | |
63 | fi | |
64 | ||
65 | if [ "$outputSvg" -eq 1 ]; then | |
66 | mkdir svg | |
67 | root -l -x -q -b Photon_Resolution.C\(\"$mc\"\,\"$2\"\,\"\"\,\"Photon_Resolution\"\,\"kTRUE\"\,\"svg\"\) | |
68 | fi | |
69 | ||
70 | ||
71 | rm $mc | |
72 | rm $data | |
73 | rm *.C | |
74 | rm *.h | |
75 | ||
76 | cd .. | |
77 | rm *.C | |
78 | rm *.h | |
79 | ||
80 | ||
81 | cd .. | |
82 | echo Ready with Conversion Resolution Analysis | |
83 |