| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# RndmGenSvc.h

Go to the documentation of this file.

    00001 //====================================================================
    00002 //      Random Generator service definition
    00003 //--------------------------------------------------------------------
    00004 //
    00005 //      Package    : Gaudi/RndmGen ( The LHCb Offline System)
    00006 //      Author     : M.Frank
    00007 //====================================================================
    00008 #ifndef GAUDI_RANDOMGENSVC_RNDMGENSVC_H
    00009 #define GAUDI_RANDOMGENSVC_RNDMGENSVC_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/IRndmGen.h"
    00018 #include "GaudiKernel/IRndmEngine.h"
    00019 #include "GaudiKernel/IRndmGenSvc.h"
    00020
    00021 // Forward declarations
    00022 template <class TYPE> class SvcFactory;
    00023 namespace { template <class P, class S> class Factory; }
    00024
    00025 class IRndmGenFactory;
    00026 class IMessageSvc;
    00027 class IFactory;
    00028
    00029
    00054 class RndmGenSvc : public Service, virtual public IRndmGenSvc, virtual public IRndmEngine, virtual public ISerialize  {
    00055 private:
    00056   friend class Factory<RndmGenSvc,IService* (std::string,ISvcLocator *)>;
    00058   mutable IRndmEngine* m_engine;
    00060   mutable ISerialize*  m_serialize;
    00062   std::string          m_engineName;
    00063 public:
    00065   RndmGenSvc(const std::string& name, ISvcLocator* svc);
    00067   virtual ~RndmGenSvc();
    00068 public:
    00070   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
    00072   virtual StatusCode initialize();
    00074   virtual StatusCode finalize();
    00076
    00077   virtual StreamBuffer& serialize(StreamBuffer& str);
    00079   virtual StreamBuffer& serialize(StreamBuffer& str) const;
    00081   virtual IRndmEngine* engine();
    00083   virtual StatusCode generator(const IRndmGen::Param& par, IRndmGen*& refpGen);
    00085   virtual double rndm() const;
    00092   virtual StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0) const;
    00094   virtual StatusCode setSeeds(const std::vector<long>& seeds);
    00096   virtual StatusCode seeds(std::vector<long>& seeds)  const;
    00097 };
    00098
    00099 #endif // GAUDI_RANDOMGENSVC_RNDMGENSVC_H