From 2cd1f0471be68cd745546146056b440ea9ed469d Mon Sep 17 00:00:00 2001 From: Roberto Preghenella Date: Mon, 3 Apr 2017 07:58:57 +0200 Subject: [PATCH] Properly deal with QA/AOD merging jobs where OCDB snapshots are not available. Attached tasks might need to access the OCDB, therefore in the merging case the use of RAW OCDB is enforced. --- AOD/AODtrainsim.C | 9 ++++++++- QA/QAtrainsim.C | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/AOD/AODtrainsim.C b/AOD/AODtrainsim.C index c39acbc1..dce1a66b 100644 --- a/AOD/AODtrainsim.C +++ b/AOD/AODtrainsim.C @@ -101,7 +101,14 @@ void AODtrainsim(Int_t merge=0) TString ocdbConfig = "default,snapshot"; if (gSystem->Getenv("CONFIG_OCDB")) ocdbConfig = gSystem->Getenv("CONFIG_OCDB"); - if (ocdbConfig.Contains("alien")) { + if (merge != 0) { + // + gSystem->Setenv("CONFIG_RUN", gSystem->Getenv("ALIEN_JDL_LPMRUNNUMBER")); + // set OCDB + gROOT->LoadMacro("$ALIDPG_ROOT/MC/OCDBConfig.C"); + OCDBDefault(1); + } + else if (ocdbConfig.Contains("alien")) { // set OCDB gROOT->LoadMacro("$ALIDPG_ROOT/MC/OCDBConfig.C"); OCDBDefault(1); diff --git a/QA/QAtrainsim.C b/QA/QAtrainsim.C index 2caa883b..3f6398b9 100644 --- a/QA/QAtrainsim.C +++ b/QA/QAtrainsim.C @@ -94,7 +94,14 @@ void QAtrainsim(Int_t run = 0, TString ocdbConfig = "default,snapshot"; if (gSystem->Getenv("CONFIG_OCDB")) ocdbConfig = gSystem->Getenv("CONFIG_OCDB"); - if (ocdbConfig.Contains("alien")) { + if (stage != 0) { + // + gSystem->Setenv("CONFIG_RUN", gSystem->Getenv("ALIEN_JDL_LPMRUNNUMBER")); + // set OCDB + gROOT->LoadMacro("$ALIDPG_ROOT/MC/OCDBConfig.C"); + OCDBDefault(1); + } + else if (ocdbConfig.Contains("alien")) { // set OCDB gROOT->LoadMacro("$ALIDPG_ROOT/MC/OCDBConfig.C"); OCDBDefault(1);