#include <G4DNADamages.hh>
Public Member Functions | |
virtual void | Reset () |
virtual void | AddIndirectDamage (const G4String &baseName, const G4Molecule *molecule, const G4ThreeVector &position, double time) |
const std::vector< G4DNAIndirectHit * > * | GetIndirectHits () |
virtual int | GetNIndirectHits () const |
virtual void | SetOnlyCountDamages (bool flag=true) |
virtual bool | OnlyCountDamages () const |
Static Public Member Functions | |
static G4DNADamages * | Instance () |
static void | DeleteInstance () |
Protected Member Functions | |
G4DNADamages () | |
virtual | ~G4DNADamages () |
Protected Attributes | |
G4bool | fJustCountDamage |
G4int | fNIndirectDamages |
std::vector< G4DNAIndirectHit * > | fIndirectHits |
std::map< G4Molecule, const G4Molecule * > | fMolMap |
Static Protected Attributes | |
static G4DNADamages * | fpInstance |
Definition at line 61 of file G4DNADamages.hh.
G4DNADamages::G4DNADamages | ( | ) | [protected] |
Definition at line 66 of file G4DNADamages.cc.
References fJustCountDamage, fNIndirectDamages, and fpInstance.
Referenced by Instance().
00067 { 00068 fJustCountDamage = false; 00069 fNIndirectDamages = 0; 00070 fpInstance = this; 00071 }
G4DNADamages::~G4DNADamages | ( | ) | [protected, virtual] |
Definition at line 73 of file G4DNADamages.cc.
References fIndirectHits.
00074 { 00075 for(int i = 0 ; i <(int) fIndirectHits.size() ; i++) 00076 { 00077 if(fIndirectHits[i]) 00078 delete fIndirectHits[i]; 00079 } 00080 fIndirectHits.clear(); 00081 }
void G4DNADamages::AddIndirectDamage | ( | const G4String & | baseName, | |
const G4Molecule * | molecule, | |||
const G4ThreeVector & | position, | |||
double | time | |||
) | [virtual] |
Definition at line 100 of file G4DNADamages.cc.
References fIndirectHits, fJustCountDamage, fMolMap, and fNIndirectDamages.
Referenced by G4DNASecondOrderReaction::PostStepDoIt().
00104 { 00105 if(fJustCountDamage) 00106 { 00107 fNIndirectDamages++; 00108 return; 00109 } 00110 00111 G4DNAIndirectHit* indirectHit = 0; 00112 std::map<G4Molecule, const G4Molecule*>::iterator it = fMolMap.find(*molecule); 00113 00114 if(it == fMolMap.end()) 00115 { 00116 G4Molecule* mol(0); 00117 fMolMap[*molecule] = (mol = new G4Molecule(*molecule)); 00118 indirectHit = new G4DNAIndirectHit(baseName, mol, position, time); 00119 } 00120 else 00121 { 00122 indirectHit = new G4DNAIndirectHit(baseName, it->second, position, time); 00123 } 00124 fIndirectHits.push_back(indirectHit); 00125 }
void G4DNADamages::DeleteInstance | ( | ) | [static] |
Definition at line 83 of file G4DNADamages.cc.
References fpInstance.
00084 { 00085 if(fpInstance) delete fpInstance; 00086 fpInstance = 0; 00087 }
const std::vector< G4DNAIndirectHit * > * G4DNADamages::GetIndirectHits | ( | ) | [inline] |
Definition at line 103 of file G4DNADamages.hh.
References fIndirectHits.
00104 { 00105 return &fIndirectHits; 00106 }
virtual int G4DNADamages::GetNIndirectHits | ( | ) | const [inline, virtual] |
Definition at line 74 of file G4DNADamages.hh.
References fIndirectHits, fJustCountDamage, and fNIndirectDamages.
00075 { 00076 if(fJustCountDamage) 00077 return fNIndirectDamages; 00078 00079 return fIndirectHits.size(); 00080 }
G4DNADamages * G4DNADamages::Instance | ( | ) | [static] |
Definition at line 59 of file G4DNADamages.cc.
References fpInstance, and G4DNADamages().
Referenced by G4DNASecondOrderReaction::PostStepDoIt().
00060 { 00061 if(!fpInstance) new G4DNADamages(); 00062 00063 return fpInstance; 00064 }
virtual bool G4DNADamages::OnlyCountDamages | ( | ) | const [inline, virtual] |
Definition at line 87 of file G4DNADamages.hh.
References fJustCountDamage.
00088 { 00089 return fJustCountDamage; 00090 }
void G4DNADamages::Reset | ( | ) | [virtual] |
Definition at line 89 of file G4DNADamages.cc.
References fIndirectHits, and fNIndirectDamages.
00090 { 00091 fNIndirectDamages = 0; 00092 for(int i = 0 ; i <(int) fIndirectHits.size() ; i++) 00093 { 00094 if(fIndirectHits[i]) 00095 delete fIndirectHits[i]; 00096 } 00097 fIndirectHits.clear(); 00098 }
virtual void G4DNADamages::SetOnlyCountDamages | ( | bool | flag = true |
) | [inline, virtual] |
Definition at line 82 of file G4DNADamages.hh.
References fJustCountDamage.
00083 { 00084 fJustCountDamage = flag; 00085 }
std::vector<G4DNAIndirectHit*> G4DNADamages::fIndirectHits [protected] |
Definition at line 99 of file G4DNADamages.hh.
Referenced by AddIndirectDamage(), GetIndirectHits(), GetNIndirectHits(), Reset(), and ~G4DNADamages().
G4bool G4DNADamages::fJustCountDamage [protected] |
Definition at line 97 of file G4DNADamages.hh.
Referenced by AddIndirectDamage(), G4DNADamages(), GetNIndirectHits(), OnlyCountDamages(), and SetOnlyCountDamages().
std::map<G4Molecule, const G4Molecule*> G4DNADamages::fMolMap [protected] |
G4int G4DNADamages::fNIndirectDamages [protected] |
Definition at line 98 of file G4DNADamages.hh.
Referenced by AddIndirectDamage(), G4DNADamages(), GetNIndirectHits(), and Reset().
G4DNADamages * G4DNADamages::fpInstance [static, protected] |
Definition at line 94 of file G4DNADamages.hh.
Referenced by DeleteInstance(), G4DNADamages(), and Instance().