Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:52

0001 // -*- C++ -*-
0002 #ifndef RandomEngine_RandomEngineStates_h
0003 #define RandomEngine_RandomEngineStates_h
0004 
0005 /** \class edm::RandomEngineStates
0006 
0007 Description: Holds the states of multiple random number
0008 engines and associated seeds and module labels.
0009 
0010 Usage:  This should only be used by the Random Number Generator
0011 Service.
0012 
0013 \author W. David Dagenhart, created December 3, 2010
0014 */
0015 
0016 #include <vector>
0017 #include <string>
0018 
0019 class RandomEngineState;
0020 
0021 namespace edm {
0022 
0023   class RandomEngineStates {
0024   public:
0025     RandomEngineStates();
0026     ~RandomEngineStates();
0027 
0028     void getRandomEngineStates(std::vector<RandomEngineState>& states) const;
0029     void setRandomEngineStates(std::vector<RandomEngineState> const& states);
0030 
0031     bool isProductEqual(RandomEngineStates const& randomEngineStates) const;
0032 
0033   private:
0034     std::vector<std::string> moduleLabels_;
0035 
0036     std::vector<unsigned> seedLengths_;
0037     std::vector<unsigned> seedVectors_;
0038 
0039     std::vector<unsigned> stateLengths_;
0040     std::vector<unsigned> stateVectors_;
0041   };
0042 }  // namespace edm
0043 #endif