LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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 40 of file RNGsnapshot.h.

Member Typedef Documentation

using art::RNGsnapshot::CLHEP_t = unsigned long

Definition at line 43 of file RNGsnapshot.h.

Definition at line 44 of file RNGsnapshot.h.

using art::RNGsnapshot::label_t = std::string

Definition at line 49 of file RNGsnapshot.h.

using art::RNGsnapshot::saved_t = unsigned int

Definition at line 47 of file RNGsnapshot.h.

Definition at line 48 of file RNGsnapshot.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file RNGsnapshot.cc.

References saveFrom().

15 {
16  saveFrom(ekind, lbl, est);
17 }
std::string const & ekind() const
Definition: RNGsnapshot.h:63
void saveFrom(std::string const &, label_t const &, engine_state_t const &)
Definition: RNGsnapshot.cc:20

Member Function Documentation

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

Definition at line 63 of file RNGsnapshot.h.

References engine_kind_.

Referenced by saveFrom().

64  {
65  return engine_kind_;
66  }
std::string engine_kind_
Definition: RNGsnapshot.h:83
label_t const& art::RNGsnapshot::label ( ) const
inline

Definition at line 68 of file RNGsnapshot.h.

References label_.

69  {
70  return label_;
71  }
RNGsnapshot::engine_state_t RNGsnapshot::restoreState ( ) const

Definition at line 30 of file RNGsnapshot.cc.

References state_.

Referenced by state().

31 {
32  engine_state_t est;
33  cet::copy_all(state_, std::back_inserter(est));
34  return est;
35 }
std::vector< CLHEP_t > engine_state_t
Definition: RNGsnapshot.h:44
snapshot_state_t state_
Definition: RNGsnapshot.h:85
void RNGsnapshot::saveFrom ( std::string const &  ekind,
label_t const &  lbl,
engine_state_t const &  est 
)

Definition at line 20 of file RNGsnapshot.cc.

References ekind(), engine_kind_, label_, and state_.

Referenced by RNGsnapshot(), and state().

23 {
25  label_ = lbl;
26  cet::copy_all(est, std::back_inserter(state_));
27 }
std::string const & ekind() const
Definition: RNGsnapshot.h:63
std::string engine_kind_
Definition: RNGsnapshot.h:83
snapshot_state_t state_
Definition: RNGsnapshot.h:85
snapshot_state_t const& art::RNGsnapshot::state ( ) const
inline

Definition at line 73 of file RNGsnapshot.h.

References restoreState(), saveFrom(), and state_.

74  {
75  return state_;
76  }
snapshot_state_t state_
Definition: RNGsnapshot.h:85

Member Data Documentation

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

Definition at line 83 of file RNGsnapshot.h.

Referenced by ekind(), and saveFrom().

label_t art::RNGsnapshot::label_ {}
private

Definition at line 84 of file RNGsnapshot.h.

Referenced by label(), and saveFrom().

snapshot_state_t art::RNGsnapshot::state_ {}
private

Definition at line 85 of file RNGsnapshot.h.

Referenced by restoreState(), saveFrom(), and state().


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