4 // Author: I. Hrivnacova
8 // See the class description in the header file.
10 #include "AliGlobals.h"
11 #include "TG4Globals.h"
15 // static data members
16 const G4double AliGlobals::fgkDefaultCut = 2.0*mm;
18 //_____________________________________________________________________________
19 AliGlobals::AliGlobals() {
23 //_____________________________________________________________________________
24 AliGlobals::~AliGlobals() {
30 //_____________________________________________________________________________
31 void AliGlobals::Exception(const char* s)
33 // Prints error message end exits the program.
37 { G4cerr << G4endl << " " << s << G4endl; }
38 G4cerr << "*** AliceException: Aborting execution ***" << G4endl;
42 //_____________________________________________________________________________
43 void AliGlobals::Warning(const char* s)
45 // Prints warning message.
48 G4cerr << "+++ Alice Warning: +++" << G4endl;
50 { G4cerr << " " << s << G4endl; }
51 G4cerr << "++++++++++++++++++++++" << G4endl;
55 //_____________________________________________________________________________
56 void AliGlobals::Exception(G4std::string s) {
58 AliGlobals::Exception(s.c_str());
61 //_____________________________________________________________________________
62 void AliGlobals::Exception(G4String s) {
64 AliGlobals::Exception(s.c_str());
67 //_____________________________________________________________________________
68 void AliGlobals::Warning(G4std::string s) {
70 AliGlobals::Warning(s.c_str());
73 //_____________________________________________________________________________
74 void AliGlobals::Warning(G4String s) {
76 AliGlobals::Warning(s.c_str());
80 //_____________________________________________________________________________
81 void AliGlobals::AppendNumberToString(G4String& s, G4int a)
83 // Appends number to string.
85 TG4Globals::AppendNumberToString(s, a);
88 //_____________________________________________________________________________
89 G4int AliGlobals::StringToInt(G4String s)
91 // Converts one char string to integer number.
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;