Public Types | Public Member Functions | Private Attributes | List of all members
art::RNGsnapshot Class Reference

#include <RNGsnapshot.h>

Public Types

using CLHEP_t = unsigned long
 
using engine_state_t = std::vector< CLHEP_t >
 
using saved_t = unsigned int
 
using snapshot_state_t = std::vector< saved_t >
 
using label_t = std::string
 

Public Member Functions

 RNGsnapshot ()=default
 
 RNGsnapshot (std::string const &ekind, label_t const &label, engine_state_t const &est)
 
std::string const & ekind () const
 
label_t const & label () const
 
snapshot_state_t const & state () const
 
void saveFrom (std::string const &, label_t const &, engine_state_t const &)
 
engine_state_t restoreState () const
 

Private Attributes

std::string engine_kind_ {}
 
label_t label_ {}
 
snapshot_state_t state_ {}
 

Detailed Description

Definition at line 16 of file RNGsnapshot.h.

Member Typedef Documentation

using art::RNGsnapshot::CLHEP_t = unsigned long

Definition at line 19 of file RNGsnapshot.h.

Definition at line 20 of file RNGsnapshot.h.

Definition at line 25 of file RNGsnapshot.h.

using art::RNGsnapshot::saved_t = unsigned int

Definition at line 23 of file RNGsnapshot.h.

Definition at line 24 of file RNGsnapshot.h.

Constructor & Destructor Documentation

art::RNGsnapshot::RNGsnapshot ( )
default
art::RNGsnapshot::RNGsnapshot ( std::string const &  ekind,
label_t const &  label,
engine_state_t const &  est 
)
explicit

Member Function Documentation

std::string const& art::RNGsnapshot::ekind ( ) const
inline

Definition at line 46 of file RNGsnapshot.h.

47  {
48  return engine_kind_;
49  }
std::string engine_kind_
Definition: RNGsnapshot.h:66
label_t const& art::RNGsnapshot::label ( ) const
inline

Definition at line 51 of file RNGsnapshot.h.

52  {
53  return label_;
54  }
std::vector< unsigned long > art::RNGsnapshot::restoreState ( ) const

Definition at line 32 of file RNGsnapshot.cc.

33  {
34  std::vector<unsigned long> est;
35  // N.B. implicit conversion from unsigned long to unsigned int.
36  cet::copy_all(state_, std::back_inserter(est));
37  return est;
38  }
auto copy_all(FwdCont &, FwdIter)
snapshot_state_t state_
Definition: RNGsnapshot.h:68
void art::RNGsnapshot::saveFrom ( std::string const &  ,
label_t const &  ,
engine_state_t const &   
)

Definition at line 21 of file RNGsnapshot.cc.

24  {
26  label_ = lbl;
27  // N.B. implicit conversion from unsigned long to unsigned int.
28  cet::copy_all(est, std::back_inserter(state_));
29  }
std::string const & ekind() const
Definition: RNGsnapshot.h:46
std::string engine_kind_
Definition: RNGsnapshot.h:66
auto copy_all(FwdCont &, FwdIter)
snapshot_state_t state_
Definition: RNGsnapshot.h:68
snapshot_state_t const& art::RNGsnapshot::state ( ) const
inline

Definition at line 56 of file RNGsnapshot.h.

57  {
58  return state_;
59  }
snapshot_state_t state_
Definition: RNGsnapshot.h:68

Member Data Documentation

std::string art::RNGsnapshot::engine_kind_ {}
private

Definition at line 66 of file RNGsnapshot.h.

label_t art::RNGsnapshot::label_ {}
private

Definition at line 67 of file RNGsnapshot.h.

snapshot_state_t art::RNGsnapshot::state_ {}
private

Definition at line 68 of file RNGsnapshot.h.


The documentation for this class was generated from the following files: