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 
128 #include <cstdint>
129 #include <iosfwd>
130 #include <vector>
131 
132 class RandomEngineState;
133 
134 namespace CLHEP {
135  class HepRandomEngine;
136 }
137 
138 namespace edm {
139 
140  class ConsumesCollector;
141  class Event;
142  class LuminosityBlock;
143  class LuminosityBlockIndex;
144  class StreamID;
145 
147  {
148  public:
149 
151  virtual ~RandomNumberGenerator();
152 
155 
157  virtual CLHEP::HepRandomEngine& getEngine(StreamID const&) = 0;
158 
160  virtual CLHEP::HepRandomEngine& getEngine(LuminosityBlockIndex const&) = 0;
161 
173  virtual std::uint32_t mySeed() const = 0;
174 
175  // The following functions should not be used by general users. They
176  // should only be called by Framework code designed to work with the
177  // service while it is saving the engine states or restoring them.
178  // The first two are called by the EventProcessor at special times.
179  // The next two are called by a dedicated producer module (RandomEngineStateProducer).
180 
181  virtual void preBeginLumi(LuminosityBlock const& lumi) = 0;
182  virtual void postEventRead(Event const& event) = 0;
183 
184  virtual std::vector<RandomEngineState> const& getEventCache(StreamID const&) const = 0;
185  virtual std::vector<RandomEngineState> const& getLumiCache(LuminosityBlockIndex const&) const = 0;
186 
187  virtual void consumes(ConsumesCollector&& iC) const = 0;
188 
190  virtual void print(std::ostream& os) const = 0;
191 
192  private:
193 
195  RandomNumberGenerator const& operator=(RandomNumberGenerator const&) = delete;
196  };
197 }
198 #endif
virtual void print(std::ostream &os) const =0
For debugging purposes only.
virtual void consumes(ConsumesCollector &&iC) const =0
virtual std::vector< RandomEngineState > const & getLumiCache(LuminosityBlockIndex const &) const =0
tuple lumi
Definition: fjr2json.py:35
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
Definition: Event.h:16
virtual std::uint32_t mySeed() const =0
virtual std::vector< RandomEngineState > const & getEventCache(StreamID const &) const =0
virtual void postEventRead(Event const &event)=0
RandomNumberGenerator const & operator=(RandomNumberGenerator const &)=delete
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