]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MakeMUONZeroMisAlignment.C
Improved FILE_PATTERNS, EXCLUDE;
[u/mrichter/AliRoot.git] / MUON / MakeMUONZeroMisAlignment.C
index 28e3a6633db2e895f5ded80427477cc152f99070..dbca7fbe85edea06137d9679a50df4d8395d4858 100644 (file)
 #include "AliGeomManager.h"
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
+#include "AliCDBEntry.h"
 #include "AliCDBId.h"
 
 #include <TSystem.h>
+#include <TError.h>
 #include <TClonesArray.h>
 #include <TString.h>
 #include <TFile.h>
@@ -44,9 +46,9 @@ void MakeMUONZeroMisAlignment()
   if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
   cdb->SetRun(0);
   
-  AliCDBStorage* storage;
+  AliCDBStorage* storage = 0;
   
-  if( gSystem->Getenv("TOCDB") == TString("kTRUE") ){
+  if( TString(gSystem->Getenv("TOCDB")) == TString("kTRUE") ){
     TString Storage = gSystem->Getenv("STORAGE");
     if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
       Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
@@ -75,7 +77,7 @@ void MakeMUONZeroMisAlignment()
     // Create a file to store the alignment data
     const char* filename = "MUONZeroMisalignment.root";
     TFile f(filename,"RECREATE");
-    if(!f){
+    if(!f.IsOpen()){
       Error(macroname,"cannot open file for output\n");
       return;
     }