#include <G4CellScorerStore.hh>
Inheritance diagram for G4CellScorerStore:
Public Member Functions | |
G4CellScorerStore () | |
virtual | ~G4CellScorerStore () |
virtual G4VCellScorer * | GetCellScore (const G4GeometryCell &gCell) |
void | SetAutoScorerCreate () |
G4CellScorer * | AddCellScorer (const G4GeometryCell &gCell) |
G4CellScorer * | AddCellScorer (G4VPhysicalVolume &vol, G4int repnum=0) |
const G4MapGeometryCellCellScorer & | GetMapGeometryCellCellScorer () const |
void | DeleteAllScorers () |
Definition at line 59 of file G4CellScorerStore.hh.
G4CellScorerStore::G4CellScorerStore | ( | ) |
Definition at line 40 of file G4CellScorerStore.cc.
References G4cout, and G4endl.
00040 : 00041 fAutoCreate(false) 00042 { 00043 G4cout << "--------------------------------------------------------" << G4endl 00044 << "WARNING: Class <G4CellScorerStore> is now obsolete |" << G4endl 00045 << " and will be removed starting from next Geant4 |" << G4endl 00046 << " major release. Please, consider switching to |" << G4endl 00047 << " general purpose scoring functionality. |" << G4endl 00048 << "--------------------------------------------------------" 00049 << G4endl; 00050 }
G4CellScorerStore::~G4CellScorerStore | ( | ) | [virtual] |
G4CellScorer * G4CellScorerStore::AddCellScorer | ( | G4VPhysicalVolume & | vol, | |
G4int | repnum = 0 | |||
) |
Definition at line 60 of file G4CellScorerStore.cc.
References FatalException, and G4Exception().
00060 { 00061 G4CellScorer *cs = 0; 00062 cs = new G4CellScorer; 00063 if (!cs) { 00064 G4Exception("G4CellScorerStore::AddCellScorer","Event0801",FatalException, 00065 "failed to create G4CellScorer!"); 00066 } 00067 fMapGeometryCellCellScorer[G4GeometryCell(vol, repnum)] = cs; 00068 return cs; 00069 }
G4CellScorer * G4CellScorerStore::AddCellScorer | ( | const G4GeometryCell & | gCell | ) |
Definition at line 72 of file G4CellScorerStore.cc.
References FatalException, and G4Exception().
Referenced by GetCellScore().
00072 { 00073 G4CellScorer *cs = 0; 00074 cs = new G4CellScorer; 00075 if (!cs) { 00076 G4Exception("G4CellScorerStore::AddCellScorer","Event0801",FatalException, 00077 "failed to create G4CellScorer!"); 00078 } 00079 fMapGeometryCellCellScorer[gCell] = cs; 00080 return cs; 00081 }
void G4CellScorerStore::DeleteAllScorers | ( | ) |
Definition at line 102 of file G4CellScorerStore.cc.
00102 { 00103 for(G4MapGeometryCellCellScorer::iterator it = 00104 fMapGeometryCellCellScorer.begin(); 00105 it!=fMapGeometryCellCellScorer.end(); 00106 ++it){ 00107 delete it->second; 00108 } 00109 fMapGeometryCellCellScorer.clear(); 00110 }
G4VCellScorer * G4CellScorerStore::GetCellScore | ( | const G4GeometryCell & | gCell | ) | [virtual] |
Implements G4VCellScorerStore.
Definition at line 88 of file G4CellScorerStore.cc.
References AddCellScorer().
00088 { 00089 G4VCellScorer *cs=0; 00090 G4MapGeometryCellCellScorer::iterator it = fMapGeometryCellCellScorer.find(gCell); 00091 if (it != fMapGeometryCellCellScorer.end()) { 00092 cs = (*it).second; 00093 } 00094 else { 00095 if (fAutoCreate) { 00096 cs = AddCellScorer(gCell); 00097 } 00098 } 00099 return cs; 00100 }
const G4MapGeometryCellCellScorer & G4CellScorerStore::GetMapGeometryCellCellScorer | ( | ) | const |
void G4CellScorerStore::SetAutoScorerCreate | ( | ) |