#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 52 of file StaticRandomStates.cc.
52 {
55 if ( !is ) return is;
56 if ( !ne ) return is;
57 if (ne->name() == e->name()) {
58
59 std::ostringstream os;
60 os << *ne;
61 std::istringstream istst(os.str());
62 istst >> *e;
63 if (!istst) {
64 std::cerr << "???? Unexpected behavior in StaticRandomStates::restore:\n"
65 << "The new engine, which had been input successfully from istream\n"
66 << "has encountered a problem when used to set state of theEngine\n";
67 is.clear(std::ios::badbit | is.rdstate());
68 return is;
69 }
70 } else {
72 }
75 return is;
76}
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)
◆ save()
std::ostream & CLHEP::StaticRandomStates::save |
( |
std::ostream & |
os | ) |
|
|
static |
Definition at line 38 of file StaticRandomStates.cc.
38 {
41 return os;
42}
static std::ostream & saveDistState(std::ostream &os)
static std::ostream & saveFullState(std::ostream &os)
The documentation for this class was generated from the following files: