Changeset 1340 for trunk/source/digits_hits/utils/include/G4VScoringMesh.hh
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/utils/include/G4VScoringMesh.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoringMesh.hh,v 1. 30 2010/06/14 13:28:17 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoringMesh.hh,v 1.40 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 87 87 virtual void Draw(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, G4int axflg=111) = 0; 88 88 // draw a column of a quantity on a current viewer 89 virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 90 89 virtual void DrawColumn(std::map<G4int, G4double*> * map, G4VScoreColorMap* colorMap, 90 G4int idxProj, G4int idxColumn) = 0; 91 91 // reset registered primitive scorers 92 92 void ResetScore(); … … 115 115 // get number of segments of this mesh 116 116 void GetNumberOfSegments(G4int nSegment[3]); 117 // set positions to segment this mesh118 inline void SetSegmentPositions(std::vector<G4double> & sp) {fSegmentPositions = sp;}119 117 120 118 // register a primitive scorer to the MFD & set it to the current primitive scorer … … 131 129 else return false; 132 130 } 131 // get unit of primitive scorer by the name 132 G4String GetPSUnit(G4String & psname); 133 // get unit of current primitive scorer 134 G4String GetCurrentPSUnit(); 135 // set unit of current primitive scorer 136 void SetCurrentPSUnit(const G4String& unit); 137 // get unit value of primitive scorer by the name 138 G4double GetPSUnitValue(G4String & psname); 139 // set PS name to be drawn 140 void SetDrawPSName(G4String & psname) {fDrawPSName = psname;} 141 142 // get axis names of the hierarchical division in the divided order 143 void GetDivisionAxisNames(G4String divisionAxisNames[3]); 144 133 145 // set current primitive scorer to NULL 134 146 void SetNullToCurrentPrimitiveScorer() {fCurrentPS = NULL;} … … 157 169 G4RotationMatrix * fRotationMatrix; 158 170 G4int fNSegment[3]; 159 std::vector<G4double> fSegmentPositions;160 171 161 172 std::map<G4String, G4THitsMap<G4double>* > fMap; … … 167 178 G4bool nMeshIsSet; 168 179 180 G4String fDrawUnit; 181 G4double fDrawUnitValue; 182 G4String fDrawPSName; 183 184 G4String fDivisionAxisNames[3]; 169 185 }; 170 186 … … 192 208 void G4VScoringMesh::DrawMesh(G4String psName,G4VScoreColorMap* colorMap,G4int axflg) 193 209 { 210 fDrawPSName = psName; 194 211 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName); 195 if(fMapItr!=fMap.end()) 196 { Draw(fMapItr->second->GetMap(),colorMap,axflg); } 197 else 198 { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; } 212 if(fMapItr!=fMap.end()) { 213 fDrawUnit = GetPSUnit(psName); 214 fDrawUnitValue = GetPSUnitValue(psName); 215 Draw(fMapItr->second->GetMap(), colorMap,axflg); 216 } else { 217 G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; 218 } 199 219 } 200 220 201 221 void G4VScoringMesh::DrawMesh(G4String psName,G4int idxPlane,G4int iColumn,G4VScoreColorMap* colorMap) 202 222 { 223 fDrawPSName = psName; 203 224 std::map<G4String, G4THitsMap<G4double>* >::const_iterator fMapItr = fMap.find(psName); 204 if(fMapItr!=fMap.end()) 205 { DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); } 206 else 207 { G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; } 225 if(fMapItr!=fMap.end()) { 226 fDrawUnit = GetPSUnit(psName); 227 fDrawUnitValue = GetPSUnitValue(psName); 228 DrawColumn(fMapItr->second->GetMap(),colorMap,idxPlane,iColumn); 229 } else { 230 G4cerr << "Scorer <" << psName << "> is not defined. Method ignored." << G4endl; 231 } 208 232 } 209 233
Note: See TracChangeset
for help on using the changeset viewer.