44 if(fSManager ==
nullptr)
58 , fCurrentMesh(nullptr)
64 (*fColorMapDict)[fDefaultLinearColorMap->
GetName()] = fDefaultLinearColorMap;
66 (*fColorMapDict)[logColorMap->
GetName()] = logColorMap;
73 delete fDefaultLinearColorMap;
75 delete fQuantityMessenger;
90 G4cout <<
"G4ScoringManager::Accumulate() for " << map->GetSDname() <<
" / "
91 << map->GetName() <<
G4endl;
92 G4cout <<
" is calling G4VScoringMesh::Accumulate() of "
93 << sm->GetWorldName() <<
G4endl;
100 auto colID = map->GetColID();
102 auto msh = fMeshMap.find(colID);
103 if(msh == fMeshMap.end())
105 auto wName = map->GetSDname();
107 fMeshMap[colID] = sm;
119 for(
auto msh : fMeshVec)
121 if(msh->GetWorldName() == wName)
124 if((sm ==
nullptr) && verboseLevel > 9)
126 G4cout <<
"WARNING : G4ScoringManager::FindMesh() --- <" << wName
127 <<
"> is not found. Null returned." <<
G4endl;
136 for(
auto msh : fMeshVec)
142 for(
auto msh : fMeshVec)
154 if(colorMap ==
nullptr)
156 G4cerr <<
"WARNING : Score color map <" << colorMapName
157 <<
"> is not found. Default linear color map is used." <<
G4endl;
158 colorMap = fDefaultLinearColorMap;
160 mesh->
DrawMesh(psName, colorMap, axflg);
164 G4cerr <<
"ERROR : G4ScoringManager::DrawMesh() --- <" << meshName
165 <<
"> is not found. Nothing is done." <<
G4endl;
177 if(colorMap ==
nullptr)
179 G4cerr <<
"WARNING : Score color map <" << colorMapName
180 <<
"> is not found. Default linear color map is used." <<
G4endl;
181 colorMap = fDefaultLinearColorMap;
183 mesh->
DrawMesh(psName, idxPlane, iColumn, colorMap);
187 G4cerr <<
"ERROR : G4ScoringManager::DrawMesh() --- <" << meshName
188 <<
"> is not found. Nothing is done." <<
G4endl;
205 G4cerr <<
"ERROR : G4ScoringManager::DrawQuantityToFile() --- <" << meshName
206 <<
"> is not found. Nothing is done." <<
G4endl;
222 G4cerr <<
"ERROR : G4ScoringManager::DrawAllQuantitiesToFile() --- <"
223 << meshName <<
"> is not found. Nothing is done." <<
G4endl;
229 if(fColorMapDict->find(colorMap->
GetName()) != fColorMapDict->cend())
231 G4cerr <<
"ERROR : G4ScoringManager::RegisterScoreColorMap -- "
233 <<
" has already been registered. Method ignored." <<
G4endl;
237 (*fColorMapDict)[colorMap->
GetName()] = colorMap;
243 auto mItr = fColorMapDict->find(mapName);
244 if(mItr == fColorMapDict->cend())
248 return (mItr->second);
253 G4cout <<
"Registered Score Color Maps "
254 "-------------------------------------------------------"
256 auto mItr = fColorMapDict->cbegin();
257 for(; mItr != fColorMapDict->cend(); ++mItr)
259 G4cout <<
" " << mItr->first;
270 fMesh->
Merge(scMesh);
std::map< G4String, G4VScoreColorMap * > ColorMapDict
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
static G4int GetReplicaLevel()
G4VScoringMesh * GetMesh(G4int i) const
void Accumulate(G4VHitsCollection *map)
static void SetReplicaLevel(G4int)
size_t GetNumberOfMesh() const
G4VScoreColorMap * GetScoreColorMap(const G4String &mapName)
void DumpAllQuantitiesToFile(const G4String &meshName, const G4String &fileName, const G4String &option="")
static G4ScoringManager * GetScoringManager()
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
void RegisterScoreColorMap(G4VScoreColorMap *colorMap)
void DrawMesh(const G4String &meshName, const G4String &psName, const G4String &colorMapName, G4int axflg=111)
void ListScoreColorMaps()
void Merge(const G4ScoringManager *scMan)
static G4ScoringManager * GetScoringManagerIfExist()
void DumpQuantityToFile(const G4String &meshName, const G4String &psName, const G4String &fileName, const G4String &option="")
virtual void DumpQuantityToFile(const G4String &psName, const G4String &fileName, const G4String &option)
virtual void DumpAllQuantitiesToFile(const G4String &fileName, const G4String &option)
void SetScoringMesh(G4VScoringMesh *sm)
void DrawMesh(const G4String &psName, G4VScoreColorMap *colorMap, G4int axflg=111)
void Merge(const G4VScoringMesh *scMesh)