| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# RndmEngine.h

Go to the documentation of this file.

    00001 //====================================================================
    00002 //      Random Engine definition
    00003 //--------------------------------------------------------------------
    00004 //
    00005 //      Package    : Gaudi/RndmGenSvc ( The LHCb Offline System)
    00006 //      Author     : M.Frank
    00007 //====================================================================
    00008 #ifndef GAUDI_RNDMGENSVC_RNDMENGINE_H
    00009 #define GAUDI_RNDMGENSVC_RNDMENGINE_H 1
    00010
    00011 // STL include files
    00012 #include <vector>
    00013
    00014 // Framework include files
    00015 #include "GaudiKernel/Service.h"
    00016 #include "GaudiKernel/ISerialize.h"
    00017 #include "GaudiKernel/IRndmEngine.h"
    00018 #include "GaudiKernel/IIncidentListener.h"
    00019
    00020 // Forward declarations
    00021 class IIncidentSvc;
    00022
    00046 class RndmEngine: public Service,
    00047                   virtual public IRndmEngine,
    00048                   virtual public ISerialize,
    00049                   virtual public IIncidentListener
    00050 {
    00051 protected:
    00053   IIncidentSvc*        m_pIncidentSvc;
    00054
    00056   RndmEngine(const std::string& name, ISvcLocator* loc);
    00058   virtual ~RndmEngine();
    00059 public:
    00061   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
    00063   virtual StatusCode initialize();
    00065   virtual StatusCode finalize();
    00067   virtual double rndm() const;
    00074   virtual StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0) const;
    00079   virtual StreamBuffer& serialize(StreamBuffer& str);
    00084   virtual StreamBuffer& serialize(StreamBuffer& str) const;
    00086   virtual void handle(const Incident& inc);
    00087 };
    00088
    00089 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H