Geant4  10.02.p03
G4AnalysisVerbose Class Reference

#include <G4AnalysisVerbose.hh>

Collaboration diagram for G4AnalysisVerbose:

Public Member Functions

 G4AnalysisVerbose (const G4String &type, G4int verboseLevel)
 
 ~G4AnalysisVerbose ()
 
void Message (const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
 
void Message (const G4String &action, const G4String &object, G4ExceptionDescription &description, G4bool success=true) const
 

Private Attributes

G4String fType
 
G4String fToBeDoneText
 
G4String fDoneText
 
G4String fFailureText
 

Detailed Description

Definition at line 37 of file G4AnalysisVerbose.hh.

Constructor & Destructor Documentation

◆ G4AnalysisVerbose()

G4AnalysisVerbose::G4AnalysisVerbose ( const G4String type,
G4int  verboseLevel 
)

Definition at line 36 of file G4AnalysisVerbose.cc.

37  : fType(type),
38  fToBeDoneText(),
39  fDoneText(),
40  fFailureText()
41 {
42  if ( verboseLevel == 1 ) fDoneText = "- done";
43  if ( verboseLevel == 2 ) fDoneText = "- done";
44  if ( verboseLevel == 3 ) fToBeDoneText = "done ";
45  if ( verboseLevel == 4 ) fToBeDoneText = "going to ";
46  fFailureText = "has failed";
47 }

◆ ~G4AnalysisVerbose()

G4AnalysisVerbose::~G4AnalysisVerbose ( )

Definition at line 50 of file G4AnalysisVerbose.cc.

51 {
52 }

Member Function Documentation

◆ Message() [1/2]

void G4AnalysisVerbose::Message ( const G4String action,
const G4String object,
const G4String objectName,
G4bool  success = true 
) const

Definition at line 59 of file G4AnalysisVerbose.cc.

63 {
64  G4cout << "... "
65  << fToBeDoneText
66  << action
67  << " "
68  << fType
69  << " "
70  << object
71  << " : "
72  << objectName
73  << " ";
74 
75  if ( success )
76  G4cout << fDoneText;
77  else
79 
80  G4cout << G4endl;
81 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

◆ Message() [2/2]

void G4AnalysisVerbose::Message ( const G4String action,
const G4String object,
G4ExceptionDescription description,
G4bool  success = true 
) const

Definition at line 84 of file G4AnalysisVerbose.cc.

88 {
89  G4cout << "... "
90  << fToBeDoneText
91  << action
92  << " "
93  << fType
94  << " "
95  << object
96  << " : "
97  << description.str()
98  << " ";
99 
100  if ( success )
101  G4cout << fDoneText;
102  else
103  G4cout << fFailureText;
104 
105  G4cout << G4endl;
106 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Data Documentation

◆ fDoneText

G4String G4AnalysisVerbose::fDoneText
private

Definition at line 58 of file G4AnalysisVerbose.hh.

◆ fFailureText

G4String G4AnalysisVerbose::fFailureText
private

Definition at line 59 of file G4AnalysisVerbose.hh.

◆ fToBeDoneText

G4String G4AnalysisVerbose::fToBeDoneText
private

Definition at line 57 of file G4AnalysisVerbose.hh.

◆ fType

G4String G4AnalysisVerbose::fType
private

Definition at line 56 of file G4AnalysisVerbose.hh.


The documentation for this class was generated from the following files: