CMS 3D CMS Logo

RandomEngineState.h
Go to the documentation of this file.
1 #ifndef RandomEngine_RandomEngineState_h
2 #define RandomEngine_RandomEngineState_h
3 // -*- C++ -*-
4 //
5 // Package: RandomEngine
6 // Class : RandomEngineState
7 //
17 //
18 // Original Author: W. David Dagenhart, Fermilab
19 // Created: Tue Oct 3 09:56:36 CDT 2006
20 //
21 
22 #include <vector>
23 #include <string>
24 #include <boost/cstdint.hpp>
25 
27 public:
29 
31 
32  const std::string& getLabel() const { return label_; }
33  const std::vector<uint32_t>& getState() const { return state_; }
34  const std::vector<uint32_t>& getSeed() const { return seed_; }
35 
36  void setLabel(const std::string& value) { label_ = value; }
37  void setState(const std::vector<uint32_t>& value) { state_ = value; }
38  void setSeed(const std::vector<uint32_t>& value) { seed_ = value; }
39 
40  void clearSeedVector() { seed_.clear(); }
42  void push_back_seedVector(uint32_t v) { seed_.push_back(v); }
43 
44  void clearStateVector() { state_.clear(); }
46  void push_back_stateVector(uint32_t v) { state_.push_back(v); }
47 
48  bool operator<(RandomEngineState const& rhs) const { return label_ < rhs.label_; }
49 
50 private:
52  std::vector<uint32_t> state_;
53  std::vector<uint32_t> seed_;
54 };
55 
56 #endif
std::vector< uint32_t > seed_
void setLabel(const std::string &value)
void reserveStateVector(std::vector< uint32_t >::size_type n)
uint16_t size_type
const std::string & getLabel() const
void reserveSeedVector(std::vector< uint32_t >::size_type n)
void push_back_stateVector(uint32_t v)
void setSeed(const std::vector< uint32_t > &value)
void setState(const std::vector< uint32_t > &value)
std::vector< uint32_t > state_
const std::vector< uint32_t > & getState() const
Definition: value.py:1
bool operator<(RandomEngineState const &rhs) const
const std::vector< uint32_t > & getSeed() const
void push_back_seedVector(uint32_t v)