74 for (G4PhysCollection::const_iterator itr=right.begin();
75 itr!=right.end(); ++itr )
77 G4PhysCollection::push_back(*itr);
93 G4PhysCollection::resize(siz, vec);
104 { fOut.open(fileName, std::ios::out|std::ios::binary); }
106 { fOut.open(fileName, std::ios::out); }
112 G4cerr <<
"G4PhysicsTable::StorePhysicsTable():";
120 size_t tableSize = size();
123 fOut.write( (
char*)(&tableSize),
sizeof tableSize);
127 fOut << tableSize <<
G4endl;
133 G4int vType = (*itr)->GetType();
136 fOut.write( (
char*)(&vType),
sizeof vType);
142 (*itr)->Store(fOut,ascii);
179 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
193 fIn.read((
char*)(&tableSize),
sizeof tableSize);
203 for (
size_t idx=0; idx<tableSize; ++idx)
208 fIn.read( (
char*)(&vType),
sizeof vType);
218 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
219 G4cerr <<
" Illegal Physics Vector type: " << vType <<
" in: ";
229 G4cerr <<
"G4PhysicsTable::RetrievePhysicsTable():";
230 G4cerr <<
" Rrror in retreiving " << idx
231 <<
"-th Physics Vector from file: ";
239 G4PhysCollection::push_back(pVec);
254 out << std::setw(8) << i <<
"-th Vector ";
255 out <<
": Type " <<
G4int((*itr)->GetType()) ;
275 size_t tableSize = G4PhysCollection::size();
277 for (
size_t idx=0; idx<tableSize; idx++)
G4bool RetrievePhysicsTable(const G4String &filename, G4bool ascii=false)
G4bool ExistPhysicsTable(const G4String &fileName) const
G4PhysicsTable::iterator G4PhysicsTableIterator
G4PhysicsVector * CreatePhysicsVector(G4int type)
void resize(size_t, G4PhysicsVector *vec=(G4PhysicsVector *)(0))
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
const XML_Char int const XML_Char * value
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
G4bool GetFlag(size_t i) const
virtual ~G4PhysicsTable()
G4GLOB_DLL std::ostream G4cerr