]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSGeoPlot.C
Exit with AliFatal if a default OCDB has not been set. In the past a local CDB was...
[u/mrichter/AliRoot.git] / ITS / AliITSGeoPlot.C
index 058a24c0e6b2bdf148801673072ea123a8384daa..1c6c48441bf5a0923306e40c49c45249a5878491 100644 (file)
@@ -31,6 +31,8 @@
 #include "AliRunLoader.h"
 #include "AliITSLoader.h"
 #include "AliHeader.h"
+#include "AliCDBManager.h"
+#include "AliCDBStorage.h"
 #endif
 void GetHitsCoor(TObject *its, Int_t mod, TObjArray & histos, Int_t subd,Bool_t verb);
 Int_t GetRecCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb);
@@ -94,7 +96,6 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", TString filenam
   Bool_t userec=choice.Contains("Rec");
   Bool_t useclustersv2=choice.Contains("ClustersV2");
   Int_t retcode=1; //return code
   if (gClassTable->GetID("AliRun") < 0) {
     gInterpreter->ExecuteMacro("loadlibs.C");
   }
@@ -105,6 +106,15 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", TString filenam
       gAlice=0;
     }
   }
+  // Set OCDB if needed
+  AliCDBManager* man = AliCDBManager::Instance();
+  if (!man->IsDefaultStorageSet()) {
+    printf("Setting a local default storage\n");
+    man->SetDefaultStorage("local://$ALICE_ROOT");
+  }
+  else {
+    printf("Using deafult storage \n");
+  }
   // retrives geometry 
   TString geof(gSystem->DirName(filename));
   geof += "/geometry.root";