]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mchview.cxx
Reading PMT gains from an external file
[u/mrichter/AliRoot.git] / MUON / mchview.cxx
index 0ae4d893ee5fb3b5f9b80465f58b37f8be9f3728..918cc1c0e9c58c4ff506596a059412d80c9f4c92 100644 (file)
@@ -71,8 +71,8 @@ int main(int argc, char** argv)
   
   TObjArray filesToOpen;
   Bool_t isGeometryFixed(kFALSE);
-  Int_t gix, giy;
-  Int_t gox,goy;
+  Int_t gix(0),giy(0);
+  Int_t gox(0),goy(0);
   Bool_t ASCIImapping(kFALSE);
   TString defaultOCDB("local://$ALICE_ROOT/OCDB");
   
@@ -95,7 +95,7 @@ int main(int argc, char** argv)
     {
       isGeometryFixed = kTRUE;
       TString g(static_cast<TObjString*>(args.At(i+1))->String());
-      sscanf(g.Data(),"%dx%d+%d+%d",&gix,&giy,&gox,&goy);
+      sscanf(g.Data(),"%10dx%10d+%10d+%10d",&gix,&giy,&gox,&goy);
       nok += 2;
       ++i;
     }
@@ -128,8 +128,6 @@ int main(int argc, char** argv)
     return Usage();
   }
   
-  AliWarningGeneral("main","FIXME ? Remove default storage and run number from here...");
-  
   AliCDBManager::Instance()->SetDefaultStorage(defaultOCDB.Data());
   AliCDBManager::Instance()->SetRun(0);
  
@@ -164,23 +162,17 @@ int main(int argc, char** argv)
   gStyle->SetPalette(n+2,colors);
   delete[] colors;
 
-  UInt_t w(0);
-  UInt_t h(0);
-  UInt_t ox(0);
-  UInt_t oy(0);
+  AliMUONMchViewApplication* theApp(0x0);
 
   if ( isGeometryFixed )
   {
-    w = gix;
-    h = giy;
-    ox = gox;
-    oy = goy;
+    theApp = new AliMUONMchViewApplication("mchview", &argc, argv,gix,giy,gox,goy);
+  }
+  else
+  {
+    theApp = new AliMUONMchViewApplication("mchview",&argc,argv);
   }
-  
-  AliMUONMchViewApplication* theApp = new AliMUONMchViewApplication("mchview", &argc, argv, w,h,gox,goy);
    
-  AliCodeTimer::Instance()->Print();
-
   TIter next(&filesToOpen);
   TObjString* s;
   while ( ( s = static_cast<TObjString*>(next()) ) )