Commit 720b59ec authored by Lynn Garren's avatar Lynn Garren
Browse files

*** empty log message ***

parent ca8b580e
......@@ -38,8 +38,8 @@ public:
// --- mutators:
//
void putState( std::istream& );
void putState( std::string& );
void putState( std::vector<unsigned long> );
void putState( std::string const & );
void putState( std::vector<unsigned long> const & );
void appendSeed( unsigned long sd );
void appendSeed( double sd );
void clear( );
......
......@@ -71,12 +71,12 @@ void StdRandom::putState( std::istream& ist )
myRandomState = st.str();
}
void StdRandom::putState( std::string& st )
void StdRandom::putState( std::string const & st )
{
myRandomState = st;
}
void StdRandom::putState( std::vector<unsigned long> rs )
void StdRandom::putState( std::vector<unsigned long> const & rs )
{
std::ostringstream st;
for( unsigned int i=0; i<rs.size(); ++i ) {
......
......@@ -19,7 +19,6 @@ int main() {
int status=0;
double d, saved;
StdHep::StdRandom rstate;
std::string state;
// fill and save an arbitrary vector just for grins
std::vector<unsigned long> rs;
......@@ -35,8 +34,7 @@ int main() {
// get and then save the state
std::ostringstream ostr;
simp->put(ostr);
state = ostr.str();
rstate.putState( state );
rstate.putState( ostr.str() );
}
// this double is generated by the last saved state
d = simp->flat();
......@@ -51,7 +49,7 @@ int main() {
status = 1;
}
// restore the saved state
state = rstate.getStateAsString();
std::string state = rstate.getStateAsString();
std::istringstream ist(state);
simp->get(ist);
d = simp->flat();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment