Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronHPReactionWhiteBoard Class Reference

#include <G4NeutronHPReactionWhiteBoard.hh>

Public Member Functions

 G4NeutronHPReactionWhiteBoard ()
 
 ~G4NeutronHPReactionWhiteBoard ()
 
void Dump ()
 
void SetTargZ (G4int Z)
 
void SetTargA (G4int A)
 
void SetTargM (G4int M)
 
G4int GetTargZ ()
 
G4int GetTargA ()
 
G4int GetTargM ()
 
bool AddRecord (std::pair< G4String, G4String >)
 
G4String GetValue (G4String)
 
G4int GetValueInInt (G4String)
 
G4double GetValueInDouble (G4String)
 

Detailed Description

Definition at line 38 of file G4NeutronHPReactionWhiteBoard.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPReactionWhiteBoard()

G4NeutronHPReactionWhiteBoard::G4NeutronHPReactionWhiteBoard ( )

Definition at line 32 of file G4NeutronHPReasctionWhiteBoard.cc.

33:targZ(0)
34,targA(0)
35,targM(0)
36{
37;
38}

◆ ~G4NeutronHPReactionWhiteBoard()

G4NeutronHPReactionWhiteBoard::~G4NeutronHPReactionWhiteBoard ( )

Definition at line 39 of file G4NeutronHPReasctionWhiteBoard.cc.

40{
41 mapStringPair.clear();
42}

Member Function Documentation

◆ AddRecord()

bool G4NeutronHPReactionWhiteBoard::AddRecord ( std::pair< G4String, G4String new_record)

Definition at line 60 of file G4NeutronHPReasctionWhiteBoard.cc.

61{
62 if ( mapStringPair.find( new_record.first ) != mapStringPair.end() ) {
63 G4cout << "This key is already used in the current reaction white board!" << G4endl;
64 return false;
65 }
66 mapStringPair.insert ( new_record );
67 return true;
68}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ Dump()

void G4NeutronHPReactionWhiteBoard::Dump ( )

Definition at line 44 of file G4NeutronHPReasctionWhiteBoard.cc.

45{
46 G4cout << "G4NeutronHPReactionWhiteBoard::Dump" << G4endl;
47 G4cout << "Target Z = " << targZ << G4endl;
48 G4cout << "Target A = " << targA << G4endl;
49 G4cout << "Target M = " << targM << G4endl;
50
51 for ( std::map< G4String,G4String >::iterator
52 it = mapStringPair.begin(); it != mapStringPair.end(); it++ )
53 {
54 G4cout << it->first << " " << it->second << G4endl;
55 }
56 //,,,
57 G4cout << G4endl;
58}

◆ GetTargA()

G4int G4NeutronHPReactionWhiteBoard::GetTargA ( )
inline

◆ GetTargM()

G4int G4NeutronHPReactionWhiteBoard::GetTargM ( )
inline

Definition at line 52 of file G4NeutronHPReactionWhiteBoard.hh.

52{ return targM; };

◆ GetTargZ()

G4int G4NeutronHPReactionWhiteBoard::GetTargZ ( )
inline

◆ GetValue()

G4String G4NeutronHPReactionWhiteBoard::GetValue ( G4String  key)

Definition at line 70 of file G4NeutronHPReasctionWhiteBoard.cc.

71{
72 std::map< G4String,G4String >::iterator it = mapStringPair.find( key );
73 if ( it == mapStringPair.end() ) {
74 G4cout << "No entry for this key " << key << " in the current reaction white board!" << G4endl;
75 return "NONE";
76 }
77 return it->second;
78}

Referenced by GetValueInDouble(), and GetValueInInt().

◆ GetValueInDouble()

G4double G4NeutronHPReactionWhiteBoard::GetValueInDouble ( G4String  key)

Definition at line 91 of file G4NeutronHPReasctionWhiteBoard.cc.

92{
93 G4String result = GetValue( key );
94 if ( result == "NONE" ) return 0.0;
95 std::stringstream ss;
96 ss << key;
97 G4double x;
98 ss >> x;
99 return x;
100}
double G4double
Definition: G4Types.hh:64

◆ GetValueInInt()

G4int G4NeutronHPReactionWhiteBoard::GetValueInInt ( G4String  key)

Definition at line 80 of file G4NeutronHPReasctionWhiteBoard.cc.

81{
82 G4String result = GetValue( key );
83 if ( result == "NONE" ) return 0;
84 std::stringstream ss;
85 ss << key;
86 G4int i;
87 ss >> i;
88 return i;
89}
int G4int
Definition: G4Types.hh:66

◆ SetTargA()

void G4NeutronHPReactionWhiteBoard::SetTargA ( G4int  A)
inline

◆ SetTargM()

void G4NeutronHPReactionWhiteBoard::SetTargM ( G4int  M)
inline

Definition at line 49 of file G4NeutronHPReactionWhiteBoard.hh.

49{ targM=M; };

◆ SetTargZ()

void G4NeutronHPReactionWhiteBoard::SetTargZ ( G4int  Z)
inline

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