9#ifndef BESKERNEL_IBESRNDMGENSVC_H
10 #include "BesKernel/IBesRndmGenSvc.h"
12#ifndef GAUDIKERNEL_IINCIDENTLISTENER_H
13 #include "GaudiKernel/IIncidentListener.h"
15#ifndef GAUDIKERNEL_SERVICE_H
16 #include "GaudiKernel/Service.h"
19#ifndef KERNEL_STATUSCODES_H
20 #include "GaudiKernel/StatusCode.h"
24#include "CLHEP/Random/RanecuEngine.h"
25#include "CLHEP/Random/RanluxEngine.h"
35 virtual public IIncidentListener,
41 CLHEP::HepRandomEngine*
GetEngine (
const std::string& StreamName );
47 typedef std::map<std::string, CLHEP::RanluxEngine*>
engineMap;
61 void print (
const std::string& StreamName );
66 const std::string& StreamName);
72 virtual StatusCode
queryInterface(
const InterfaceID& riid,
void** ppvInterface );
81 typedef std::vector< std::string > VStrings;
82 VStrings m_streams_seeds;
85 std::map<std::string, std::vector<long int> > m_engines_copy;
87 bool m_read_from_file;
88 std::string m_file_to_read;
96 long m_EVTGEN_default_seed;
97 long m_PYTHIA_default_seed;
98 long m_HERWIG_default_seed;
99 long m_LUNDCRM_default_seed;
100 long m_SIM_default_seed;
101 long m_MIX_default_seed;
102 long m_KKMC_default_seed;
103 std::string m_StreamName;
104 std::string Stream_EVTGEN;
105 std::string Stream_PYTHIA;
106 std::string Stream_HERWIG;
107 std::string Stream_LUNDCRM;
108 std::string Stream_SIM;
109 std::string Stream_MIX;
110 std::string Stream_KKMC;
113 void SetStreamSeeds (
const std::string& StreamName );
129{
return m_engines->begin(); }
133{
return m_engines->end(); }
137{
return m_engines->size(); }
StatusCode initialize()
Gaudi Service Implementation.
BesRndmGenSvc(const std::string &name, ISvcLocator *svc)
engineConstIter begin(void) const
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
CLHEP::HepRandomEngine * GetEngine(const std::string &StreamName)
Interface to the CLHEP engine.
void handle(const Incident &)
IIncidentListener implementation. Handles EndEvent incident.
void CreateStream(long seed, const std::string &StreamName)
engineConstIter begin(void) const
std::map< std::string, CLHEP::RanluxEngine * > engineMap
CLHEP engines typedefs:
engineConstIter end(void) const
engineMap::const_iterator engineConstIter
CLHEP::HepRandomEngine * setOnDefinedSeeds(int EventNumber, const std::string &StreamName)
set the seeds for an engine. First param will usually be the event number
engineMap::value_type engineValType
unsigned int number_of_streams(void) const
void print(const std::string &StreamName)
Print methods.
engineConstIter end(void) const
engineMap::iterator engineIter
manage multiple CLHEP random engines as named streams
Forward and external declarations.