1 //####################################################//
2 //### To execute the macro: ###//
3 //### $ALIEN/globus/bin/grid-proxy-init ###//
4 //### $ALIEN/api/bin/alien-token-init pchrista ###//
5 //### root.exe -q DemoTags ###//
6 //####################################################//
12 const char* pararchiveJETAN = "JETAN";
13 const char* pararchiveESD = "ESD";
14 //////////////////////////////////////////
15 // Libraries required to load
16 //////////////////////////////////////////
18 //////////////////////////////////////////////////////////////////
20 if (pararchiveJETAN) {
21 char processline[1024];
22 sprintf(processline,".! tar xvzf %s.par",pararchiveJETAN);
23 gROOT->ProcessLine(processline);
24 const char* ocwd = gSystem->WorkingDirectory();
25 gSystem->ChangeDirectory(pararchiveJETAN);
27 // check for BUILD.sh and execute
28 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
29 printf("**************************************\n");
30 printf("*** Building PAR archive for JETAN ***\n");
31 printf("**************************************\n");
33 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
34 Error("batchSelector","Cannot Build the PAR Archive! - Abort!");
38 // check for SETUP.C and execute
39 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
40 printf("*******************************\n");
41 printf("*** Setup PAR archive ***\n");
42 printf("*******************************\n");
43 gROOT->Macro("PROOF-INF/SETUP.C");
46 gSystem->ChangeDirectory("../");
51 char processline[1024];
52 sprintf(processline,".! tar xvzf %s.par",pararchiveESD);
53 gROOT->ProcessLine(processline);
54 const char* ocwd = gSystem->WorkingDirectory();
55 gSystem->ChangeDirectory(pararchiveESD);
57 // check for BUILD.sh and execute
58 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
59 printf("**************************************\n");
60 printf("*** Building PAR archive for JETAN ***\n");
61 printf("**************************************\n");
63 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
64 Error("batchSelector","Cannot Build the PAR Archive! - Abort!");
68 // check for SETUP.C and execute
69 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
70 printf("*******************************\n");
71 printf("*** Setup PAR archive ***\n");
72 printf("*******************************\n");
73 gROOT->Macro("PROOF-INF/SETUP.C");
76 gSystem->ChangeDirectory("../");
79 gSystem->Load("libVMC.so");
80 gSystem->Load("libESD.so");
81 gSystem->Load("libJETAN.so");
85 printf("*** Connect to AliEn ***\n");
86 TGrid::Connect("alien://");
88 //////////////////////////////////////////////////////////////////
89 // Create A tag analysis object and impose some selection criteria
90 AliTagAnalysis *TagAna = new AliTagAnalysis();
91 // create an EventTagCut object
92 AliEventTagCuts *EvCuts = new AliEventTagCuts();
93 AliRunTagCuts *RuCuts = new AliRunTagCuts();
94 //EvCuts->SetNChargedAbove1GeVRange(1, 1000);
95 //EvCuts->SetMultiplicityRange(11,120);
96 //EvCuts->SetNPionRange(2,10000);
98 printf("*******************************\n");
99 printf("*** Querying the tags ***\n");
100 printf("*******************************\n");
103 TAlienCollection* coll = TAlienCollection::Open("tag100.xml");
104 TGridResult* TagResult = coll->GetGridResult("");
105 TagAna->ChainGridTags(TagResult);
107 //////////////////////////////////////////////////////////////////
109 printf("*******************************\n");
110 printf("*** Getting the Chain ***\n");
111 printf("*******************************\n");
112 TChain* analysischain = 0x0;
113 analysischain = TagAna->QueryTags(RuCuts, EvCuts);
115 /////////////////////////////////////////////////////////////////
116 // Run the Analysis Selector
117 const char *selectorfile = "AliJetSelector.C";
118 printf("*******************************\n");
119 printf("*** Run Analysis Selector %s\n",selectorfile);
120 printf("*******************************\n");
123 analysischain->Process(selectorfile);