5 printf("*** Connect to AliEn ***\n");
6 TGrid::Connect("alien://");
7 gSystem->Load("libProofPlayer.so");
9 //____________________________________________________//
10 //_____________Setting up STEERBase.par_______________//
11 //____________________________________________________//
12 setupPar("STEERBase");
13 gSystem->Load("libSTEERBase.so");
15 //____________________________________________________//
16 //_____________Setting up ESD.par_____________________//
17 //____________________________________________________//
19 gSystem->Load("libVMC.so");
20 gSystem->Load("libESD.so");
22 //____________________________________________________//
23 //_____________Setting up AOD.par_____________________//
24 //____________________________________________________//
26 gSystem->Load("libAOD.so");
28 //_____________________________________________________________//
29 //_____________Setting up ANALYSIS_NEW.par_____________________//
30 //_____________________________________________________________//
32 gSystem->Load("libANALYSIS.so");
34 gROOT->LoadMacro("AliAnalysisTaskPt.cxx+");
39 const char *collectionfile = "wn.xml";
41 //____________________________________________//
43 AliTagAnalysis *analysis = new AliTagAnalysis();
45 chain = analysis->GetChainFromCollection(collectionfile,"esdTree");
46 chain->SetBranchStatus("*Calo*",0);
48 //____________________________________________//
49 // Make the analysis manager
50 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
51 AliVEventHandler* esdH = new AliESDInputHandler;
52 mgr->SetInputEventHandler(esdH);
53 //____________________________________________//
55 AliAnalysisTaskPt *task1 = new AliAnalysisTaskPt("TaskPt");
57 // Create containers for input/output
58 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer);
59 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist1", TH1::Class(),AliAnalysisManager::kOutputContainer,"Pt.ESD.root");
61 //____________________________________________//
62 mgr->ConnectInput(task1,0,cinput1);
63 mgr->ConnectOutput(task1,0,coutput1);
64 if (!mgr->InitAnalysis()) return;
66 mgr->StartAnalysis("local",chain);
73 // Create A tag analysis object and impose some selection criteria
74 AliTagAnalysis *tagAna = new AliTagAnalysis();
76 //Case where the tag files are stored locally
77 //TagAna->ChainLocalTags(".");
79 //Case where the tag files are stored in the file catalog
80 //pp.xml is the xml collection of tag files that was produced
81 //by querying the file catalog.
82 TAlienCollection* coll = TAlienCollection::Open("tag.xml");
83 TGridResult* tagResult = coll->GetGridResult("",0,0);
84 tagAna->ChainGridTags(tagResult);
86 //__________________________//
87 //Usage of string statements//
88 //__________________________//
89 /*const char* fRunCuts = "fAliceRunId == 340";
90 const char* fEventCuts = "(fEventTag.fTopPtMin >= 1.0)&&(fEventTag.fNumberOfTracks >= 11)&&(fEven
91 tTag.fNumberOfTracks <= 12)";
92 tagAna->CreateXMLCollection("global",fRunCuts,fEventCuts);*/
94 //________________________________________________//
95 // Usage of Ali*TagCuts classes //
96 //________________________________________________//
97 // create a RunTagCut object
98 AliRunTagCuts *runCuts = new AliRunTagCuts();
99 // create a LHCTagCut object
100 AliLHCTagCuts *lhcCuts = new AliLHCTagCuts();
101 // create a DetectorTagCut object
102 AliDetectorTagCuts *detCuts = new AliDetectorTagCuts();
103 // create an EventTagCut object
104 AliEventTagCuts *evCuts = new AliEventTagCuts();
105 evCuts->SetMultiplicityRange(11,12);
106 tagAna->CreateXMLCollection("global",runCuts,lhcCuts,detCuts,evCuts);
109 Int_t setupPar(const char* pararchivename) {
113 if (pararchivename) {
114 char processline[1024];
115 sprintf(processline,".! tar xvzf %s.par",pararchivename);
116 gROOT->ProcessLine(processline);
117 const char* ocwd = gSystem->WorkingDirectory();
118 gSystem->ChangeDirectory(pararchivename);
120 // check for BUILD.sh and execute
121 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
122 printf("*******************************\n");
123 printf("*** Building PAR archive ***\n");
124 printf("*******************************\n");
126 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
127 Error("runProcess","Cannot Build the PAR Archive! - Abort!");
131 // check for SETUP.C and execute
132 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
133 printf("*******************************\n");
134 printf("*** Setup PAR archive ***\n");
135 printf("*******************************\n");
136 gROOT->Macro("PROOF-INF/SETUP.C");
139 gSystem->ChangeDirectory("../");