4 // See the class description in the header file.
6 #include "AliGlobals.h"
10 // static data members
11 const G4double AliGlobals::fgDefaultCut = 2.0*mm;
13 AliGlobals::AliGlobals() {
17 AliGlobals::~AliGlobals() {
23 void AliGlobals::Exception(const char* s)
25 // Prints error message end exits the program.
29 { cerr << endl << " " << s << endl; }
30 cerr << "*** AliceException: Aborting execution ***" << endl;
34 void AliGlobals::Warning(const char* s)
36 // Prints warning message.
39 cerr << "+++ Alice Warning: +++" << endl;
41 { cerr << " " << s << endl; }
42 cerr << "++++++++++++++++++++++" << endl;
46 void AliGlobals::Exception(G4std::string s) {
48 AliGlobals::Exception(s.c_str());
51 void AliGlobals::Exception(G4String s) {
53 AliGlobals::Exception(s.c_str());
56 void AliGlobals::Warning(G4std::string s) {
58 AliGlobals::Warning(s.c_str());
61 void AliGlobals::Warning(G4String s) {
63 AliGlobals::Warning(s.c_str());
67 void AliGlobals::AppendNumberToString(G4String& s, G4int a)
69 // Appends number to string.
72 const char* kpNumber="0123456789";
73 G4String p=""; G4String q="";
85 G4int AliGlobals::StringToInt(G4String s)
87 // Converts one char string to integer number.
100 if (s=="9") return 9;