LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
RNGsnapshot.cc
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // RNGsnapshot
4 //
5 // ======================================================================
6 
8 #include "cetlib/container_algorithms.h"
9 
10 using art::RNGsnapshot;
11 
12 RNGsnapshot::RNGsnapshot(std::string const& ekind,
13  label_t const& lbl,
14  engine_state_t const& est)
15 {
16  saveFrom(ekind, lbl, est);
17 }
18 
19 void
20 RNGsnapshot::saveFrom(std::string const& ekind,
21  label_t const& lbl,
22  engine_state_t const& est)
23 {
25  label_ = lbl;
26  cet::copy_all(est, std::back_inserter(state_));
27 }
28 
31 {
32  engine_state_t est;
33  cet::copy_all(state_, std::back_inserter(est));
34  return est;
35 }
36 
37 // ======================================================================
std::string const & ekind() const
Definition: RNGsnapshot.h:63
std::vector< CLHEP_t > engine_state_t
Definition: RNGsnapshot.h:44
std::string engine_kind_
Definition: RNGsnapshot.h:83
snapshot_state_t state_
Definition: RNGsnapshot.h:85
std::string label_t
Definition: RNGsnapshot.h:49
void saveFrom(std::string const &, label_t const &, engine_state_t const &)
Definition: RNGsnapshot.cc:20
engine_state_t restoreState() const
Definition: RNGsnapshot.cc:30