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

#include <G4ParticleHPReactionWhiteBoard.hh>

Public Member Functions

 G4ParticleHPReactionWhiteBoard ()
 
 ~G4ParticleHPReactionWhiteBoard ()
 
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 42 of file G4ParticleHPReactionWhiteBoard.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::G4ParticleHPReactionWhiteBoard ( )
default

◆ ~G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::~G4ParticleHPReactionWhiteBoard ( )

Definition at line 35 of file G4ParticleHPReactionWhiteBoard.cc.

36{
37 mapStringPair.clear();
38}

Member Function Documentation

◆ AddRecord()

bool G4ParticleHPReactionWhiteBoard::AddRecord ( std::pair< G4String, G4String > new_record)

Definition at line 54 of file G4ParticleHPReactionWhiteBoard.cc.

55{
56 if (mapStringPair.find(new_record.first) != mapStringPair.end()) {
57 G4cout << "This key is already used in the current reaction white board!" << G4endl;
58 return false;
59 }
60 mapStringPair.insert(new_record);
61 return true;
62}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ Dump()

void G4ParticleHPReactionWhiteBoard::Dump ( )

Definition at line 40 of file G4ParticleHPReactionWhiteBoard.cc.

41{
42 G4cout << "G4ParticleHPReactionWhiteBoard::Dump" << G4endl;
43 G4cout << "Target Z = " << targZ << G4endl;
44 G4cout << "Target A = " << targA << G4endl;
45 G4cout << "Target M = " << targM << G4endl;
46
47 for (const auto& it : mapStringPair) {
48 G4cout << it.first << " " << it.second << G4endl;
49 }
50 //,,,
51 G4cout << G4endl;
52}

◆ GetTargA()

◆ GetTargM()

G4int G4ParticleHPReactionWhiteBoard::GetTargM ( )
inline

Definition at line 56 of file G4ParticleHPReactionWhiteBoard.hh.

56{ return targM; };

◆ GetTargZ()

G4int G4ParticleHPReactionWhiteBoard::GetTargZ ( )
inline

Definition at line 54 of file G4ParticleHPReactionWhiteBoard.hh.

54{ return targZ; };

Referenced by G4ParticleHPInelastic::ApplyYourself().

◆ GetValue()

G4String G4ParticleHPReactionWhiteBoard::GetValue ( G4String key)

Definition at line 64 of file G4ParticleHPReactionWhiteBoard.cc.

65{
66 auto it = mapStringPair.find(key);
67 if (it == mapStringPair.end()) {
68 G4cout << "No entry for this key " << key << " in the current reaction white board!" << G4endl;
69 return "NONE";
70 }
71 return it->second;
72}

Referenced by GetValueInDouble(), and GetValueInInt().

◆ GetValueInDouble()

G4double G4ParticleHPReactionWhiteBoard::GetValueInDouble ( G4String key)

Definition at line 85 of file G4ParticleHPReactionWhiteBoard.cc.

86{
87 G4String result = GetValue(key);
88 if (result == "NONE") return 0.0;
89 std::stringstream ss;
90 ss << key;
91 G4double x;
92 ss >> x;
93 return x;
94}
double G4double
Definition G4Types.hh:83

◆ GetValueInInt()

G4int G4ParticleHPReactionWhiteBoard::GetValueInInt ( G4String key)

Definition at line 74 of file G4ParticleHPReactionWhiteBoard.cc.

75{
76 G4String result = GetValue(key);
77 if (result == "NONE") return 0;
78 std::stringstream ss;
79 ss << key;
80 G4int i;
81 ss >> i;
82 return i;
83}
int G4int
Definition G4Types.hh:85

◆ SetTargA()

void G4ParticleHPReactionWhiteBoard::SetTargA ( G4int A)
inline

◆ SetTargM()

void G4ParticleHPReactionWhiteBoard::SetTargM ( G4int M)
inline

Definition at line 53 of file G4ParticleHPReactionWhiteBoard.hh.

53{ targM = M; };
#define M(row, col)

Referenced by G4ParticleHPChannel::ApplyYourself().

◆ SetTargZ()

void G4ParticleHPReactionWhiteBoard::SetTargZ ( G4int Z)
inline

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