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");
37 gROOT->LoadMacro("AliAnalysisTaskPt.cxx+");
38 const char *collectionfile = "wn.xml";
40 //____________________________________________//
42 AliTagAnalysis *analysis = new AliTagAnalysis();
44 chain = analysis->GetChainFromCollection(collectionfile,"esdTree");
45 chain->SetBranchStatus("*Calo*",0);
47 //____________________________________________//
48 // Make the analysis manager
49 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
50 AliVEventHandler* esdH = new AliESDInputHandler;
51 mgr->SetInputEventHandler(esdH);
52 //____________________________________________//
54 AliAnalysisTaskPt *task1 = new AliAnalysisTaskPt("TaskPt");
56 // Create containers for input/output
57 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
58 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist1", TH1::Class(),AliAnalysisManager::kOutputContainer,"Pt.ESD.root");
60 //____________________________________________//
61 mgr->ConnectInput(task1,0,cinput1);
62 mgr->ConnectOutput(task1,0,coutput1);
63 if (!mgr->InitAnalysis()) return;
65 mgr->StartAnalysis("local",chain);
72 // Create A tag analysis object and impose some selection criteria
73 AliTagAnalysis *tagAna = new AliTagAnalysis();
75 //Case where the tag files are stored locally
76 //TagAna->ChainLocalTags(".");
78 //Case where the tag files are stored in the file catalog
79 //pp.xml is the xml collection of tag files that was produced
80 //by querying the file catalog.
81 TAlienCollection* coll = TAlienCollection::Open("tag.xml");
82 TGridResult* tagResult = coll->GetGridResult("",0,0);
83 tagAna->ChainGridTags(tagResult);
85 //__________________________//
86 //Usage of string statements//
87 //__________________________//
88 /*const char* fRunCuts = "fAliceRunId == 340";
89 const char* fEventCuts = "(fEventTag.fTopPtMin >= 1.0)&&(fEventTag.fNumberOfTracks >= 11)&&(fEven
90 tTag.fNumberOfTracks <= 12)";
91 tagAna->CreateXMLCollection("global",fRunCuts,fEventCuts);*/
93 //________________________________________________//
94 // Usage of Ali*TagCuts classes //
95 //________________________________________________//
96 // create a RunTagCut object
97 AliRunTagCuts *runCuts = new AliRunTagCuts();
98 // create a LHCTagCut object
99 AliLHCTagCuts *lhcCuts = new AliLHCTagCuts();
100 // create a DetectorTagCut object
101 AliDetectorTagCuts *detCuts = new AliDetectorTagCuts();
102 // create an EventTagCut object
103 AliEventTagCuts *evCuts = new AliEventTagCuts();
104 evCuts->SetMultiplicityRange(11,12);
105 tagAna->CreateXMLCollection("global",runCuts,lhcCuts,detCuts,evCuts);
108 Int_t setupPar(const char* pararchivename) {
112 if (pararchivename) {
113 char processline[1024];
114 sprintf(processline,".! tar xvzf %s.par",pararchivename);
115 gROOT->ProcessLine(processline);
116 const char* ocwd = gSystem->WorkingDirectory();
117 gSystem->ChangeDirectory(pararchivename);
119 // check for BUILD.sh and execute
120 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
121 printf("*******************************\n");
122 printf("*** Building PAR archive ***\n");
123 printf("*******************************\n");
125 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
126 Error("runProcess","Cannot Build the PAR Archive! - Abort!");
130 // check for SETUP.C and execute
131 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
132 printf("*******************************\n");
133 printf("*** Setup PAR archive ***\n");
134 printf("*******************************\n");
135 gROOT->Macro("PROOF-INF/SETUP.C");
138 gSystem->ChangeDirectory("../");