Changeset 1340 for trunk/source/digits_hits/utils/src/G4VScoreWriter.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/utils/src/G4VScoreWriter.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VScoreWriter.cc,v 1. 5 2008/03/04 23:19:09 tasoExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4VScoreWriter.cc,v 1.10 2010/07/27 01:44:54 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 87 87 return; 88 88 } 89 90 89 91 std::map<G4int, G4double*> * score = msMapItr->second->GetMap(); 90 ofile << "# primitive scorer name: " << msMapItr->first << G4endl; 92 ofile << "# primitive scorer name: " << msMapItr->first << std::endl; 93 94 95 G4double unitValue = fScoringMesh->GetPSUnitValue(psName); 96 G4String unit = fScoringMesh->GetPSUnit(psName); 97 G4String divisionAxisNames[3]; 98 fScoringMesh->GetDivisionAxisNames(divisionAxisNames); 99 // index order 100 ofile << "# i" << divisionAxisNames[0] 101 << ", i" << divisionAxisNames[1] 102 << ", i" << divisionAxisNames[2]; 103 // unit of scored value 104 ofile << ", value "; 105 if(unit.size() > 0) ofile << "[" << unit << "]"; 106 ofile << G4endl; 91 107 92 108 // "sequence" option: write header info … … 111 127 ofile << 0.; 112 128 } else { 113 ofile << *(value->second) ;129 ofile << *(value->second)/unitValue; 114 130 } 115 131 … … 160 176 std::map<G4int, G4double*> * score; 161 177 for(; msMapItr != fSMap.end(); msMapItr++) { 178 179 G4String psname = msMapItr->first; 180 162 181 score = msMapItr->second->GetMap(); 163 ofile << "# primitive scorer name: " << msMapItr->first << G4endl; 182 ofile << "# primitive scorer name: " << msMapItr->first << std::endl; 183 184 G4double unitValue = fScoringMesh->GetPSUnitValue(psname); 185 G4String unit = fScoringMesh->GetPSUnit(psname); 186 G4String divisionAxisNames[3]; 187 fScoringMesh->GetDivisionAxisNames(divisionAxisNames); 188 // index order 189 ofile << "# i" << divisionAxisNames[0] 190 << ", i" << divisionAxisNames[1] 191 << ", i" << divisionAxisNames[2]; 192 // unit of scored value 193 ofile << ", value "; 194 if(unit.size() > 0) ofile << "[" << unit << "]"; 195 ofile << G4endl; 196 164 197 165 198 // "sequence" option: write header info … … 184 217 ofile << 0.; 185 218 } else { 186 ofile << *(value->second) ;219 ofile << *(value->second)/unitValue; 187 220 } 188 221
Note: See TracChangeset
for help on using the changeset viewer.