Changeset 1340 for trunk/source/global/management/src/G4DataVector.cc
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/src/G4DataVector.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4DataVector.cc,v 1. 9 2007/11/13 17:35:06gcosmo Exp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4DataVector.cc,v 1.12 2010/11/01 13:55:53 gcosmo Exp $ 28 // GEANT4 tag $Name: global-V09-03-22 $ 29 29 // 30 30 // … … 88 88 { 89 89 clear(); 90 size_t sizeV=0;90 G4int sizeV=0; 91 91 92 92 // retrieve in ascii mode … … 96 96 fIn >> sizeV; 97 97 if (fIn.fail()) { return false; } 98 98 if (sizeV<=0) 99 { 100 #ifdef G4VERBOSE 101 G4cerr << "G4DataVector::Retrieve():"; 102 G4cerr << " Invalid vector size: " << sizeV << G4endl; 103 #endif 104 return false; 105 } 106 99 107 reserve(sizeV); 100 for( size_t i = 0; i < sizeV ; i++)108 for(G4int i = 0; i < sizeV ; i++) 101 109 { 102 110 G4double vData=0.0; … … 120 128 121 129 reserve(sizeV); 122 for( size_t i = 0; i < sizeV; i++)130 for(G4int i = 0; i < sizeV; i++) 123 131 { 124 132 push_back(value[i]); … … 130 138 std::ostream& operator<<(std::ostream& out, const G4DataVector& pv) 131 139 { 132 out << pv.size() << G4endl;140 out << pv.size() << std::setprecision(12) << G4endl; 133 141 for(size_t i = 0; i < pv.size(); i++) 134 142 { 135 out << std::setprecision(12) <<pv[i] << G4endl;143 out << pv[i] << G4endl; 136 144 } 145 out << std::setprecision(6); 137 146 138 147 return out;
Note: See TracChangeset
for help on using the changeset viewer.