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 
26 
28 
29  public:
30 
32 
34 
35  const std::string& getLabel() const { return label_; }
36  const std::vector<uint32_t>& getState() const { return state_; }
37  const std::vector<uint32_t>& getSeed() const { return seed_; }
38 
39  void setLabel(const std::string& value) { label_ = value; }
40  void setState(const std::vector<uint32_t>& value) { state_ = value; }
41  void setSeed(const std::vector<uint32_t>& value) { seed_ = value; }
42 
43  void clearSeedVector() { seed_.clear(); }
45  void push_back_seedVector(uint32_t v) { seed_.push_back(v); }
46 
47  void clearStateVector() { state_.clear(); }
49  void push_back_stateVector(uint32_t v) { state_.push_back(v); }
50 
51  bool operator<(RandomEngineState const& rhs) const { return label_ < rhs.label_; }
52 
53  private:
54 
56  std::vector<uint32_t> state_;
57  std::vector<uint32_t> seed_;
58 };
59 
60 #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)