1"""Define functions to construct random number services
3Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
9AtDSFMTGenSvc,AtRanluxGenSvc,AtRndmGenSvc,AthRNGSvc=\
10CompFactory.getComps(
"AtDSFMTGenSvc",
"AtRanluxGenSvc",
"AtRndmGenSvc",
"AthRNGSvc")
14 "dSFMT" :
"AtDSFMTGenSvc",
15 "Ranlux64" :
"AtRanluxGenSvc",
16 "Ranecu" :
"AtRndmGenSvc",
19def dSFMT(seed, name="AtDSFMTGenSvc"):
20 """Return a ComponentAccumulator containing an AtDSFMTGenSvc with seed"""
21 acc = ComponentAccumulator()
23 service.Seeds.append(seed)
24 acc.addService(service, primary=
True)
28 """Return a ComponentAccumulator containing an AtRanluxGenSvc with seed"""
29 acc = ComponentAccumulator()
31 service.Seeds.append(seed)
32 acc.addService(service, primary=
True)
35def Ranecu(seed, name="AtRndmGenSvc"):
36 """Return a ComponentAccumulator containing an AtRndmGenSvc with seed"""
37 acc = ComponentAccumulator()
39 service.Seeds.append(seed)
40 acc.addService(service, primary=
True)
43def RNG(engine="dSFMT", name="AthRNGSvc"):
44 """Return a ComponentAccumulator containing an AthRNGSvc"""
45 acc = ComponentAccumulator()
47 service.EngineType = engine
48 acc.addService(service, primary=
True)
52 """Return a ComponentAccumulator containing an AthRNGSvc"""
53 acc = ComponentAccumulator()
55 service.EngineType = flags.Random.Engine
56 acc.addService(service, primary=
True)
A random number engine manager, based on dSFMT.
The default ATLAS random number engine manager, based on Ranlux64.
A random number engine manager, based on Ranecu.
A service to manage multiple RNG streams in thread-safe way.
AthRNGSvcCfg(flags, name="AthRNGSvc")
Ranlux64(seed, name="AtRanluxGenSvc")
Ranecu(seed, name="AtRndmGenSvc")
RNG(engine="dSFMT", name="AthRNGSvc")
dSFMT(seed, name="AtDSFMTGenSvc")