Moved to macros
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Oct 2011 09:57:54 +0000 (09:57 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Oct 2011 09:57:54 +0000 (09:57 +0000)
PWG4/UserTasks/PHOS_PbPbQA/PHOSPbPb.C [deleted file]

diff --git a/PWG4/UserTasks/PHOS_PbPbQA/PHOSPbPb.C b/PWG4/UserTasks/PHOS_PbPbQA/PHOSPbPb.C
deleted file mode 100644 (file)
index c6b964c..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-void PHOSPbPbQA(const char* dataset="collection.xml")
-{
-  gSystem->Load("libTree.so");
-  gSystem->Load("libGeom.so");
-  gSystem->Load("libVMC.so");
-  gSystem->Load("libPhysics.so");
-  
-  //load analysis framework
-  gSystem->Load("libANALYSIS");
-  gSystem->Load("libANALYSISalice"); //AliAnalysisTaskSE
-
-  gSystem->Load("libPWG4UserTasks.so");
-  
-  gSystem->AddIncludePath("-I$ALICE_ROOT/include -I$ALICE_ROOT/PHOS");
-
-  cout << "PHOSPbPbQA: processing collection " << dataset << endl;
-
-  TString data = dataset;
-  TChain* chain = 0;
-  
-  if(data.Contains(".xml")) {
-    
-    TGrid::Connect("alien://");
-    
-    chain = new TChain("esdTree");
-    TGridCollection * collection = dynamic_cast<TGridCollection*>(TAlienCollection::Open(dataset));
-    
-    TAlienResult* result = collection->GetGridResult("",0 ,0);
-    TList* rawFileList = result->GetFileInfoList();
-    
-    for (Int_t counter=0 ; counter < rawFileList->GetEntries() ; counter++) {
-      TFileInfo * fi =  static_cast<TFileInfo*>(rawFileList->At(counter)) ; 
-      const char * rawFile = fi->GetCurrentUrl()->GetUrl() ;  
-      printf("Processing %s\n", rawFile) ;
-      chain->Add(rawFile);
-      printf("Chain: %d entries.\n",chain->GetEntries()); 
-    }
-  }
-  
-  if(data.Contains(".txt")) {
-    gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-    chain = CreateESDChain(dataset, 300);
-  }
-  
-  if(data.Contains(".root")) {
-    chain = new TChain("esdTree");
-    chain->Add(dataset);
-  }
-
-  AliLog::SetGlobalLogLevel(AliLog::kError);
-  
-  Int_t nentr = chain->GetEntries();
-  printf("Number of events in the collection is %d\n",nentr);
-
-  // Make the analysis manager
-  AliAnalysisManager *mgr  = new AliAnalysisManager("Manager", "Manager");
-
-    // Input handler
-  AliESDInputHandler *esdHandler = new AliESDInputHandler();
-  mgr->SetInputEventHandler(esdHandler);
-  
-  // Output handler
-  AliESDHandler* esdoutHandler   = new AliESDHandler();
-  
-  // Debug level
-  mgr->SetDebugLevel(0);
-  
-  //Add centrality task!
-  gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
-  AliCentralitySelectionTask *taskCentrality = AddTaskCentrality() ;
-  // taskCentrality->SetMCInput();
-
-  // Add my task
-  AliAnalysisTaskPHOSPbPbQA *task1 = new AliAnalysisTaskPHOSPbPbQA("PbPbQA");
-  mgr->AddTask(task1);
-  
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinput   = mgr->GetCommonInputContainer(); 
-  AliAnalysisDataContainer *coutput = mgr->CreateContainer("histESD",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           "PHOSPbPbQA.root"); 
-  
-  // Connect input/output for task1
-  mgr->ConnectInput(task1 , 0, cinput);
-  mgr->ConnectOutput(task1, 1, coutput);
-  
-  if (mgr->InitAnalysis()) {
-    mgr->PrintStatus();
-    mgr->StartAnalysis("local", chain);
-  }
-  
-  cout <<" Analysis ended sucessfully "<< endl ;
-  
-}