Geant4-11
Public Member Functions | Private Attributes
G4ParticleHPReactionWhiteBoard Class Reference

#include <G4ParticleHPReactionWhiteBoard.hh>

Public Member Functions

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

Private Attributes

std::map< G4String, G4StringmapStringPair
 
G4int targA
 
G4int targM
 
G4int targZ
 

Detailed Description

Definition at line 41 of file G4ParticleHPReactionWhiteBoard.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::G4ParticleHPReactionWhiteBoard ( )

◆ ~G4ParticleHPReactionWhiteBoard()

G4ParticleHPReactionWhiteBoard::~G4ParticleHPReactionWhiteBoard ( )

Definition at line 40 of file G4ParticleHPReactionWhiteBoard.cc.

41{
42 mapStringPair.clear();
43}
std::map< G4String, G4String > mapStringPair

References mapStringPair.

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

References G4cout, G4endl, and mapStringPair.

◆ 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}

References G4cout, G4endl, mapStringPair, targA, targM, and targZ.

◆ GetTargA()

G4int G4ParticleHPReactionWhiteBoard::GetTargA ( )
inline

◆ GetTargM()

G4int G4ParticleHPReactionWhiteBoard::GetTargM ( )
inline

Definition at line 55 of file G4ParticleHPReactionWhiteBoard.hh.

55{ return targM; };

References targM.

◆ GetTargZ()

G4int G4ParticleHPReactionWhiteBoard::GetTargZ ( )
inline

◆ 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}

References G4cout, G4endl, and mapStringPair.

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

References GetValue().

◆ 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

References GetValue().

◆ SetTargA()

void G4ParticleHPReactionWhiteBoard::SetTargA ( G4int  A)
inline

Definition at line 51 of file G4ParticleHPReactionWhiteBoard.hh.

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

References A, and targA.

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)

References M, and targM.

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]

References targZ, and Z.

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

Field Documentation

◆ mapStringPair

std::map< G4String,G4String > G4ParticleHPReactionWhiteBoard::mapStringPair
private

◆ targA

G4int G4ParticleHPReactionWhiteBoard::targA
private

Definition at line 65 of file G4ParticleHPReactionWhiteBoard.hh.

Referenced by Dump(), GetTargA(), and SetTargA().

◆ targM

G4int G4ParticleHPReactionWhiteBoard::targM
private

Definition at line 66 of file G4ParticleHPReactionWhiteBoard.hh.

Referenced by Dump(), GetTargM(), and SetTargM().

◆ targZ

G4int G4ParticleHPReactionWhiteBoard::targZ
private

Definition at line 64 of file G4ParticleHPReactionWhiteBoard.hh.

Referenced by Dump(), GetTargZ(), and SetTargZ().


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