]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - AliGeant4/AliGlobals.cxx
adapted to new design, has to be completed
[u/mrichter/AliRoot.git] / AliGeant4 / AliGlobals.cxx
index 545edf7509f55eaee982b9cf8441b634f54dc95a..f6ba0845e8939bbe87e88f3a8a0087ecce017cf4 100644 (file)
@@ -4,6 +4,7 @@
 // See the class description in the header file.
 
 #include "AliGlobals.h"
+#include "TG4Globals.h"
 
 #include <stdlib.h>
 
@@ -26,8 +27,8 @@ void AliGlobals::Exception(const char* s)
 // ---
 
   if (s)
-  {  cerr << endl << "    " << s << endl; }
-  cerr << "*** AliceException: Aborting execution ***" << endl;   
+  {  G4cerr << G4endl << "    " << s << G4endl; }
+  G4cerr << "*** AliceException: Aborting execution ***" << G4endl;   
   exit(1);
 }
 
@@ -36,10 +37,10 @@ void AliGlobals::Warning(const char* s)
 // Prints warning message.
 // ---
 
-  cerr << "+++ Alice Warning: +++" << endl;   
+  G4cerr << "+++ Alice Warning: +++" << G4endl;   
   if (s)
-  {  cerr  << "    " << s << endl; }
-  cerr << "++++++++++++++++++++++" << endl;   
+  {  G4cerr  << "    " << s << G4endl; }
+  G4cerr << "++++++++++++++++++++++" << G4endl;   
 }
 
 #ifdef G4USE_STL
@@ -68,19 +69,8 @@ void AliGlobals::AppendNumberToString(G4String& s, G4int a)
 {
 // Appends number to string.
 // ---
-
-  const char* kpNumber="0123456789";
-  G4String p=""; G4String q="";
-  do 
-  {
-    G4int b=a/10;
-    G4int c=a%10;
-    p=kpNumber[c];
-    q=p.append(q);
-    a=b;        
-  } while (a>0);
-  s.append(q);
-};
+  TG4Globals::AppendNumberToString(s, a);
+}
 
 G4int AliGlobals::StringToInt(G4String s)
 {