4 0. Load neccessary libraries
6 gSystem->Load("libANALYSIS");
7 gSystem->Load("libANALYSISalice");
8 gSystem->Load("libTPCcalib");
9 gSystem->Load("libXrdClient.so");
10 gSystem->Load("libNetx.so");
11 TGrid::Connect("alien://",0,0,"t");
12 gSystem->Load("$ROOTSYS/lib/libXrdClient.so");
14 // 1. Make list of the files
16 .L $ALICE_ROOT/TPC/macros/testTPC/AlienToolkit.cxx+
17 gSystem->Load("libXrdClient.so");
18 gSystem->Load("libNetx.so");
20 char *path = "/alice/cern.ch/user/a/amatyja/alice/data/"
21 toolkit.MakeCollection(path,"32129*Krypton.root");
22 toolkit.MakeCollection(path,"32231*Krypton.root");
23 toolkit.MakeCollection(path,"32284*Krypton.root");
24 toolkit.PrintPFN(); > list.txt
27 // 2. Initialization of proof
29 TProofMgr * proofmgr = TProof::Mgr("lxgrid5.gsi.de");
30 TProof * proof = proofmgr->CreateSession();
31 proof->SetParameter("PROOF_MaxSlavesPerNode", (Long_t)1000);
32 .L /u/miranov/macros/ProofEnableAliRoot.C
33 ProofEnableAliRoot("/usr/local/grid/AliRoot/HEAD0108");
34 gProof->Exec("gSystem->Load(\"libANALYSIS.so\")",kTRUE);
35 gProof->Exec("gSystem->Load(\"libSTAT.so\")",kTRUE);
36 gProof->Exec("gSystem->Load(\"libTPCcalib.so\")",kTRUE);
39 // 3 Run analysis on PROOF
42 // Create chain of input files
44 gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
45 gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+");
46 .L $ALICE_ROOT/TPC/macros/RunAliTPCCalibKrTask.C
47 RunAliTPCCalibKrTask(kTRUE);
55 TFile f("KrHisto.root");
56 AliTPCCalibKr *kr = f.Get("AliTPCCalibKr");
58 kr->ProjectHisto(kr->GetHistoKr(71),"aaa",30,36,30,40)->Draw()
64 TCut cutKr("cutKr","entries.fElements<5000&&fitNormChi2.fElements<3&&fitNormChi2.fElements>0.2&&abs(fitRMS.fElements/fitMean.fElements-0.06)<0.025");
66 TObjArray * array = AliTPCCalibViewerGUI::ShowGUI("kryptonTree.root");
67 AliTPCCalibViewerGUI * viewer = (AliTPCCalibViewerGUI*)array->At(0);
68 TTree * tree = viewer->GetViewer()->GetTree();
70 tree->SetAlias("cutAll","abs(fitNormChi2.fElements-2.)<1.8&&entries.fElements/entries_Median.fElements<4&&entries.fElements/entries_Median.fElements>0.4&&fitRMS.fElements/fitMean.fElements<0.09&&fitRMS.fElements/fitMean.fElements>0.02")
76 void RunAliTPCCalibKrTask(Bool_t bProof = kFALSE)
79 AliXRDPROOFtoolkit tool;
80 chain = tool.MakeChain("list.txt","Kr","",20000,0);
82 chain->SetBranchStatus("Cl.fCluster",kFALSE);
85 // Create the analysis manager
87 AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis");
89 // Calibration component
90 AliTPCCalibKr *calibObj = new AliTPCCalibKr;
91 //calibObj->SetASide(kFALSE);
94 AliTPCCalibKrTask *task = new AliTPCCalibKrTask;
95 task->SetInputChain(chain);
96 task->SetTPCCalibKr(calibObj);
100 cInput = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer);
101 mgr->ConnectInput(task, 0, cInput);
104 cOutput = mgr->CreateContainer("cOutput", TList::Class(), AliAnalysisManager::kOutputContainer,"outHistFile.root");
105 mgr->ConnectOutput(task, 0, cOutput);
107 cOutput->SetSpecialOutput(kTRUE);
108 cOutput->SetFileName("CalibObjectFile.root");
111 if (!mgr->InitAnalysis()) return;
113 mgr->SetDebugLevel(1);
116 mgr->StartAnalysis("proof", chain);
118 else mgr->StartAnalysis("local", chain);
125 TFile fpad("calibKr.root");
126 AliTPCPreprocessorOnline * preprocesor = new AliTPCPreprocessorOnline;
127 preprocesor->AddComponent(spectrMean->Clone());
128 preprocesor->AddComponent(spectrRMS->Clone());
129 preprocesor->AddComponent(fitMean->Clone());
130 preprocesor->AddComponent(fitRMS->Clone());
131 preprocesor->AddComponent(fitNormChi2->Clone());
132 preprocesor->AddComponent(entries->Clone());
133 preprocesor->DumpToFile("kryptonTree.root");