*
* The output is a root file containing the objects defined in the
* analysis task. These could be histograms or THnSparse objects.
- * There is one output file per task.
+ * There is one output file per task containing a TList of TH1 or THnSparse objects.
*
* Run without arguments to get a few examples how to use the macro
* and which tasks are available in svn.
* If alien:// is placed before the input filename, then the macro connects to the grid to access the file.
*
* In case you want to run over many ESD files, then prepare a list of them in a .txt file and they will be chained for the analysis.
- * The .txt file takes the place of the first argument in that case.
+ * The .txt file takes the place of the first argument in that case. The chain can take up to 200 files at the moment. The user
+ * can modify this in the call CreateESDChain(file.Data(),200);
+ *
+ * If the files are not sitting locally but on the GRID, then their location should be designated like:
+ * alien:///alice/data/2011/LHC11a/000146018/ESDs/pass1/11000146018023.20/AliESDs.root in the *txt file.
+ * The macro takes care of connecting to the GRID, as soon as the first file is found that begins with alien://
*
* @ingroup alihlt_qa
* @author Kalliopi.Kanaki@ift.uib.no, Hege.Erdal@student.uib.no
TStopwatch timer;
timer.Start();
- gSystem->Load("libTree.so");
- gSystem->Load("libGeom.so");
- gSystem->Load("libVMC.so");
- gSystem->Load("libPhysics.so");
+ gSystem->Load("libTree");
+ gSystem->Load("libGeom");
+ gSystem->Load("libVMC");
+ gSystem->Load("libPhysics");
//----------- Loading the required libraries ---------//
- gSystem->Load("libSTEERBase.so");
- gSystem->Load("libESD.so");
- gSystem->Load("libAOD.so");
- gSystem->Load("libANALYSIS.so");
- gSystem->Load("libANALYSISalice.so");
- gSystem->Load("libHLTbase.so");
+ gSystem->Load("libSTEERBase");
+ gSystem->Load("libESD");
+ gSystem->Load("libAOD");
+ gSystem->Load("libANALYSIS");
+ gSystem->Load("libANALYSISalice");
+ gSystem->Load("libHLTbase");
- gSystem->AddIncludePath("-I$ALICE_ROOT/HLT/BASE -I$ALICE_ROOT/PWG1/TPC -I. -I$ALICE_ROOT/STEER -I$ALICE_ROOT/ANALYSIS");
+ gSystem->AddIncludePath("-I$ALICE_ROOT/HLT/BASE -I$ALICE_ROOT/PWGPP/TPC -I. -I$ALICE_ROOT/STEER -I$ALICE_ROOT/ANALYSIS");
- gSystem->Load("libTPCcalib.so");
- gSystem->Load("libTRDbase.so");
- gSystem->Load("libTRDrec.so");
- gSystem->Load("libITSbase.so");
- gSystem->Load("libITSrec.so");
- gSystem->Load("libTENDER.so");
- gSystem->Load("libPWG1.so");
+ gSystem->Load("libTPCcalib");
+ gSystem->Load("libTRDbase");
+ gSystem->Load("libTRDrec");
+ gSystem->Load("libITSbase");
+ gSystem->Load("libITSrec");
+ gSystem->Load("libTender");
+ gSystem->Load("libPWGPP");
gROOT->ProcessLine(".include $ALICE_ROOT/include");
//gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
- Bool_t bPHOS = kFALSE, bGLOBAL = kFALSE, bEMCAL = kFALSE, bPWG1 = kFALSE, bD0 = kFALSE, bCB = kFALSE;
+ Bool_t bPHOS = kFALSE, bGLOBAL = kFALSE, bEMCAL = kFALSE, bPWGPP = kFALSE, bD0 = kFALSE, bCB = kFALSE;
TString allArgs = detectorTask;
TString argument;
bGLOBAL = kTRUE;
continue;
}
- if(argument.CompareTo("pwg1", TString::kIgnoreCase)==0){
- bPWG1 = kTRUE;
+ if(argument.CompareTo("pwgpp", TString::kIgnoreCase)==0){
+ bPWGPP = kTRUE;
continue;
}
if(argument.CompareTo("D0", TString::kIgnoreCase)==0){
cout << "\n========= You are loading the following task --> "<< (taskFolder+strTask).Chop() << endl;
}
- if(bPWG1) gROOT->LoadMacro("$ALICE_ROOT/HLT/QA/tasks/macros/AddTaskPerformance.C");
+ if(bPWGPP) gROOT->LoadMacro("$ALICE_ROOT/HLT/QA/tasks/macros/AddTaskPerformance.C");
- if(file.Contains("alien")) TGrid::Connect("alien://");
+ if(file.BeginsWith("alien://")) TGrid::Connect("alien://");
if(file.Contains("AliESDs.root")){
TChain *chain = new TChain("esdTree");
chain->Add(file);
}
- //Constructs chain from filenames in *.txt
- //on the form $DIR/AliESDs.root
+ // Constructs chain from filenames in *.txt
+ // in the form $DIR/AliESDs.root
else if(file.Contains(".txt")){
gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
- chain=CreateESDChain(file.Data(),200);
+ chain = CreateESDChain(file.Data(),200);
+ // chain can contain up to 200 files, value can be modified to
+ // include a subset of what the *txt file contains
+
+ TObjArray *fileElements = chain->GetListOfFiles();
+ TIter next(fileElements);
+ TChainElement *chEl = 0;
+ bool alienList = kFALSE;
+ while(( chEl = (TChainElement*)next() )){
+ // loop over the list of files in the *txt and as soon as one is found that starts with alien://,
+ // the boolean alienList turns to kTRUE, which allows the TGrid::Connect call outside the loop.
+ TString tmp = chEl->GetTitle();
+ if(tmp.BeginsWith("alien://")) alienList = kTRUE;
+ }
+ if(alienList==kTRUE) TGrid::Connect("alien://");
}
else if(!file){
AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
AliESDInputHandler *esdH = new AliESDInputHandler;
- //For the PWG1 task, setting HLT is handled inside AliPerformanceTask.C
- if(!bPWG1) esdH->SetReadHLT();
+ //For the PWGPP task, setting HLT is handled inside AliPerformanceTask.C
+ if(!bPWGPP) esdH->SetReadHLT();
esdH->SetReadFriends(kFALSE);
mgr->SetInputEventHandler(esdH);
mgr->SetNSysInfo(1000);
mgr->ConnectOutput(taskGLOBAL,1,coutputGLOBAL);
}
- if(bPWG1){
+ if(bPWGPP){
Bool_t hasMC=kFALSE;
// -- Add Task for HLT and Offline
AliPerformanceTask *HLTtpcQA = AddTaskPerformance(hasMC,kFALSE,kTRUE);
}
void compare_HLT_offline_local(){
- cout << "\n The following tasks are available and maintained in $ALICE_ROOT/HLT/QA/tasks/ :\n"<< endl;
+ cout << "\n The following tasks and respective plotting macros are available and maintained in $ALICE_ROOT/HLT/QA/tasks/ :\n"<< endl;
cout << " AliAnalysisTaskHLTCentralBarrel (macros/drawTHnSparse.C)\n AliAnalysisTaskHLT.cxx (macros/drawGlobalESDHistograms.C)" << endl;
cout << " AliAnalysisTaskHLTCalo (EMCAL+PHOS) (macros/drawCaloHistograms.C) \n AliAnalysisTaskD0Trigger (no plotting macro committed)\n" << endl;