]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - GRP/UpdateCDBIdealGeom.C
Two new SPD cosmic triggers for TRD and one cosmic trigger from PHOS (Federico A.)
[u/mrichter/AliRoot.git] / GRP / UpdateCDBIdealGeom.C
index f58c659540ee7c146e7d2a01cfcaa240ca32530a..962946130b978af21588a863aa0ef6f467616447 100644 (file)
@@ -5,10 +5,12 @@
 #include "AliCDBId.h"
 #include "AliCDBMetaData.h"
 #include "AliGeomManager.h"
+#include "AliMC.h"
 #include <TROOT.h>
 #include "AliRun.h"
 #include <TGeoManager.h>
 #include <TString.h>
+#include <TInterpreter.h>
 #endif
 
 void UpdateCDBIdealGeom(const char* cdbUri, const char* cfgFile){
@@ -22,7 +24,7 @@ void UpdateCDBIdealGeom(const char* cdbUri, const char* cfgFile){
   // we set the default storage to the repository because some dets require
   // already at the time of geometry creation to find calibration objects in the cdb
   AliCDBStorage* storage = 0;
-  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
+  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   storage = cdb->GetStorage(cdbUri);
   if(!storage) 
   {
@@ -43,12 +45,16 @@ void UpdateCDBIdealGeom(const char* cdbUri, const char* cfgFile){
   md->SetAliRootVersion(av.Data());
   md->SetComment(Form("Geometry produced with root version %s and AliRoot %s, revision number %d",rootv,av.Data(),revnum));
   
-  gAlice->Init(cfgFile);
+  gROOT->LoadMacro(cfgFile);
+  gInterpreter->ProcessLine(gAlice->GetConfigFunction());
+  gAlice->GetMCApp()->Init();
   
   if(!gGeoManager){
     Printf("Unable to produce a valid geometry to be put in the CDB!");
     return;
   }
+  gGeoManager->DefaultColors(); // assign default colors according to Z of material
+  // (many colors turned into dark gray nuances some time ago, when the root palette was changed)
   
   Printf("Storing in CDB geometry produced with root version %s and AliRoot version %s",rootv,av.Data());
   storage->Put(gGeoManager,id,md);