]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliGlobals.cxx
removed fVerboseCmd
[u/mrichter/AliRoot.git] / AliGeant4 / AliGlobals.cxx
1 // $Id$
2 // Category: global
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliGlobals
7 // ----------------
8 // See the class description in the header file.
9
10 #include "AliGlobals.h"
11 #include "TG4Globals.h"
12
13 #include <stdlib.h>
14
15 // static data members
16 const G4double AliGlobals::fgkDefaultCut = 2.0*mm;
17
18 //_____________________________________________________________________________
19 AliGlobals::AliGlobals() {
20 //
21 }
22   
23 //_____________________________________________________________________________
24 AliGlobals::~AliGlobals() {
25 //
26 }
27   
28 // static methods
29
30 //_____________________________________________________________________________
31 void AliGlobals::Exception(const char* s)
32 {
33 // Prints error message end exits the program.
34 // ---
35
36   if (s)
37   {  G4cerr << G4endl << "    " << s << G4endl; }
38   G4cerr << "*** AliceException: Aborting execution ***" << G4endl;   
39   exit(1);
40 }
41
42 //_____________________________________________________________________________
43 void AliGlobals::Warning(const char* s)
44 {
45 // Prints warning message.
46 // ---
47
48   G4cerr << "+++ Alice Warning: +++" << G4endl;   
49   if (s)
50   {  G4cerr  << "    " << s << G4endl; }
51   G4cerr << "++++++++++++++++++++++" << G4endl;   
52 }
53
54 #ifdef G4USE_STL
55 //_____________________________________________________________________________
56 void AliGlobals::Exception(G4std::string s) {
57 //
58   AliGlobals::Exception(s.c_str());
59 }
60
61 //_____________________________________________________________________________
62 void AliGlobals::Exception(G4String s) {
63 //
64    AliGlobals::Exception(s.c_str());
65 }
66
67 //_____________________________________________________________________________
68 void AliGlobals::Warning(G4std::string s) {
69 //
70   AliGlobals::Warning(s.c_str());
71 }
72
73 //_____________________________________________________________________________
74 void AliGlobals::Warning(G4String s) {
75 //
76   AliGlobals::Warning(s.c_str());
77 }
78 #endif
79
80 //_____________________________________________________________________________
81 void AliGlobals::AppendNumberToString(G4String& s, G4int a)
82 {
83 // Appends number to string.
84 // ---
85   TG4Globals::AppendNumberToString(s, a);
86 }
87
88 //_____________________________________________________________________________
89 G4int AliGlobals::StringToInt(G4String s)
90 {
91 // Converts one char string to integer number.
92 // ---
93
94   // make better
95   if (s=="0") return 0;
96   if (s=="1") return 1;
97   if (s=="2") return 2;
98   if (s=="3") return 3;
99   if (s=="4") return 4;
100   if (s=="5") return 5;
101   if (s=="6") return 6;
102   if (s=="7") return 7;
103   if (s=="8") return 8;
104   if (s=="9") return 9;
105   return -1;
106 }
107