]>
Commit | Line | Data |
---|---|---|
93afb8fb | 1 | // --------------------------------------------------------------------- |
2 | // Example of macro to run AliComparisonTask (PWG1 library). | |
3 | // The task can be run locally or on the Proof (aProof == kTRUE). | |
4 | // | |
5 | // To run AliComparisonTask on Proof user must set the enviroment variables | |
6 | // and load AliRoot libraries using e.g. LoadMyLibs.C macro. | |
7 | // | |
8 | // As the input the AliComparisonTask needs a chain of root files with ESDcmpTracks | |
9 | // tree inside. | |
10 | // The output file (Output.root) contains MC vs Reconstruction comparison objects | |
11 | // filled under conditions set in RunAliComparisonTask.C | |
12 | // | |
13 | //---------------------------------------------------------------------- | |
588b4982 | 14 | |
15 | /* | |
16 | ||
17 | 1. Example (run locally): | |
18 | ||
19 | //-- Load toolkit | |
20 | gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); | |
21 | gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); | |
22 | AliXRDPROOFtoolkit tool; | |
23 | ||
24 | //-- Make chain | |
25 | TChain * chain = tool.MakeChain("cmpESDTracks.txt","ESDcmpTracks","",1000,0); | |
26 | ||
27 | //-- Run AliComparisonTask task | |
28 | gROOT->LoadMacro("RunAliComparisonTask.C"); | |
29 | RunAliComparisonTask(chain, kFALSE); | |
30 | ||
31 | ||
93afb8fb | 32 | // ---------------------------------------------------------------------- |
588b4982 | 33 | |
34 | 2. Example (run on Proof/GSI): | |
35 | ||
93afb8fb | 36 | // -- Connect to Proof as USER_NAME |
588b4982 | 37 | TProof::Open("USER_NAME@gsiaf.gsi.de"); |
38 | ||
93afb8fb | 39 | // -- Set Proof ROOT version (e.g. 5.18/00a) |
588b4982 | 40 | gProof->GetManager()->SetROOTVersion("5.18/00a"); |
41 | ||
93afb8fb | 42 | // -- Load AliRoot Libraries |
588b4982 | 43 | gProof->Exec(Form("TString str(gSystem->ExpandPathName(\"%s\")); gSystem->Setenv(\"ALICE_ROOT\", str);", gSystem->ExpandPathName("$ALICE_ROOT")), kTRUE); |
44 | gProof->AddDynamicPath(Form("%s/lib/tgt_linuxx8664gcc", gSystem->ExpandPathName("$ALICE_ROOT"))); | |
45 | gProof->Exec(Form("gROOT->Macro(\"%s/PWG1/Macros/LoadMyLibs.C\")",gSystem->ExpandPathName("$ALICE_ROOT")),kTRUE); | |
46 | ||
93afb8fb | 47 | // -- Load toolkit |
588b4982 | 48 | gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); |
49 | gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); | |
50 | AliXRDPROOFtoolkit tool; | |
51 | ||
52 | ||
93afb8fb | 53 | // -- Make chain |
588b4982 | 54 | TChain * chain = tool.MakeChain("cmpESDTracks.txt","ESDcmpTracks","",1000,0); |
55 | ||
93afb8fb | 56 | // -- Run AliComparisonTask task |
588b4982 | 57 | gROOT->LoadMacro("RunAliComparisonTask.C"); |
58 | RunAliComparisonTask(chain, kTRUE); | |
59 | ||
60 | */ | |
61 | ||
93afb8fb | 62 | //----------------------------------------------------------------------------- |
63 | ||
71a14197 | 64 | void RunGSI(Bool_t aProof=kFALSE) { |
93afb8fb | 65 | |
66 | // -- RUN LOCALLY | |
67 | if(aProof == kFALSE) | |
68 | { | |
69 | // -- Load toolkit | |
588b4982 | 70 | gSystem->Load("/usr/local/grid/XRootd/GSI/lib64/libXrdClient.so"); |
93afb8fb | 71 | gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); |
72 | gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); | |
73 | AliXRDPROOFtoolkit tool; | |
74 | ||
75 | // -- Make chain | |
71a14197 | 76 | TChain * chain = tool.MakeChain("cmpESDTracks_post_v4-16-Rev-05.txt","ESDcmpTracks","",10,0); |
93afb8fb | 77 | |
78 | // -- Run AliComparisonTask task | |
79 | gROOT->LoadMacro("RunAliComparisonTask.C"); | |
80 | if(chain) { | |
81 | RunAliComparisonTask(chain, kFALSE); | |
82 | } else { | |
83 | AliDebug(AliLog::kError, "ERROR: Cannot get chain"); | |
84 | } | |
85 | } | |
86 | //-- RUN ON PROOF | |
87 | else | |
88 | { | |
93afb8fb | 89 | // -- Connect to Proof as USER_NAME |
90 | TProof::Open("jacek@gsiaf.gsi.de"); | |
91 | ||
92 | // -- Set Proof ROOT version (e.g. 5.18/00a) | |
93 | gProof->GetManager()->SetROOTVersion("5.18/00a"); | |
94 | ||
95 | // -- Load AliRoot Libraries | |
96 | gProof->Exec(Form("TString str(gSystem->ExpandPathName(\"%s\"));gSystem->Setenv(\"ALICE_ROOT\",str);",gSystem->ExpandPathName("$ALICE_ROOT")),kTRUE); | |
97 | gProof->AddDynamicPath(Form("%s/lib/tgt_linuxx8664gcc", gSystem->ExpandPathName("$ALICE_ROOT"))); | |
98 | gProof->Exec(Form("gROOT->Macro(\"%s/PWG1/Macros/LoadMyLibs.C\")",gSystem->ExpandPathName("$ALICE_ROOT")),kTRUE); | |
99 | ||
100 | // -- Load toolkit | |
101 | gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); | |
102 | gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); | |
103 | AliXRDPROOFtoolkit tool; | |
104 | ||
105 | // -- Make chain | |
106 | TChain * chain = tool.MakeChain("cmpESDTracks.txt","ESDcmpTracks","",1000,0); | |
107 | ||
108 | // -- Run AliComparisonTask task | |
109 | gROOT->LoadMacro("RunAliComparisonTask.C"); | |
110 | if(chain) { | |
111 | RunAliComparisonTask(chain, kTRUE); | |
112 | } else { | |
113 | AliDebug(AliLog::kError, "ERROR: Cannot get chain"); | |
114 | } | |
115 | } | |
116 | } |