From 458041af69fedded73c6b024a98be5b221a49c20 Mon Sep 17 00:00:00 2001 From: cvetan Date: Fri, 13 Jul 2007 15:04:07 +0000 Subject: [PATCH] Possibilty to load the geometry either from an external root file or from CDB (Raffaele) --- macros/ConfigBeautyPPR.C | 7 +++++++ macros/ConfigCharmPPR.C | 7 +++++++ macros/ConfigHBT.C | 7 +++++++ macros/ConfigPPR.C | 7 +++++++ macros/Config_AliGenCosmicsParam.C | 7 +++++++ macros/Config_PDC06.C | 7 +++++++ macros/Config_PDC06_MUON.C | 7 +++++++ macros/Config_PythiaHeavyFlavours.C | 7 +++++++ 8 files changed, 56 insertions(+) diff --git a/macros/ConfigBeautyPPR.C b/macros/ConfigBeautyPPR.C index ca752102f45..13d77db2e91 100644 --- a/macros/ConfigBeautyPPR.C +++ b/macros/ConfigBeautyPPR.C @@ -57,6 +57,11 @@ void Config() //======================================================================= // Create the output file + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + AliRunLoader* rl=0x0; cout<<"Config.C: Creating Run Loader ..."<SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(3); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor("Pb-Pb"); diff --git a/macros/ConfigCharmPPR.C b/macros/ConfigCharmPPR.C index 36814ce28b7..2ffd68faf56 100644 --- a/macros/ConfigCharmPPR.C +++ b/macros/ConfigCharmPPR.C @@ -54,6 +54,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + //======================================================================= // Create the output file @@ -71,6 +76,8 @@ void Config() rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(3); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor("Pb-Pb"); diff --git a/macros/ConfigHBT.C b/macros/ConfigHBT.C index 60639a3402f..f715b2405ac 100644 --- a/macros/ConfigHBT.C +++ b/macros/ConfigHBT.C @@ -54,6 +54,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + cout<<"Config.C: Creating Run Loader ..."<SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(6); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor("Pb-Pb"); diff --git a/macros/ConfigPPR.C b/macros/ConfigPPR.C index 066cac20321..ffa611f76a9 100644 --- a/macros/ConfigPPR.C +++ b/macros/ConfigPPR.C @@ -158,6 +158,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + AliRunLoader* rl=0x0; AliLog::Message(AliLog::kInfo, "Creating Run Loader", "", "", "Config()"," ConfigPPR.C", __LINE__); @@ -173,6 +178,8 @@ void Config() rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(3); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor(pprTrigConfName[strig]); diff --git a/macros/Config_AliGenCosmicsParam.C b/macros/Config_AliGenCosmicsParam.C index cb67eb44601..19d89af0945 100644 --- a/macros/Config_AliGenCosmicsParam.C +++ b/macros/Config_AliGenCosmicsParam.C @@ -82,6 +82,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + AliRunLoader* rl=0x0; AliLog::Message(AliLog::kInfo, "Creating Run Loader", "Config.C", "Config.C", "Config()"," Config.C", __LINE__); @@ -97,6 +102,8 @@ void Config() rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(1000); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration // gAlice->SetTriggerDescriptor("Pb-Pb"); diff --git a/macros/Config_PDC06.C b/macros/Config_PDC06.C index 29e7642a601..ee4854bc1e7 100644 --- a/macros/Config_PDC06.C +++ b/macros/Config_PDC06.C @@ -162,6 +162,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + //======================================================================= // Create the output file @@ -180,6 +185,8 @@ void Config() rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(1000); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor(TrigConfName[trig]); diff --git a/macros/Config_PDC06_MUON.C b/macros/Config_PDC06_MUON.C index b8795da50cd..65789a6c543 100644 --- a/macros/Config_PDC06_MUON.C +++ b/macros/Config_PDC06_MUON.C @@ -15,6 +15,11 @@ void Config(char directory[100]="", char option[6]="trg1mu") new TGeant3TGeo("C++ Interface to Geant3"); //======================================================================= + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + // Set Random Number seed gRandom->SetSeed(sseed); @@ -32,6 +37,8 @@ void Config(char directory[100]="", char option[6]="trg1mu") rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(1000); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); //======================================================================= // Set the trigger configuration diff --git a/macros/Config_PythiaHeavyFlavours.C b/macros/Config_PythiaHeavyFlavours.C index f80ef5670ec..49d48150259 100644 --- a/macros/Config_PythiaHeavyFlavours.C +++ b/macros/Config_PythiaHeavyFlavours.C @@ -142,6 +142,11 @@ void Config() new TGeant3TGeo("C++ Interface to Geant3"); + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + AliCDBManager::Instance()->SetRun(0); + } + //======================================================================= // Create the output file @@ -160,6 +165,8 @@ void Config() rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(3); gAlice->SetRunLoader(rl); + // gAlice->SetGeometryFromFile("geometry.root"); + // gAlice->SetGeometryFromCDB(); // Set the trigger configuration gAlice->SetTriggerDescriptor(TrigConfName[trig]); -- 2.43.0