| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# 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 extends3<Service, IRndmGenSvc, IRndmEngine, 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   virtual StatusCode initialize();
    00072   virtual StatusCode finalize();
    00074
    00075   virtual StreamBuffer& serialize(StreamBuffer& str);
    00077   virtual StreamBuffer& serialize(StreamBuffer& str) const;
    00079   virtual IRndmEngine* engine();
    00081   virtual StatusCode generator(const IRndmGen::Param& par, IRndmGen*& refpGen);
    00083   virtual double rndm() const;
    00090   virtual StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0) const;
    00092   virtual StatusCode setSeeds(const std::vector<long>& seeds);
    00094   virtual StatusCode seeds(std::vector<long>& seeds)  const;
    00095 };
    00096
    00097 #endif // GAUDI_RANDOMGENSVC_RNDMGENSVC_H