Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DNADamage Class Reference

#include <G4DNADamage.hh>

Collaboration diagram for G4DNADamage:

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 SetOnlyCountDamage (bool flag=true)
 
virtual bool OnlyCountDamage () const
 

Static Public Member Functions

static G4DNADamageInstance ()
 
static void DeleteInstance ()
 

Protected Member Functions

 G4DNADamage ()
 
virtual ~G4DNADamage ()
 

Protected Attributes

G4bool fJustCountDamage
 
G4int fNIndirectDamage
 
std::vector< G4DNAIndirectHit * > fIndirectHits
 
std::map< G4Molecule, const
G4Molecule * > 
fMolMap
 

Static Protected Attributes

static G4ThreadLocal G4DNADamagefpInstance
 

Detailed Description

Definition at line 80 of file G4DNADamage.hh.

Constructor & Destructor Documentation

G4DNADamage::G4DNADamage ( )
protected

Definition at line 64 of file G4DNADamage.cc.

65 {
66  fJustCountDamage = false;
67  fNIndirectDamage = 0;
68  fpInstance = this;
69 }
static G4ThreadLocal G4DNADamage * fpInstance
Definition: G4DNADamage.hh:115
G4int fNIndirectDamage
Definition: G4DNADamage.hh:119
G4bool fJustCountDamage
Definition: G4DNADamage.hh:118

Here is the caller graph for this function:

G4DNADamage::~G4DNADamage ( )
protectedvirtual

Definition at line 71 of file G4DNADamage.cc.

72 {
73  for (int i = 0; i < (int) fIndirectHits.size(); i++)
74  {
75  if (fIndirectHits[i]) delete fIndirectHits[i];
76  }
77  fIndirectHits.clear();
78 }
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:120
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)

Here is the call graph for this function:

Member Function Documentation

void G4DNADamage::AddIndirectDamage ( const G4String baseName,
const G4Molecule molecule,
const G4ThreeVector position,
double  time 
)
virtual

Definition at line 96 of file G4DNADamage.cc.

100 {
101  if (fJustCountDamage)
102  {
104  return;
105  }
106 
107  G4DNAIndirectHit* indirectHit = 0;
108  std::map<G4Molecule, const G4Molecule*>::iterator it =
109  fMolMap.find(*molecule);
110 
111  if (it == fMolMap.end())
112  {
113  G4Molecule* mol(0);
114  fMolMap[*molecule] = (mol = new G4Molecule(*molecule));
115  indirectHit = new G4DNAIndirectHit(baseName, mol, position, time);
116  }
117  else
118  {
119  indirectHit = new G4DNAIndirectHit(baseName, it->second, position, time);
120  }
121  fIndirectHits.push_back(indirectHit);
122 }
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:120
std::map< G4Molecule, const G4Molecule * > fMolMap
Definition: G4DNADamage.hh:121
G4int fNIndirectDamage
Definition: G4DNADamage.hh:119
G4bool fJustCountDamage
Definition: G4DNADamage.hh:118

Here is the caller graph for this function:

void G4DNADamage::DeleteInstance ( )
static

Definition at line 80 of file G4DNADamage.cc.

81 {
82  if (fpInstance) delete fpInstance;
83  fpInstance = 0;
84 }
static G4ThreadLocal G4DNADamage * fpInstance
Definition: G4DNADamage.hh:115
const std::vector< G4DNAIndirectHit * > * G4DNADamage::GetIndirectHits ( )
inline

Definition at line 124 of file G4DNADamage.hh.

125 {
126  return &fIndirectHits;
127 }
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:120
virtual int G4DNADamage::GetNIndirectHits ( ) const
inlinevirtual

Definition at line 95 of file G4DNADamage.hh.

96  {
98  return fNIndirectDamage;
99 
100  return fIndirectHits.size();
101  }
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:120
G4int fNIndirectDamage
Definition: G4DNADamage.hh:119
G4bool fJustCountDamage
Definition: G4DNADamage.hh:118
G4DNADamage * G4DNADamage::Instance ( void  )
static

Definition at line 57 of file G4DNADamage.cc.

58 {
59  if (!fpInstance) new G4DNADamage();
60 
61  return fpInstance;
62 }
static G4ThreadLocal G4DNADamage * fpInstance
Definition: G4DNADamage.hh:115

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool G4DNADamage::OnlyCountDamage ( ) const
inlinevirtual

Definition at line 108 of file G4DNADamage.hh.

109  {
110  return fJustCountDamage;
111  }
G4bool fJustCountDamage
Definition: G4DNADamage.hh:118
void G4DNADamage::Reset ( )
virtual

Definition at line 86 of file G4DNADamage.cc.

87 {
88  fNIndirectDamage = 0;
89  for (int i = 0; i < (int) fIndirectHits.size(); i++)
90  {
91  if (fIndirectHits[i]) delete fIndirectHits[i];
92  }
93  fIndirectHits.clear();
94 }
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:120
G4int fNIndirectDamage
Definition: G4DNADamage.hh:119
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)

Here is the call graph for this function:

virtual void G4DNADamage::SetOnlyCountDamage ( bool  flag = true)
inlinevirtual

Definition at line 103 of file G4DNADamage.hh.

104  {
105  fJustCountDamage = flag;
106  }
G4bool fJustCountDamage
Definition: G4DNADamage.hh:118

Member Data Documentation

std::vector<G4DNAIndirectHit*> G4DNADamage::fIndirectHits
protected

Definition at line 120 of file G4DNADamage.hh.

G4bool G4DNADamage::fJustCountDamage
protected

Definition at line 118 of file G4DNADamage.hh.

std::map<G4Molecule, const G4Molecule*> G4DNADamage::fMolMap
protected

Definition at line 121 of file G4DNADamage.hh.

G4int G4DNADamage::fNIndirectDamage
protected

Definition at line 119 of file G4DNADamage.hh.

G4ThreadLocal G4DNADamage * G4DNADamage::fpInstance
staticprotected

Definition at line 115 of file G4DNADamage.hh.


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