4 // Author: I. Hrivnacova
8 // See the class description in the header file.
10 #include "TG4Globals.h"
14 //_____________________________________________________________________________
15 TG4Globals::TG4Globals() {
19 //_____________________________________________________________________________
20 TG4Globals::~TG4Globals() {
26 //_____________________________________________________________________________
27 void TG4Globals::Exception(const char* string)
29 // Prints error message end exits the program.
33 { G4cerr << G4endl << " " << string << G4endl; }
34 G4cerr << "*** TG4Exception: Aborting execution ***" << G4endl;
38 //_____________________________________________________________________________
39 void TG4Globals::Warning(const char* string)
41 // Prints warning message.
44 G4cerr << "++++ TG4Warning: ++++" << G4endl;
46 { G4cerr << " " << string << G4endl; }
47 G4cerr << "+++++++++++++++++++++++" << G4endl;
50 //_____________________________________________________________________________
51 void TG4Globals::AppendNumberToString(G4String& s, G4int a)
53 // Appends number to string.
56 const char* kpNumber="0123456789";
57 G4String p=""; G4String q="";
69 //_____________________________________________________________________________
70 G4bool TG4Globals::Compare(G4bool activation, TG4G3ControlValue controlValue)
72 // Compares the boolean value of the process activation
73 // with the process control value.
74 // Returns true if the values correspond, false otherwise.
77 if (controlValue == kUnset) {
79 "TG4SpecialControls::Compare: control value = kUnset.");
83 if (controlValue == kActivate || controlValue == kActivate2)
89 //_____________________________________________________________________________
90 void TG4Globals::PrintStars(G4bool emptyLineFirst)
96 if (emptyLineFirst) G4cout << G4endl;
98 G4cout << "**********************************************" << G4endl;
100 if (!emptyLineFirst) G4cout << G4endl;