From: cblume Date: Mon, 14 Nov 2011 09:12:31 +0000 (+0000) Subject: - In the ESD Run the beam type for PbPb has changed from Pb-Pb last year to A-A.... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=f0857a6a1375bcdaab04cac8cbe430d1f8f4fb15;p=u%2Fmrichter%2FAliRoot.git - In the ESD Run the beam type for PbPb has changed from Pb-Pb last year to A-A. To be compatible with both we check both. This affects AliTRDinfoGen. - 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. --- diff --git a/PWG1/TRD/AliTRDinfoGen.cxx b/PWG1/TRD/AliTRDinfoGen.cxx index 5617f1b671e..ede6ab400ac 100644 --- a/PWG1/TRD/AliTRDinfoGen.cxx +++ b/PWG1/TRD/AliTRDinfoGen.cxx @@ -192,7 +192,7 @@ AliTRDinfoGen::~AliTRDinfoGen() delete fV0List; fV0List = NULL; } - if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ + if(fContainer && !(AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode())){ fContainer->Delete(); delete fContainer; fContainer = NULL; @@ -409,7 +409,8 @@ void AliTRDinfoGen::UserExec(Option_t *){ // Author: Ionut Arsene Int_t centralityBin = -1; AliDebug(2, Form(" Beam Type: %s", fESDev->GetESDRun()->GetBeamType())); - if(TString(fESDev->GetESDRun()->GetBeamType()).Contains("Pb-Pb")){ + TString beamtype = fESDev->GetESDRun()->GetBeamType(); + if(beamtype.Contains("Pb-Pb") || beamtype.Contains("A-A")){ centralityBin = 4; const AliMultiplicity *mult = fESDev->GetMultiplicity(); Double_t zdcNeutronEnergy = fESDev->GetZDCN1Energy()+fESDev->GetZDCN2Energy(); diff --git a/PWG1/TRD/AliTRDrecoTask.cxx b/PWG1/TRD/AliTRDrecoTask.cxx index 7967e8883be..db4188a2192 100644 --- a/PWG1/TRD/AliTRDrecoTask.cxx +++ b/PWG1/TRD/AliTRDrecoTask.cxx @@ -106,7 +106,7 @@ AliTRDrecoTask::~AliTRDrecoTask() fPlotFuncList = NULL; } - if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ + if(fContainer && !(AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode())){ if(fContainer->IsOwner()) fContainer->Delete(); delete fContainer; fContainer = NULL; diff --git a/PWG1/TRD/AliTRDresolution.cxx b/PWG1/TRD/AliTRDresolution.cxx index de304c6cf39..4f960f8aca2 100644 --- a/PWG1/TRD/AliTRDresolution.cxx +++ b/PWG1/TRD/AliTRDresolution.cxx @@ -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;} diff --git a/PWG1/TRD/macros/makeResults.C b/PWG1/TRD/macros/makeResults.C index c3170c71dbb..2ad03796a95 100644 --- a/PWG1/TRD/macros/makeResults.C +++ b/PWG1/TRD/macros/makeResults.C @@ -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://"); }