#include <StaticRandomStates.h>
|
static std::ostream & | save (std::ostream &os) |
|
static std::istream & | restore (std::istream &is) |
|
◆ restore()
std::istream & CLHEP::StaticRandomStates::restore |
( |
std::istream & |
is | ) |
|
|
static |
Definition at line 51 of file StaticRandomStates.cc.
51 {
54 if ( !is ) return is;
55 if ( !ne ) return is;
56 if (ne->name() == e->name()) {
57
58 std::ostringstream os;
59 os << *ne;
60 std::istringstream istst(os.str());
61 istst >> *e;
62 if (!istst) {
63 std::cerr << "???? Unexpected behavior in StaticRandomStates::restore:\n"
64 << "The new engine, which had been input successfully from istream\n"
65 << "has encountered a problem when used to set state of theEngine\n";
66 is.clear(std::ios::badbit | is.rdstate());
67 return is;
68 }
69 } else {
71 }
74 return is;
75}
static HepRandomEngine * newEngine(std::istream &is)
static HepRandomEngine * getTheEngine()
static void setTheEngine(HepRandomEngine *theNewEngine)
static std::istream & restoreDistState(std::istream &is)
static std::istream & restoreDistState(std::istream &is)
Referenced by CLHEP::HepRandom::restoreStaticRandomStates().
◆ save()
std::ostream & CLHEP::StaticRandomStates::save |
( |
std::ostream & |
os | ) |
|
|
static |
The documentation for this class was generated from the following files: