From 75310d85337ca0e44e86da2ead0f4b9be93d6a1d Mon Sep 17 00:00:00 2001 From: Roberto Preghenella Date: Thu, 15 Sep 2016 09:34:03 +0200 Subject: [PATCH] Revert "Revert "Added changes by P. Svirin to run the AOD only with a snapshot in a networkless environment, as for ORNL TITAN"" This reverts commit 23b3f76f41dba627b004b2a690721e46682a3414. --- AOD/AODtrainsim.C | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/AOD/AODtrainsim.C b/AOD/AODtrainsim.C index 176d201d..d497b0e7 100644 --- a/AOD/AODtrainsim.C +++ b/AOD/AODtrainsim.C @@ -69,7 +69,11 @@ Bool_t LoadAnalysisLibraries(); Bool_t LoadLibrary(const char *); void ProcessEnvironment(); TChain *CreateChain(); -const char *cdbPath = "raw://"; + +// ORNL +//const char *cdbPath = "raw://"; +const char *cdbPath = "local://"; + Int_t run_number = 0; //______________________________________________________________________________ @@ -101,29 +105,37 @@ void AODtrainsim(Int_t merge=0) TString ocdbConfig = "default,snapshot"; if (gSystem->Getenv("CONFIG_OCDB")) ocdbConfig = gSystem->Getenv("CONFIG_OCDB"); - if (ocdbConfig.Contains("alien")) { + +// ORNL + /*if (ocdbConfig.Contains("alien")) { // set OCDB gROOT->LoadMacro("$ALIDPG_ROOT/MC/OCDBConfig.C"); OCDBDefault(1); } else { + */ // set OCDB snapshot mode AliCDBManager *cdbm = AliCDBManager::Instance(); cdbm->SetSnapshotMode("OCDBrec.root"); - } +// } if(iCollision == kPbPb) useCentrality =kTRUE; UpdateFlags(); - if (merge || doCDBconnect) { + printf("Some debugging info ================"); + +// ORNL +/* if (merge || doCDBconnect) { TGrid::Connect("alien://"); if (!gGrid || !gGrid->IsConnected()) { ::Error("AODtrainsim", "No grid connection"); return; } } + */ + // Set temporary merging directory to current one gSystem->Setenv("TMPDIR", gSystem->pwd()); // Set temporary compilation directory to current one @@ -235,14 +247,25 @@ void AddAnalysisTasks(const char *cdb_location) } // CDB connection // - if (doCDBconnect && !useTender) { + +// ORNL + /* if (doCDBconnect && !useTender) { gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/PilotTrain/AddTaskCDBconnect.C"); AliTaskCDBconnect *taskCDB = AddTaskCDBconnect(cdb_location, run_number); if (!taskCDB) return; AliCDBManager *cdb = AliCDBManager::Instance(); cdb->SetDefaultStorage(cdb_location); // taskCDB->SetRunNumber(run_number); - } + } */ + + if (doCDBconnect) { + gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/PilotTrain/AddTaskCDBconnect.C"); + AliTaskCDBconnect *taskCDB = AddTaskCDBconnect(cdb_location, run_number); + if (!taskCDB) return; + // AliCDBManager *cdb = AliCDBManager::Instance(); + // cdb->SetDefaultStorage(cdb_location); + // taskCDB->SetRunNumber(run_number); + } if (usePhysicsSelection) { // Physics selection task