]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSGeometry.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.cxx
index 3607b05d04f7bd2754f15ad1462147c6e252f97e..a68745cb14e41c919f6d06bc8b103f9e2f079d53 100644 (file)
@@ -35,7 +35,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
 #include <stdlib.h>
 
 // --- AliRoot header files ---
@@ -71,9 +70,7 @@ void AliPHOSGeometry::Init(void)
   
   TString test(GetName()) ; 
   if (test != "IHEP" && test != "GPS2" && test != "MIXT") {
-    cerr << "ERROR: " << ClassName() << "::Init -> " << test.Data() 
-        << " is not a known geometry (choose among IHEP, GPS2 and MIXT)" << endl ; 
-    abort() ;
+    Fatal("Init", "%s is not a known geometry (choose among IHEP, GPS2 and MIXT)", test.Data() ) ; 
   }
 
   fgInit     = kTRUE ; 
@@ -139,10 +136,8 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t
     }
   }
   else {
-    if ( strcmp(fgGeom->GetName(), name) != 0 ) {
-      cout << "AliPHOSGeometry <E> : current geometry is " << fgGeom->GetName() << endl
-          << "                      you cannot call     " << name << endl ; 
-    }
+    if ( strcmp(fgGeom->GetName(), name) != 0 ) 
+      ::Error("GetInstance", "Current geometry is %s. You cannot call %s", fgGeom->GetName(), name) ; 
     else
       rv = (AliPHOSGeometry *) fgGeom ; 
   } 
@@ -158,8 +153,7 @@ void AliPHOSGeometry::SetPHOSAngles()
   Float_t pphi =  2 * TMath::ATan( GetOuterBoxSize(0)  / ( 2.0 * GetIPtoUpperCPVsurface() ) ) ;
   pphi *= kRADDEG ;
   if (pphi > fAngle){ 
-    cout << "AliPHOSGeometry: PHOS modules overlap!\n";
-    cout <<  "pphi = " << pphi << " fAngle  " << fAngle << endl ;
+    Error("SetPHOSAngles", "PHOS modules overlap!\n pphi = %f fAngle = %f", pphi, fAngle);
 
   }
   pphi = fAngle;
@@ -217,7 +211,7 @@ void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    cout << "<I>  AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ; 
+    Warning("EmcModuleCoverage", "%s unknown option; result in radian", opt) ; 
     conv = 1. ;
       }
 
@@ -252,7 +246,7 @@ void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    cout << "<I>  AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ; 
+    Warning("EmcXtalCoverage", "%s unknown option; result in radian", opt) ;  
     conv = 1. ;
       }