const char *anatype = "ESD";
void macro_HighPtDeDx_lhc10b_Data_ESDs()
{
// Analysis using ESD data
// Automatically generated analysis steering macro executed in grid subjobs
TStopwatch timer;
timer.Start();
// Set temporary merging directory to current one
gSystem->Setenv("TMPDIR", gSystem->pwd());
// Set temporary compilation directory to current one
gSystem->SetBuildDir(gSystem->pwd(), kTRUE);
// Reset existing include path and add current directory first in the search
gSystem->SetIncludePath("-I.");
// Load analysis framework libraries
gSystem->Load("libANALYSIS");
gSystem->Load("libOADB");
gSystem->Load("libANALYSISalice");
gSystem->Load("libCORRFW");
// include path
TString intPath = gInterpreter->GetIncludePath();
TObjArray *listpaths = intPath.Tokenize(" ");
TIter nextpath(listpaths);
TObjString *pname;
while ((pname=(TObjString*)nextpath())) {
TString current = pname->GetName();
if (current.Contains("AliRoot") || current.Contains("ALICE_ROOT")) continue;
gSystem->AddIncludePath(current);
}
if (listpaths) delete listpaths;
gSystem->AddIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include ");
gROOT->ProcessLine(".include $ALICE_ROOT/include");
printf("Include path: %s\n", gSystem->GetIncludePath());
// Add aditional AliRoot libraries
// analysis source to be compiled at runtime (if any)
gROOT->ProcessLine(".L DebugClasses.C+g");
gROOT->ProcessLine(".L AliAnalysisTaskHighPtDeDx.cxx+g");
gROOT->ProcessLine(".L AliAnalysisTaskHighPtDeDxV0.cxx+g");
// fast xrootd reading enabled
printf("!!! You requested FastRead option. Using xrootd flags to reduce timeouts. Note that this may skip some files that could be accessed !!!");
gEnv->SetValue("XNet.ConnectTimeout",50);
gEnv->SetValue("XNet.RequestTimeout",50);
gEnv->SetValue("XNet.MaxRedirectCount",2);
gEnv->SetValue("XNet.ReconnectTimeout",50);
gEnv->SetValue("XNet.FirstConnectMaxCnt",1);
// connect to AliEn and make the chain
if (!TGrid::Connect("alien://")) return;
// read the analysis manager from file
AliAnalysisManager *mgr = AliAnalysisAlien::LoadAnalysisManager("HighPtDeDx_lhc10b_Data_ESDs.root");
if (!mgr) return;
mgr->PrintStatus();
AliLog::SetGlobalLogLevel(AliLog::kError);
TChain *chain = CreateChain("wn.xml", anatype);
mgr->StartAnalysis("localfile", chain);
timer.Stop();
timer.Print();
}
//________________________________________________________________________________
TChain* CreateChain(const char *xmlfile, const char *type="ESD")
{
// Create a chain using url's from xml file
TString filename;
Int_t run = 0;
TString treename = type;
treename.ToLower();
treename += "Tree";
printf("***************************************\n");
printf(" Getting chain of trees %s\n", treename.Data());
printf("***************************************\n");
TAlienCollection *coll = TAlienCollection::Open(xmlfile);
if (!coll) {
::Error("CreateChain", "Cannot create an AliEn collection from %s", xmlfile);
return NULL;
}
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
TChain *chain = new TChain(treename);
coll->Reset();
while (coll->Next()) {
filename = coll->GetTURL();
if (mgr) {
Int_t nrun = AliAnalysisManager::GetRunFromAlienPath(filename);
if (nrun && nrun != run) {
printf("### Run number detected from chain: %d\n", nrun);
mgr->SetRunFromPath(nrun);
run = nrun;
}
}
chain->Add(filename);
}
if (!chain->GetNtrees()) {
::Error("CreateChain", "No tree found from collection %s", xmlfile);
return NULL;
}
return chain;
}
macro_HighPtDeDx_lhc10b_Data_ESDs.C:1 macro_HighPtDeDx_lhc10b_Data_ESDs.C:2 macro_HighPtDeDx_lhc10b_Data_ESDs.C:3 macro_HighPtDeDx_lhc10b_Data_ESDs.C:4 macro_HighPtDeDx_lhc10b_Data_ESDs.C:5 macro_HighPtDeDx_lhc10b_Data_ESDs.C:6 macro_HighPtDeDx_lhc10b_Data_ESDs.C:7 macro_HighPtDeDx_lhc10b_Data_ESDs.C:8 macro_HighPtDeDx_lhc10b_Data_ESDs.C:9 macro_HighPtDeDx_lhc10b_Data_ESDs.C:10 macro_HighPtDeDx_lhc10b_Data_ESDs.C:11 macro_HighPtDeDx_lhc10b_Data_ESDs.C:12 macro_HighPtDeDx_lhc10b_Data_ESDs.C:13 macro_HighPtDeDx_lhc10b_Data_ESDs.C:14 macro_HighPtDeDx_lhc10b_Data_ESDs.C:15 macro_HighPtDeDx_lhc10b_Data_ESDs.C:16 macro_HighPtDeDx_lhc10b_Data_ESDs.C:17 macro_HighPtDeDx_lhc10b_Data_ESDs.C:18 macro_HighPtDeDx_lhc10b_Data_ESDs.C:19 macro_HighPtDeDx_lhc10b_Data_ESDs.C:20 macro_HighPtDeDx_lhc10b_Data_ESDs.C:21 macro_HighPtDeDx_lhc10b_Data_ESDs.C:22 macro_HighPtDeDx_lhc10b_Data_ESDs.C:23 macro_HighPtDeDx_lhc10b_Data_ESDs.C:24 macro_HighPtDeDx_lhc10b_Data_ESDs.C:25 macro_HighPtDeDx_lhc10b_Data_ESDs.C:26 macro_HighPtDeDx_lhc10b_Data_ESDs.C:27 macro_HighPtDeDx_lhc10b_Data_ESDs.C:28 macro_HighPtDeDx_lhc10b_Data_ESDs.C:29 macro_HighPtDeDx_lhc10b_Data_ESDs.C:30 macro_HighPtDeDx_lhc10b_Data_ESDs.C:31 macro_HighPtDeDx_lhc10b_Data_ESDs.C:32 macro_HighPtDeDx_lhc10b_Data_ESDs.C:33 macro_HighPtDeDx_lhc10b_Data_ESDs.C:34 macro_HighPtDeDx_lhc10b_Data_ESDs.C:35 macro_HighPtDeDx_lhc10b_Data_ESDs.C:36 macro_HighPtDeDx_lhc10b_Data_ESDs.C:37 macro_HighPtDeDx_lhc10b_Data_ESDs.C:38 macro_HighPtDeDx_lhc10b_Data_ESDs.C:39 macro_HighPtDeDx_lhc10b_Data_ESDs.C:40 macro_HighPtDeDx_lhc10b_Data_ESDs.C:41 macro_HighPtDeDx_lhc10b_Data_ESDs.C:42 macro_HighPtDeDx_lhc10b_Data_ESDs.C:43 macro_HighPtDeDx_lhc10b_Data_ESDs.C:44 macro_HighPtDeDx_lhc10b_Data_ESDs.C:45 macro_HighPtDeDx_lhc10b_Data_ESDs.C:46 macro_HighPtDeDx_lhc10b_Data_ESDs.C:47 macro_HighPtDeDx_lhc10b_Data_ESDs.C:48 macro_HighPtDeDx_lhc10b_Data_ESDs.C:49 macro_HighPtDeDx_lhc10b_Data_ESDs.C:50 macro_HighPtDeDx_lhc10b_Data_ESDs.C:51 macro_HighPtDeDx_lhc10b_Data_ESDs.C:52 macro_HighPtDeDx_lhc10b_Data_ESDs.C:53 macro_HighPtDeDx_lhc10b_Data_ESDs.C:54 macro_HighPtDeDx_lhc10b_Data_ESDs.C:55 macro_HighPtDeDx_lhc10b_Data_ESDs.C:56 macro_HighPtDeDx_lhc10b_Data_ESDs.C:57 macro_HighPtDeDx_lhc10b_Data_ESDs.C:58 macro_HighPtDeDx_lhc10b_Data_ESDs.C:59 macro_HighPtDeDx_lhc10b_Data_ESDs.C:60 macro_HighPtDeDx_lhc10b_Data_ESDs.C:61 macro_HighPtDeDx_lhc10b_Data_ESDs.C:62 macro_HighPtDeDx_lhc10b_Data_ESDs.C:63 macro_HighPtDeDx_lhc10b_Data_ESDs.C:64 macro_HighPtDeDx_lhc10b_Data_ESDs.C:65 macro_HighPtDeDx_lhc10b_Data_ESDs.C:66 macro_HighPtDeDx_lhc10b_Data_ESDs.C:67 macro_HighPtDeDx_lhc10b_Data_ESDs.C:68 macro_HighPtDeDx_lhc10b_Data_ESDs.C:69 macro_HighPtDeDx_lhc10b_Data_ESDs.C:70 macro_HighPtDeDx_lhc10b_Data_ESDs.C:71 macro_HighPtDeDx_lhc10b_Data_ESDs.C:72 macro_HighPtDeDx_lhc10b_Data_ESDs.C:73 macro_HighPtDeDx_lhc10b_Data_ESDs.C:74 macro_HighPtDeDx_lhc10b_Data_ESDs.C:75 macro_HighPtDeDx_lhc10b_Data_ESDs.C:76 macro_HighPtDeDx_lhc10b_Data_ESDs.C:77 macro_HighPtDeDx_lhc10b_Data_ESDs.C:78 macro_HighPtDeDx_lhc10b_Data_ESDs.C:79 macro_HighPtDeDx_lhc10b_Data_ESDs.C:80 macro_HighPtDeDx_lhc10b_Data_ESDs.C:81 macro_HighPtDeDx_lhc10b_Data_ESDs.C:82 macro_HighPtDeDx_lhc10b_Data_ESDs.C:83 macro_HighPtDeDx_lhc10b_Data_ESDs.C:84 macro_HighPtDeDx_lhc10b_Data_ESDs.C:85 macro_HighPtDeDx_lhc10b_Data_ESDs.C:86 macro_HighPtDeDx_lhc10b_Data_ESDs.C:87 macro_HighPtDeDx_lhc10b_Data_ESDs.C:88 macro_HighPtDeDx_lhc10b_Data_ESDs.C:89 macro_HighPtDeDx_lhc10b_Data_ESDs.C:90 macro_HighPtDeDx_lhc10b_Data_ESDs.C:91 macro_HighPtDeDx_lhc10b_Data_ESDs.C:92 macro_HighPtDeDx_lhc10b_Data_ESDs.C:93 macro_HighPtDeDx_lhc10b_Data_ESDs.C:94 macro_HighPtDeDx_lhc10b_Data_ESDs.C:95 macro_HighPtDeDx_lhc10b_Data_ESDs.C:96 macro_HighPtDeDx_lhc10b_Data_ESDs.C:97 macro_HighPtDeDx_lhc10b_Data_ESDs.C:98 macro_HighPtDeDx_lhc10b_Data_ESDs.C:99 macro_HighPtDeDx_lhc10b_Data_ESDs.C:100 macro_HighPtDeDx_lhc10b_Data_ESDs.C:101 macro_HighPtDeDx_lhc10b_Data_ESDs.C:102 macro_HighPtDeDx_lhc10b_Data_ESDs.C:103 macro_HighPtDeDx_lhc10b_Data_ESDs.C:104 macro_HighPtDeDx_lhc10b_Data_ESDs.C:105 macro_HighPtDeDx_lhc10b_Data_ESDs.C:106 macro_HighPtDeDx_lhc10b_Data_ESDs.C:107 macro_HighPtDeDx_lhc10b_Data_ESDs.C:108