Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #ifndef ATDSFMTGENSVC_H
7 #define ATDSFMTGENSVC_H
19 #include "GaudiKernel/IIncidentListener.h"
22 #include "CLHEP/Random/RandomEngine.h"
23 #include "Gaudi/Property.h"
51 class AtDSFMTGenSvc :
public extends<AthService, IAtRndmGenSvc, IIncidentListener>
62 typedef std::map<std::string, CLHEP::HepRandomEngine*>
engineMap;
73 virtual void print (
void )
override;
89 virtual void handle(
const Incident&)
override;
96 "seeds for the engines, this is a vector of strings of the form "\
97 "['SequenceName [OFFSET num] Seed1 Seed2', ...] where OFFSET is an "\
98 "optional integer that allows to change the sequence of randoms for a "\
99 "given run/event no and SequenceName combination. Notice that "\
100 "Seed1/Seed2 are dummy when EventReseeding is used",
101 "OrderedSet<std::string>"};
104 Gaudi::Property<bool>
m_read_from_file{
this,
"ReadFromFile",
false,
"set/restore the status of the engine from file"};
106 "name of a ASCII file, usually produced by AtDSFMTGenSvc itself at the end of a job, containing the information to fully set/restore the status"
108 Gaudi::Property<bool>
m_save_to_file{
this,
"SaveToFile",
true,
"save the status of the engine to file"};
110 "name of an ASCII file which will be produced on finalize, containing the information to fully set/restore the status"};
112 Gaudi::Property<bool>
m_eventReseed{
this,
"EventReseeding",
true,
"reseed every event using a hash of run and event numbers"};
113 StringArrayProperty
m_reseedStreamNames{
this,
"ReseedStreamNames",{},
"the streams we are going to set the seeds of (default: all streams)"};
160 #endif // ATDSFMTGENSVC_H
JetConstituentVector::iterator iterator
AtDSFMTGenSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
engineMap::iterator engineIter
long m_PYTHIA_default_seed2
virtual void handle(const Incident &) override
IIncidentListener implementation. Handles EndEvent incident.
std::map< std::string, std::vector< uint32_t > > m_engines_copy
Random engine copy (for output to a file)
engineMap::const_iterator engineConstIter
Gaudi::Property< bool > m_save_to_file
should current engine status be saved to file ?
virtual bool setAllOnDefinedSeeds(uint32_t theSeed) override
seed all streams we manage, combining theSeed and the stream names
virtual void CreateStream(uint32_t seed1, uint32_t seed2, const std::string &streamName) override
virtual void print(void) override
Gaudi::Property< bool > m_read_from_file
read engine status from file
std::map< std::string, CLHEP::HepRandomEngine * > engineMap
CLHEP engines typedefs:
virtual CLHEP::HepRandomEngine * GetEngine(const std::string &streamName) override
unsigned int number_of_streams(void) const
virtual StatusCode finalize() override
Gaudi::Property< bool > m_eventReseed
reseed for every event
void SetStreamSeeds(const std::string &StreamName)
long m_PYTHIA_default_seed1
virtual StatusCode initialize() override
engineConstIter end(void) const
A random number engine manager, based on dSFMT.
Gaudi::Property< std::string > m_file_to_read
name of the file to read the engine status from
::StatusCode StatusCode
StatusCode definition for legacy code.
StringArrayProperty m_reseedStreamNames
streams to be reseeded for every event
std::map< std::string, uint32_t > m_reseedingOffsets
optional offsets to combine to run/evt no when reseeding.
long m_HERWIG_default_seed1
virtual CLHEP::HepRandomEngine * setOnDefinedSeeds(uint32_t theSeed, const std::string &streamName) override
AthROOTErrorHandlerSvc * svc
engineConstIter begin(void) const
virtual ~AtDSFMTGenSvc()
Standard Destructor.
engineMap::value_type engineValType
StringArrayProperty m_streams_seeds
seeds for the engines, this is a vector of strings of the form "EnginName Seed1 Seed2"
long m_HERWIG_default_seed2
Gaudi::Property< std::string > m_file_to_write
name of the file to save the engine status to.