56 : verboseLevel(0),fCurrentMesh(nullptr)
62 (*fColorMapDict)[fDefaultLinearColorMap->
GetName()] = fDefaultLinearColorMap;
64 (*fColorMapDict)[logColorMap->
GetName()] = logColorMap;
70 if (writer) {
delete writer; }
71 delete fDefaultLinearColorMap;
73 delete fQuantityMessenger;
79 { replicaLevel = lvl; }
81 {
return replicaLevel; }
89 G4cout <<
" is calling G4VScoringMesh::Accumulate() of " <<
sm->GetWorldName() <<
G4endl; }
97 auto msh = fMeshMap.find(colID);
98 if(msh==fMeshMap.end())
102 fMeshMap[colID] =
sm;
105 { sm = (*msh).second; }
112 for(
auto msh : fMeshVec)
113 {
if(msh->GetWorldName()==wName)
return msh; }
114 if(!sm && verboseLevel>9)
115 {
G4cout <<
"WARNING : G4ScoringManager::FindMesh() --- <" << wName <<
"> is not found. Null returned." <<
G4endl; }
122 for(
auto msh : fMeshVec) msh->List();
127 for(
auto msh : fMeshVec) msh->Dump();
140 G4cerr <<
"WARNING : Score color map <" << colorMapName <<
"> is not found. Default linear color map is used." <<
G4endl;
141 colorMap = fDefaultLinearColorMap;
143 mesh->
DrawMesh(psName,colorMap,axflg);
145 G4cerr <<
"ERROR : G4ScoringManager::DrawMesh() --- <"
146 << meshName <<
"> is not found. Nothing is done." <<
G4endl;
161 G4cerr <<
"WARNING : Score color map <" << colorMapName <<
"> is not found. Default linear color map is used." <<
G4endl;
162 colorMap = fDefaultLinearColorMap;
164 mesh->
DrawMesh(psName,idxPlane,iColumn,colorMap);
166 G4cerr <<
"ERROR : G4ScoringManager::DrawMesh() --- <"
167 << meshName <<
"> is not found. Nothing is done." <<
G4endl;
181 G4cerr <<
"ERROR : G4ScoringManager::DrawQuantityToFile() --- <"
182 << meshName <<
"> is not found. Nothing is done." <<
G4endl;
195 G4cerr <<
"ERROR : G4ScoringManager::DrawAllQuantitiesToFile() --- <"
196 << meshName <<
"> is not found. Nothing is done." <<
G4endl;
202 if(fColorMapDict->find(colorMap->
GetName()) != fColorMapDict->end())
204 G4cerr <<
"ERROR : G4ScoringManager::RegisterScoreColorMap -- "
205 << colorMap->
GetName() <<
" has already been registered. Method ignored." <<
G4endl;
209 (*fColorMapDict)[colorMap->
GetName()] = colorMap;
216 if(mItr == fColorMapDict->end()) {
return nullptr; }
217 return (mItr->second);
222 G4cout <<
"Registered Score Color Maps -------------------------------------------------------" <<
G4endl;
224 for(;mItr!=fColorMapDict->end();mItr++)
225 {
G4cout <<
" " << mItr->first; }
235 fMesh->
Merge(scMesh);
static void SetReplicaLevel(G4int)
void DrawMesh(const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
void RegisterScoreColorMap(G4VScoreColorMap *colorMap)
void Merge(const G4VScoringMesh *scMesh)
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
void ListScoreColorMaps()
void DumpAllQuantitiesToFile(const G4String &meshName, const G4String &fileName, const G4String &option="")
virtual void DumpAllQuantitiesToFile(const G4String &fileName, const G4String &option)
G4GLOB_DLL std::ostream G4cout
static G4ScoringManager * GetScoringManagerIfExist()
static G4int GetReplicaLevel()
std::map< G4String, G4VScoreColorMap * > ColorMapDict
void Accumulate(G4VHitsCollection *map)
G4VScoreColorMap * GetScoreColorMap(const G4String &mapName)
void Merge(const G4ScoringManager *scMan)
void DrawMesh(const G4String &meshName, const G4String &psName, const G4String &colorMapName, G4int axflg=111)
void SetScoringMesh(G4VScoringMesh *sm)
void DumpQuantityToFile(const G4String &meshName, const G4String &psName, const G4String &fileName, const G4String &option="")
static G4ScoringManager * GetScoringManager()
size_t GetNumberOfMesh() const
std::map< G4String, G4VScoreColorMap * >::iterator ColorMapDictItr
G4VScoringMesh * GetMesh(G4int i) const
G4GLOB_DLL std::ostream G4cerr
virtual void DumpQuantityToFile(const G4String &psName, const G4String &fileName, const G4String &option)