60 for(
auto i = cbegin(); i != cend(); ++i)
83 fOut.open(fileName, std::ios::out | std::ios::binary);
87 fOut.open(fileName, std::ios::out);
94 G4cerr <<
"G4OrderedTable::::Store():";
104 fOut.write((
char*) (&tableSize),
sizeof tableSize);
108 fOut << tableSize <<
G4endl;
112 for(
auto itr = cbegin(); itr != cend(); ++itr)
116 fOut.write((
char*) (&vType),
sizeof vType);
122 (*itr)->Store(fOut, ascii);
135 fIn.open(fileName, std::ios::in | std::ios::binary);
139 fIn.open(fileName, std::ios::in);
146 G4cerr <<
"G4OrderedTable::Retrieve():";
160 fIn.read((
char*) (&tableSize),
sizeof tableSize);
169 G4cerr <<
"G4OrderedTable::Retrieve():";
170 G4cerr <<
" Invalid table size: " << tableSize <<
G4endl;
177 for(
G4int idx = 0; idx < tableSize; ++idx)
182 fIn.read((
char*) (&vType),
sizeof vType);
191 G4cerr <<
"G4OrderedTable::Retrieve():";
192 G4cerr <<
" Illegal Data Vector type: " << vType <<
" in ";
204 G4cerr <<
"G4OrderedTable::Retrieve(): ";
205 G4cerr <<
" Error in retreiving " << idx
206 <<
"-th Physics Vector from file: ";
226 for(
auto itr = right.cbegin(); itr != right.cend(); ++itr)
228 out << std::setw(8) << i <<
"-th Vector ";
std::ostream & operator<<(std::ostream &out, G4OrderedTable &right)
G4GLOB_DLL 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)