]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: global | |
3 | // | |
4 | // Class for generally used basic functions. | |
5 | // It is protected from instantiating (only static data members | |
6 | // and static methods are defined). | |
7 | ||
8 | ||
9 | #ifndef ALI_GLOBALS_H | |
10 | #define ALI_GLOBALS_H | |
11 | ||
12 | #include <globals.hh> | |
13 | ||
14 | #ifdef G4USE_STL | |
15 | #include <string> | |
16 | #endif | |
17 | ||
18 | class AliGlobals | |
19 | { | |
20 | public: | |
21 | // --> protected | |
22 | // AliGlobals(); | |
23 | virtual ~AliGlobals(); | |
24 | ||
25 | // static methods | |
26 | static void Exception(const char* s=0); | |
27 | // Global error function prints string to cerr, and aborts | |
28 | // program - according to G4Exception.cc | |
29 | static void Warning(const char* s=0); | |
30 | // Global warning function prints string to cerr | |
31 | #ifdef G4USE_STL | |
32 | static void Exception(G4std::string s); | |
33 | static void Exception(G4String s); | |
34 | static void Warning(G4std::string s); | |
35 | static void Warning(G4String s); | |
36 | #endif | |
37 | ||
38 | static void AppendNumberToString(G4String& string, G4int number); | |
39 | static G4int StringToInt(G4String string); | |
40 | ||
41 | // static get methods | |
42 | static G4double DefaultCut(); | |
43 | ||
44 | protected: | |
45 | AliGlobals(); | |
46 | // only static data members and methods | |
47 | ||
48 | private: | |
49 | // static data members | |
50 | static const G4double fgDefaultCut; //default cut value | |
51 | }; | |
52 | ||
53 | // inline methods | |
54 | ||
55 | inline G4double AliGlobals::DefaultCut() | |
56 | { return fgDefaultCut; } | |
57 | ||
58 | #endif //ALI_GLOBALS_H |