Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

RndmEngine Class Reference

Random Generator engine definition. More...

#include <RndmEngine.h>

Inheritance diagram for RndmEngine:

Service IRndmEngine ISerialize IIncidentListener HepRndm::BaseEngine HepRndm::Engine List of all members.

Public Methods

StatusCode queryInterface (const IID& riid, void** ppvInterface)
 Query interface. More...

virtual StatusCode initialize ()
 Service override: initialisation. More...

virtual StatusCode finalize ()
 Service override: finalisation. More...

virtual double rndm () const
 Single shot returning single random number. More...

virtual StatusCode rndmArray ( std::vector<double>& array, long howmany, long start = 0) const
 Multiple shots returning vector with flat random numbers. More...

virtual StreamBuffer& serialize (StreamBuffer& str)
 Input serialisation from stream buffer. More...

virtual StreamBuffer& serialize (StreamBuffer& str) const
 Output serialisation to stream buffer. More...

virtual void handle (const Incident& inc)
 Inform that a new incident has occured. More...


Protected Methods

 RndmEngine (const std::string& name, ISvcLocator* loc)
 Standard Constructor. More...

virtual ~RndmEngine ()
 Standard Destructor. More...


Protected Attributes

IIncidentSvcm_pIncidentSvc
 Reference to the incident service. More...


Detailed Description

Random Generator engine definition.

Description: Definition of a interface for a generic random number generator giving randomly distributed numbers in the range [0...1] number generators.

Dependencies:

History :

    +---------+----------------------------------------------+--------+
    |    Date |                 Comment                      | Who    |
    +---------+----------------------------------------------+--------+
    | 21/04/99| Initial version.                             | MF     |
    +---------+----------------------------------------------+--------+
    
Author: M.Frank Version: 1.0

Definition at line 46 of file RndmEngine.h.


Constructor & Destructor Documentation

RndmEngine::RndmEngine ( const std::string & name,
ISvcLocator * loc ) [protected]
 

Standard Constructor.

Definition at line 32 of file RndmEngine.cpp.

RndmEngine::~RndmEngine ( ) [protected, virtual]
 

Standard Destructor.

Definition at line 38 of file RndmEngine.cpp.


Member Function Documentation

StatusCode RndmEngine::finalize ( ) [virtual]
 

Service override: finalisation.

Reimplemented in HepRndm::Engine.

Definition at line 75 of file RndmEngine.cpp.

Referenced by HepRndm::Engine::finalize().

void RndmEngine::handle ( const Incident & inc ) [virtual]
 

Inform that a new incident has occured.

Definition at line 101 of file RndmEngine.cpp.

StatusCode RndmEngine::initialize ( ) [virtual]
 

Service override: initialisation.

Reimplemented in HepRndm::Engine.

Definition at line 60 of file RndmEngine.cpp.

Referenced by HepRndm::Engine::initialize().

StatusCode RndmEngine::queryInterface ( const IID & riid,
void ** ppvInterface )
 

Query interface.

Definition at line 42 of file RndmEngine.cpp.

double RndmEngine::rndm ( ) const [virtual]
 

Single shot returning single random number.

Reimplemented in HepRndm::Engine.

Definition at line 96 of file RndmEngine.cpp.

Referenced by rndmArray().

StatusCode RndmEngine::rndmArray ( std::vector< double >& array,
long howmany,
long start = 0 ) const [virtual]
 

Multiple shots returning vector with flat random numbers.

Parameters:
array   Array containing random numbers
howmany   fill 'howmany' random numbers into array
start   ... starting at position start
Returns:
StatusCode indicating failure or success.

Definition at line 110 of file RndmEngine.cpp.

StreamBuffer & RndmEngine::serialize ( StreamBuffer & str ) const [virtual]
 

Output serialisation to stream buffer.

Saves the status of the object.

Parameters:
str   Reference to Streambuffer to be read
Returns:
Reference to read stream buffer

Definition at line 91 of file RndmEngine.cpp.

StreamBuffer & RndmEngine::serialize ( StreamBuffer & str ) [virtual]
 

Input serialisation from stream buffer.

Restores the status of the object.

Parameters:
str   Reference to Streambuffer to be filled
Returns:
Reference to filled stream buffer

Definition at line 86 of file RndmEngine.cpp.


Member Data Documentation

IIncidentSvc * RndmEngine::m_pIncidentSvc [protected]
 

Reference to the incident service.

Definition at line 53 of file RndmEngine.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:35 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000