94 G4PhysCollection::resize(siz, vec);
105 { fOut.open(fileName, std::ios::out|std::ios::binary); }
107 { fOut.open(fileName, std::ios::out); }
113 G4cerr <<
"G4PhysicsTable::StorePhysicsTable():";
121 size_t tableSize = size();
124 fOut.write( (
char*)(&tableSize),
sizeof tableSize);
128 fOut << tableSize <<
G4endl;
134 G4int vType = (*itr)->GetType();
137 fOut.write( (
char*)(&vType),
sizeof vType);
143 (*itr)->Store(fOut,ascii);
180 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
194 fIn.read((
char*)(&tableSize),
sizeof tableSize);
204 for (
size_t idx=0; idx<tableSize; ++idx)
209 fIn.read( (
char*)(&vType),
sizeof vType);
219 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
220 G4cerr <<
" Illegal Physics Vector type: " << vType <<
" in: ";
230 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
231 G4cerr <<
" Rrror in retreiving " << idx
232 <<
"-th Physics Vector from file: ";
240 G4PhysCollection::push_back(pVec);
255 out << std::setw(8) << i <<
"-th Vector ";
256 out <<
": Type " <<
G4int((*itr)->GetType()) ;
276 size_t tableSize = G4PhysCollection::size();
278 for (
size_t idx=0; idx<tableSize; idx++)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
G4PhysicsTable::iterator G4PhysicsTableIterator
const XML_Char int const XML_Char * value
std::vector< G4PhysicsVector * > G4PhysCollection
G4GLOB_DLL std::ostream G4cerr
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
virtual ~G4PhysicsTable()
G4bool ExistPhysicsTable(const G4String &fileName) const
void resize(size_t, G4PhysicsVector *vec=(G4PhysicsVector *)(0))
G4bool RetrievePhysicsTable(const G4String &filename, G4bool ascii=false)
G4PhysicsVector * CreatePhysicsVector(G4int type)
G4bool GetFlag(size_t i) const