64 { fOut.open(fileName, std::ios::out|std::ios::binary); }
66 { fOut.open(fileName, std::ios::out); }
72 G4cerr <<
"G4OrderedTable::::Store():";
80 size_t tableSize = size();
83 fOut.write( (
char*)(&tableSize),
sizeof tableSize);
87 fOut << tableSize <<
G4endl;
96 fOut.write( (
char*)(&vType),
sizeof vType);
102 (*itr)->Store(fOut,ascii);
116 { fIn.open(fileName,std::ios::in|std::ios::binary); }
118 { fIn.open(fileName,std::ios::in); }
124 G4cerr <<
"G4OrderedTable::Retrieve():";
138 fIn.read((
char*)(&tableSize),
sizeof tableSize);
147 G4cerr <<
"G4OrderedTable::Retrieve():";
148 G4cerr <<
" Invalid table size: " << tableSize <<
G4endl;
155 for (
G4int idx=0; idx<tableSize; ++idx)
160 fIn.read( (
char*)(&vType),
sizeof vType);
169 G4cerr <<
"G4OrderedTable::Retrieve():";
170 G4cerr <<
" Illegal Data Vector type: " << vType <<
" in ";
182 G4cerr <<
"G4OrderedTable::Retrieve(): ";
183 G4cerr <<
" Rrror in retreiving " << idx
184 <<
"-th Physics Vector from file: ";
206 out << std::setw(8) << i <<
"-th Vector ";
std::ostream & operator<<(std::ostream &out, G4OrderedTable &right)
G4OrderedTable::iterator G4OrderedTableIterator
G4DLLIMPORT std::ostream G4cerr
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4bool Store(const G4String &filename, G4bool ascii=false)
virtual ~G4OrderedTable()
G4bool Retrieve(const G4String &filename, G4bool ascii=false)