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 (  ) 

Definition at line 32 of file G4NeutronHPReasctionWhiteBoard.cc.

00033 :targZ(0)
00034 ,targA(0)
00035 ,targM(0)
00036 {
00037 ;
00038 }

G4NeutronHPReactionWhiteBoard::~G4NeutronHPReactionWhiteBoard (  ) 

Definition at line 39 of file G4NeutronHPReasctionWhiteBoard.cc.

00040 {
00041    mapStringPair.clear();
00042 }


Member Function Documentation

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

Definition at line 60 of file G4NeutronHPReasctionWhiteBoard.cc.

References G4cout, and G4endl.

00061 {
00062    if ( mapStringPair.find( new_record.first ) !=  mapStringPair.end() ) {
00063       G4cout << "This key is already used in the current reaction white board!" << G4endl;
00064       return false;
00065    }
00066    mapStringPair.insert ( new_record );
00067    return true;
00068 }

void G4NeutronHPReactionWhiteBoard::Dump (  ) 

Definition at line 44 of file G4NeutronHPReasctionWhiteBoard.cc.

References G4cout, and G4endl.

00045 {
00046    G4cout << "G4NeutronHPReactionWhiteBoard::Dump" << G4endl;
00047    G4cout << "Target Z = " << targZ << G4endl;
00048    G4cout << "Target A = " << targA << G4endl;
00049    G4cout << "Target M = " << targM << G4endl;
00050 
00051    for ( std::map< G4String,G4String >::iterator 
00052          it = mapStringPair.begin(); it != mapStringPair.end(); it++ )
00053    {
00054       G4cout << it->first << " " << it->second << G4endl; 
00055    }
00056    //,,,
00057    G4cout << G4endl;
00058 }

G4int G4NeutronHPReactionWhiteBoard::GetTargA (  )  [inline]

Definition at line 51 of file G4NeutronHPReactionWhiteBoard.hh.

00051 { return targA; };

G4int G4NeutronHPReactionWhiteBoard::GetTargM (  )  [inline]

Definition at line 52 of file G4NeutronHPReactionWhiteBoard.hh.

00052 { return targM; };

G4int G4NeutronHPReactionWhiteBoard::GetTargZ (  )  [inline]

Definition at line 50 of file G4NeutronHPReactionWhiteBoard.hh.

00050 { return targZ; };

G4String G4NeutronHPReactionWhiteBoard::GetValue ( G4String   ) 

Definition at line 70 of file G4NeutronHPReasctionWhiteBoard.cc.

References G4cout, and G4endl.

Referenced by GetValueInDouble(), and GetValueInInt().

00071 {
00072    std::map< G4String,G4String >::iterator it = mapStringPair.find( key );
00073    if ( it == mapStringPair.end() ) {
00074       G4cout << "No entry for this key " << key << " in the current reaction white board!" << G4endl;
00075       return "NONE";
00076    }
00077    return it->second;
00078 }

G4double G4NeutronHPReactionWhiteBoard::GetValueInDouble ( G4String   ) 

Definition at line 91 of file G4NeutronHPReasctionWhiteBoard.cc.

References GetValue().

00092 {
00093    G4String result = GetValue( key );  
00094    if ( result == "NONE" ) return 0.0;
00095    std::stringstream ss;
00096    ss << key;
00097    G4double x;
00098    ss >> x;
00099    return x;
00100 }

G4int G4NeutronHPReactionWhiteBoard::GetValueInInt ( G4String   ) 

Definition at line 80 of file G4NeutronHPReasctionWhiteBoard.cc.

References GetValue().

00081 {
00082    G4String result = GetValue( key );  
00083    if ( result == "NONE" ) return 0;
00084    std::stringstream ss;
00085    ss << key;
00086    G4int i;
00087    ss >> i;
00088    return i;
00089 }

void G4NeutronHPReactionWhiteBoard::SetTargA ( G4int  A  )  [inline]

Definition at line 48 of file G4NeutronHPReactionWhiteBoard.hh.

Referenced by G4NeutronHPChannelList::ApplyYourself(), and G4NeutronHPChannel::ApplyYourself().

00048 { targA=A; };

void G4NeutronHPReactionWhiteBoard::SetTargM ( G4int  M  )  [inline]

Definition at line 49 of file G4NeutronHPReactionWhiteBoard.hh.

00049 { targM=M; };

void G4NeutronHPReactionWhiteBoard::SetTargZ ( G4int  Z  )  [inline]

Definition at line 47 of file G4NeutronHPReactionWhiteBoard.hh.

Referenced by G4NeutronHPChannelList::ApplyYourself(), and G4NeutronHPChannel::ApplyYourself().

00047 { targZ=Z; };


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:42 2013 for Geant4 by  doxygen 1.4.7