]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- In the ESD Run the beam type for PbPb has changed from Pb-Pb last year to A-A....
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Nov 2011 09:12:31 +0000 (09:12 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Nov 2011 09:12:31 +0000 (09:12 +0000)
- This morning there was a commit from Ruben checking in the destructor whether the analysis is in proof mode. This needs an instance of the analysis manager which we don't have when we run makeResults.C. I definitely want to have the possibility to run the macro without creating an analysis manager instance. An additional protection is added for the case no analysis manager is available. Affects AliTRDinfoGen, AliTRDresolution, AliTRDrecoTask.
- Protection in makeResults.C not working anymore with the latest alien versions (GSHELL_ROOT not set anymore in gclient_env_$UID), therefore commented out.

PWG1/TRD/AliTRDinfoGen.cxx
PWG1/TRD/AliTRDrecoTask.cxx
PWG1/TRD/AliTRDresolution.cxx
PWG1/TRD/macros/makeResults.C

index 5617f1b671e39f662441b82a9667db47a898fa9a..ede6ab400aca35f0af42a263f52e68dcc0c4cdcb 100644 (file)
@@ -192,7 +192,7 @@ AliTRDinfoGen::~AliTRDinfoGen()
     delete fV0List;\r
     fV0List = NULL;\r
   }\r
-  if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ \r
+  if(fContainer && !(AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode())){ \r
     fContainer->Delete(); \r
     delete fContainer;\r
     fContainer = NULL;\r
@@ -409,7 +409,8 @@ void AliTRDinfoGen::UserExec(Option_t *){
   // Author: Ionut Arsene <I.C.Arsene@gsi.de>\r
   Int_t centralityBin = -1;\r
   AliDebug(2, Form("  Beam Type: %s", fESDev->GetESDRun()->GetBeamType()));\r
-  if(TString(fESDev->GetESDRun()->GetBeamType()).Contains("Pb-Pb")){\r
+  TString beamtype = fESDev->GetESDRun()->GetBeamType();\r
+  if(beamtype.Contains("Pb-Pb") || beamtype.Contains("A-A")){\r
     centralityBin = 4;\r
     const AliMultiplicity *mult = fESDev->GetMultiplicity();\r
     Double_t zdcNeutronEnergy = fESDev->GetZDCN1Energy()+fESDev->GetZDCN2Energy();\r
index 7967e8883bea943cdc7a9d1f5792e30314b5bd94..db4188a21929df9f027dc5bd4e72dec68a005a53 100644 (file)
@@ -106,7 +106,7 @@ AliTRDrecoTask::~AliTRDrecoTask()
     fPlotFuncList = NULL;\r
   }\r
   \r
-  if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){\r
+  if(fContainer && !(AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode())){\r
     if(fContainer->IsOwner()) fContainer->Delete();\r
     delete fContainer;\r
     fContainer = NULL;\r
index de304c6cf390383f860c1ef67c4d626ff5e7eca2..4f960f8aca2fda63cfde082b7879c12b4557648a 100644 (file)
@@ -203,7 +203,7 @@ AliTRDresolution::~AliTRDresolution()
   //
   // Destructor
   //
-  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
+  if (AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
   if(fProj){fProj->Delete(); delete fProj;}
   if(fCl){fCl->Delete(); delete fCl;}
   if(fMCcl){fMCcl->Delete(); delete fMCcl;}
index c3170c71dbb849029b8a513aff9c03be1a28c172..2ad03796a95d3fd299f7408d61b45d2e87f4c6b3 100644 (file)
@@ -79,10 +79,10 @@ void makeSummaryESD(const Char_t* filename="QAResults.root", Double_t* trendValu
 void makeResults(Char_t *opt = "ALL", const Char_t *files="QAResults.root", Char_t *cid = "", Bool_t kGRID=kFALSE, Bool_t dosummary = kTRUE)
 {
   if(kGRID){
-    if(!gSystem->Getenv("GSHELL_ROOT")){
-      Error("makeResults.C", "AliEn not initialized.");
-      return;
-    }
+    //if(!gSystem->Getenv("GSHELL_ROOT")){
+    //  Error("makeResults.C", "AliEn not initialized.");
+    //  return;
+    //}
     TGrid::Connect("alien://");
   }