Geant4 11.1.1
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 41 of file G4ParticleHPReactionWhiteBoard.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::G4ParticleHPReactionWhiteBoard ( )

Definition at line 33 of file G4ParticleHPReactionWhiteBoard.cc.

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

◆ ~G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::~G4ParticleHPReactionWhiteBoard ( )

Definition at line 40 of file G4ParticleHPReactionWhiteBoard.cc.

41{
42 mapStringPair.clear();
43}

Member Function Documentation

◆ AddRecord()

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

Definition at line 61 of file G4ParticleHPReactionWhiteBoard.cc.

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

◆ Dump()

void G4ParticleHPReactionWhiteBoard::Dump ( )

Definition at line 45 of file G4ParticleHPReactionWhiteBoard.cc.

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

◆ GetTargA()

◆ GetTargM()

G4int G4ParticleHPReactionWhiteBoard::GetTargM ( )
inline

Definition at line 55 of file G4ParticleHPReactionWhiteBoard.hh.

55{ return targM; };

◆ GetTargZ()

◆ GetValue()

G4String G4ParticleHPReactionWhiteBoard::GetValue ( G4String  key)

Definition at line 71 of file G4ParticleHPReactionWhiteBoard.cc.

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

Referenced by GetValueInDouble(), and GetValueInInt().

◆ GetValueInDouble()

G4double G4ParticleHPReactionWhiteBoard::GetValueInDouble ( G4String  key)

Definition at line 92 of file G4ParticleHPReactionWhiteBoard.cc.

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

◆ GetValueInInt()

G4int G4ParticleHPReactionWhiteBoard::GetValueInInt ( G4String  key)

Definition at line 81 of file G4ParticleHPReactionWhiteBoard.cc.

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

◆ SetTargA()

void G4ParticleHPReactionWhiteBoard::SetTargA ( G4int  A)
inline

Definition at line 51 of file G4ParticleHPReactionWhiteBoard.hh.

51{ targA=A; };
const G4double A[17]

Referenced by G4ParticleHPChannelList::ApplyYourself(), and G4ParticleHPChannel::ApplyYourself().

◆ SetTargM()

void G4ParticleHPReactionWhiteBoard::SetTargM ( G4int  M)
inline

Definition at line 52 of file G4ParticleHPReactionWhiteBoard.hh.

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

Referenced by G4ParticleHPChannel::ApplyYourself().

◆ SetTargZ()

void G4ParticleHPReactionWhiteBoard::SetTargZ ( G4int  Z)
inline

Definition at line 50 of file G4ParticleHPReactionWhiteBoard.hh.

50{ targZ=Z; };
const G4int Z[17]

Referenced by G4ParticleHPChannelList::ApplyYourself(), and G4ParticleHPChannel::ApplyYourself().


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