Changeset 1140 for trunk/source/digits_hits/utils/src
- Timestamp:
- Nov 3, 2009, 11:17:28 AM (15 years ago)
- Location:
- trunk/source/digits_hits/utils/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/digits_hits/utils/src/G4ScoreLogColorMap.cc
r998 r1140 25 25 // 26 26 // 27 // $Id: G4ScoreLogColorMap.cc,v 1. 2 2008/03/25 04:06:08akimura Exp $28 // GEANT4 tag $Name: geant4-09-02-ref-02$27 // $Id: G4ScoreLogColorMap.cc,v 1.3 2009/05/04 15:57:33 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 31 31 #include "G4ScoreLogColorMap.hh" 32 32 #include <cmath> 33 #include <string> 34 #include <sstream> 35 #include <iomanip> 33 36 34 37 … … 152 155 } 153 156 // text 154 char cstring[80]; 155 std::sprintf(cstring, "%8.1e", std::pow(10., v)); 156 G4String value(cstring); 157 //char cstring[80]; 158 //std::sprintf(cstring, "%8.1e", std::pow(10., v)); 159 //G4String value(cstring); 160 std::ostringstream oss; 161 oss << std::setw(8) << std::setprecision(1) << std::scientific << std::pow(10., v); 162 std::string str = oss.str(); 163 G4String value(str.c_str()); 157 164 G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0)); 158 165 G4double size = 12.; -
trunk/source/digits_hits/utils/src/G4VScoreColorMap.cc
r998 r1140 25 25 // 26 26 // 27 // $Id: G4VScoreColorMap.cc,v 1. 3 2008/02/14 10:45:12akimura Exp $28 // GEANT4 tag $Name: geant4-09-02-ref-02$27 // $Id: G4VScoreColorMap.cc,v 1.4 2009/05/04 15:57:33 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 31 31 #include "G4VScoreColorMap.hh" 32 #include <string> 33 #include <sstream> 34 #include <iomanip> 32 35 33 36 #include "G4VVisManager.hh" … … 94 97 } 95 98 // text 96 char cstring[80]; 97 std::sprintf(cstring, "%8.2e", v); 98 G4String value(cstring); 99 //char cstring[80]; 100 //std::sprintf(cstring, "%8.2e", v); 101 //G4String value(cstring); 102 std::ostringstream oss; 103 oss << std::setw(8) << std::setprecision(1) << std::scientific << v; 104 std::string str = oss.str(); 105 G4String value(str.c_str()); 106 99 107 G4Text text(value, G4Point3D(-0.9, -0.9+0.05*n, 0)); 100 108 G4double size = 12.; -
trunk/source/digits_hits/utils/src/G4VScoringMesh.cc
r998 r1140 25 25 // 26 26 // 27 // $Id: G4VScoringMesh.cc,v 1.3 5 2008/03/23 14:32:13akimura Exp $28 // GEANT4 tag $Name: geant4-09-02-ref-02$27 // $Id: G4VScoringMesh.cc,v 1.37 2009/10/12 04:11:25 akimura Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 … … 63 63 for(int i = 0; i < 3; i++) fSize[i] = size[i]; 64 64 sizeIsSet = true; 65 } 66 G4ThreeVector G4VScoringMesh::GetSize() const { 67 if(sizeIsSet) 68 return G4ThreeVector(fSize[0], fSize[1], fSize[2]); 69 else 70 return G4ThreeVector(0., 0., 0.); 65 71 } 66 72 void G4VScoringMesh::SetCenterPosition(G4double centerPosition[3]) {
Note: See TracChangeset
for help on using the changeset viewer.