CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RandomNumberGenerator.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_RandomNumberGenerator_h
2 #define FWCore_Utilities_RandomNumberGenerator_h
3 
92 #include <vector>
93 #include <stdint.h>
94 
95 class RandomEngineState;
96 
97 namespace CLHEP {
98  class HepRandomEngine;
99 }
100 
101 namespace edm {
102 
103  class StreamID;
104  class LuminosityBlock;
105  class LuminosityBlockIndex;
106  class Event;
107 
109  {
110  public:
111 
113  virtual ~RandomNumberGenerator();
114 
116  virtual CLHEP::HepRandomEngine& getEngine() const = 0;
117 
118  virtual CLHEP::HepRandomEngine& getEngine(StreamID const&) const { return getEngine(); }
119  virtual CLHEP::HepRandomEngine& getEngine(LuminosityBlockIndex const&) const { return getEngine(); }
120 
122  virtual uint32_t mySeed() const = 0;
123 
124  // The following functions should not be used by general users. They
125  // should only be called by Framework code designed to work with the
126  // service while it is saving the engine states or restoring them.
127  // The first two are called by the InputSource base class.
128  // The next two are called by a dedicated producer module (RandomEngineStateProducer).
129 
130  virtual void preBeginLumi(LuminosityBlock const& lumi) = 0;
131  virtual void postEventRead(Event const& event) = 0;
132 
133  virtual std::vector<RandomEngineState> const& getLumiCache() const = 0;
134  virtual std::vector<RandomEngineState> const& getEventCache() const = 0;
135 
137  virtual void print() = 0;
138 
139  private:
140 
141  RandomNumberGenerator(RandomNumberGenerator const&); // stop default
142  RandomNumberGenerator const& operator=(RandomNumberGenerator const&); // stop default
143  };
144 }
145 #endif
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const
virtual std::vector< RandomEngineState > const & getLumiCache() const =0
virtual CLHEP::HepRandomEngine & getEngine(LuminosityBlockIndex const &) const
tuple lumi
Definition: fjr2json.py:35
RandomNumberGenerator const & operator=(RandomNumberGenerator const &)
virtual void postEventRead(Event const &event)=0
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void preBeginLumi(LuminosityBlock const &lumi)=0
virtual std::vector< RandomEngineState > const & getEventCache() const =0
virtual uint32_t mySeed() const =0
Exists for backward compatibility.
virtual void print()=0
For debugging purposes only.