ATLAS Offline Software
AtRanluxGenSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/ISvcLocator.h"
6 #include "GaudiKernel/IIncidentSvc.h"
7 #include "GaudiKernel/Incident.h"
8 #include "GaudiKernel/DataIncident.h"
9 #include "GaudiKernel/ServiceHandle.h"
10 
11 #include "CLHEP/Random/Ranlux64Engine.h"
12 #include "CLHEP/Random/RandGauss.h"
13 
14 #include "interpretSeeds.h"
15 #include "AtRanluxGenSvc.h"
16 #include "crc_combine.h"
17 #include <cassert>
18 #include <iostream>
19 #include <algorithm>
20 
21 /*FIXME temporarily needed for old seeding scheme*/
23 
24 using namespace std;
25 
26 
27 
29 AtRanluxGenSvc::AtRanluxGenSvc(const std::string& name,ISvcLocator* svc)
30  : base_class(name,svc),
31  m_reseedingOffsets(),
32  m_engines(), m_engines_copy(),
33  m_defaultLuxLevel(1)
34 {
35  // Set Default values
36  m_default_seed1 = 3591;
37  m_default_seed2 = 2309736;
38  m_PYTHIA_default_seed1 = 93453591;
39  m_PYTHIA_default_seed2 = 73436;
40  m_HERWIG_default_seed1 = 355391;
41  m_HERWIG_default_seed2 = 97336;
42 }
43 
44 
47 {
48  engineIter i(m_engines.begin()), e(m_engines.end());
49  while (i != e) delete (i++)->second;
50 }
51 
52 
55 {
57  ("Initializing " << name()
58  << "\n INITIALISING RANDOM NUMBER STREAMS. ");
59 
61  ServiceHandle<IIncidentSvc> pIncSvc("IncidentSvc", name());
62 
63  // set up the incident service:
64  ATH_CHECK( pIncSvc.retrieve() );
65 
66  //start listening to "EndEvent"
67  static const int PRIORITY = 100;
68  pIncSvc->addListener(this, "EndEvent", PRIORITY);
69  pIncSvc->addListener(this, "AfterReseedIncident", PRIORITY);
70 
71  //and to BeginEvent if we are reseeding
72  if (m_eventReseed) {
73  ATH_MSG_INFO ("will be reseeded for every event");
74  pIncSvc->addListener(this, "BeginEvent", PRIORITY);
75  pIncSvc->addListener(this, "ReseedIncident", PRIORITY);
76  }
77  pIncSvc.release().ignore();
78 
79 
80  //3 is not valid for ranlux, but whatever, that's what we had before...
81  if (m_useOldBrokenSeeding) m_defaultLuxLevel = 3;
82 
83  if (m_read_from_file) {
84  // Read from a file
85  ifstream infile( m_file_to_read.value().c_str() );
86  if ( !infile ) {
87  ATH_MSG_ERROR (" Unable to open: " << m_file_to_read.value());
88  return StatusCode::FAILURE;
89  } else {
90  std::string buffer;
91  while (std::getline(infile, buffer)) {
92  string stream;
93  std::vector<uint32_t> seeds;
94  //split the space-separated string in 3 words:
95  if (interpretSeeds(buffer, stream, seeds)) {
96  msg (MSG::DEBUG)
97  << " INITIALISING " << stream << " stream with seeds ";
98  for (std::vector<uint32_t>::const_iterator i = seeds.begin(); i != seeds.end(); ++i){
99  // The state returned is a set of 32-bit numbers.
100  // On 64-bit platforms, though, the vector holds 64-bit ints.
101  // For the first word, one gets garbage in the high 32 bits.
102  // (This is because the crc32 routine used in clhep
103  // to hash the engine names doesn't mask down to 32 bits.)
104  // So mask off the garbage so that we get consistent results
105  // across platforms.
106  msg() << ((*i) & 0xffffffffu) << " ";
107  }
108  msg() << " read from file " << m_file_to_read.value() << endmsg;
109  if (CreateStream(seeds, stream)) {
110  msg(MSG::DEBUG)
111  << stream << " stream initialized succesfully" <<endmsg;
112  } else {
113  msg(MSG::ERROR)
114  << stream << " stream FAILED to initialize" <<endmsg;
115  return StatusCode::FAILURE;
116  }
117  } else {
118  msg(MSG::ERROR)
119  << "bad line\n" << buffer
120  << "\n in input file " << m_file_to_read.value() << endmsg;
121  return StatusCode::FAILURE;
122  }
123  }
124 
125  }
126  }
127  // Create the various streams according to user's request
128  //for (VStrings::const_iterator i = m_streams_seeds.begin(); i != m_streams_seeds.end(); ++i) {
129  for (const auto& i : m_streams_seeds) {
130  string stream;
131  uint32_t seed1, seed2, offset(0);
132  //parse the stream property string
133  short ll(m_defaultLuxLevel); // temp copy so we don't overwrite default
134  if (interpretSeeds(i, stream, seed1, seed2, ll, offset)) {
135  ATH_MSG_VERBOSE("Seeds property: stream " << stream
136  << " seeds " << seed1 << ' ' << seed2
137  << ", luxury level " << ll
138  << ", reseeding offset " << offset);
139  } else {
140  ATH_MSG_ERROR("bad Seeds property\n" << i);
141  return StatusCode::FAILURE;
142  }
143 
144  // Check if stream already generated (e.g. from reading a file)
145  bool not_found(true);
146  if ( number_of_streams() != 0 ) {
148  while (sf != end() && (not_found=((*sf).first != stream))) ++sf;
149  }
150 
151  if (not_found) {
153  (" INITIALISING " << stream << " stream with seeds "
154  << seed1 << " " << seed2);
155  createStream(seed1, seed2, stream, ll);
156  if (m_eventReseed) {
157  m_reseedingOffsets.insert(std::make_pair(stream, offset));
158  // apply the offset we just inserted
159  ATH_MSG_DEBUG("Applying reseeding offset " << offset <<
160  " to stream " << stream);
161  this->setOnDefinedSeeds(seed1, seed2, stream);
162  }
163  }
164 
165  }
166  return StatusCode::SUCCESS;
167 }
168 
169 void
170 AtRanluxGenSvc::handle(const Incident &inc) {
171  ATH_MSG_DEBUG (" Handle EndEvent ");
172 
173  if ( inc.type() == "EndEvent" ||
174  inc.type() == "AfterReseedIncident" )
175  {
176 
177  m_engines_copy.clear();
178  engineConstIter iE(begin()), eE(end());
179  while(iE != eE) {
180  CLHEP::HepRandomEngine* engine = GetEngine(iE->first);
181  std::vector<unsigned long> v = engine->put();
182  std::vector<uint32_t> tseeds(v.size());
183  for (size_t i=0; i<v.size(); ++i) {
184  // The state returned is a set of 32-bit numbers.
185  // On 64-bit platforms, though, the vector holds 64-bit ints.
186  // For the first word, one gets garbage in the high 32 bits.
187  // (This is because the crc32 routine used in clhep
188  // to hash the engine names doesn't mask down to 32 bits.)
189  // Mask off the garbage to get consistent results
190  // across platforms.
191  tseeds[i] = (v[i] & 0xffffffffu);
192  }
193  m_engines_copy.insert(std::make_pair(iE->first, tseeds));
194  ++iE;
195  }
196 
197  print();
198  } else if (inc.type() == "BeginEvent") {
199  ATH_MSG_DEBUG (" Handle BeginEvent ");
200  EventContext context = inc.context();
201  const EventIDBase& ei = context.eventID();
202  //clear static RandGauss cache (generates two numbers per call to shoot()
204  //loop over generator streams, combining the stream name to the hash
205  vector<string>::const_iterator i(m_reseedStreamNames.begin());
206  vector<string>::const_iterator e(m_reseedStreamNames.end());
207  //by default (when no streams are specified in streamNames, seed all
208  //streams
209  if (i == e) {
210  if (!(this->setAllOnDefinedSeeds(ei.event_number(),
211  ei.run_number())))
212  throw GaudiException("can not reseed all streams ", name(), StatusCode::FAILURE);
213  } else {
214  while (i != e) {
215  const string& strName(*i++);
216  if (0 == this->setOnDefinedSeeds(ei.event_number(),
217  ei.run_number(),
218  strName)) {
219  throw GaudiException(string("can not reseed stream ") + strName,
220  name(), StatusCode::FAILURE);
221  } else {
222  msg() << MSG::VERBOSE << "Reseeded stream " << strName
223  << " for random service " << endmsg;
224  }
225  }
226  }
227  }
228  else if (inc.type() == "ReseedIncident") {
229  typedef ContextIncident<std::pair<unsigned,unsigned> > Ctxt;
230  const Ctxt* incident = dynamic_cast<const Ctxt*>(&inc);
231  const std::pair<unsigned,unsigned>& data = incident->tag();
232  //clear static RandGauss cache (generates two numbers per call to shoot()
234  //loop over generator streams, combining the stream name to the hash
235  vector<string>::const_iterator i(m_reseedStreamNames.begin());
236  vector<string>::const_iterator e(m_reseedStreamNames.end());
237  //by default (when no streams are specified in streamNames, seed all
238  //streams
239  if (i == e) {
240  if (!(this->setAllOnDefinedSeeds(data.first,
241  data.second)))
242  throw GaudiException("can not reseed all streams ", name(), StatusCode::FAILURE);
243  } else {
244  while (i != e) {
245  const string& strName(*i++);
246  if (0 == this->setOnDefinedSeeds(data.first,
247  data.second,
248  strName)) {
249  throw GaudiException(string("can not reseed stream ") + strName,
250  name(), StatusCode::FAILURE);
251  } else {
252  msg() << MSG::VERBOSE << "Reseeded stream " << strName
253  << " for random service " << endmsg;
254  }
255  }
256  }
257  }
258 }
259 
260 StatusCode
262 {
263  ATH_MSG_INFO (" FINALISING ");
264 
265  if (m_save_to_file) {
266  // Write the status of the Service to file
267  std::ofstream outfile( m_file_to_write.value().c_str() );
268  if ( !outfile ) {
269  ATH_MSG_ERROR ("error: unable to open: " << m_file_to_write.value());
270  } else {
271  for (std::map<std::string, std::vector<uint32_t> >::const_iterator i = m_engines_copy.begin();
272  i != m_engines_copy.end();
273  ++i) {
274  outfile << (*i).first << " ";
275  for (std::vector<uint32_t>::const_iterator j = (*i).second.begin(); j !=(*i).second.end(); ++j){
276  outfile << (*j) << " ";
277  }
278  outfile << endl;
279  }
280  ATH_MSG_DEBUG (" wrote seeds to " << m_file_to_write.value() );
281 
282  }
283  }
284  return StatusCode::SUCCESS;
285 }
286 
287 CLHEP::HepRandomEngine*
288 AtRanluxGenSvc::GetEngine ( const std::string& StreamName )
289 {
290  engineConstIter citer = m_engines.find(StreamName);
291  if ( citer == m_engines.end() )
292  {
293  m_engines.insert( engineValType( StreamName, new CLHEP::Ranlux64Engine() ) );
294  SetStreamSeeds ( StreamName );
295  }
296 
297  engineIter iter = m_engines.find(StreamName);
298  return (CLHEP::HepRandomEngine*)(*iter).second;
299 }
300 
301 void
303  const std::string& streamName) {
304  createStream(seed1, seed2, streamName, m_defaultLuxLevel);
305 }
306 
307 void
309  const std::string& streamName, short luxLevel )
310 {
311  uint32_t seeds[2] = { seed1, seed2 };
312  const uint32_t* s = seeds;
313  engineConstIter citer = m_engines.find(streamName);
314  if ( citer == m_engines.end() )
315  m_engines.insert(engineValType(streamName,
316  new CLHEP::Ranlux64Engine(s[0], luxLevel)));
317  engineIter iter = m_engines.find(streamName);
318  ((*iter).second)->setSeed(s[0], luxLevel);
319 }
320 
321 bool
322 AtRanluxGenSvc::CreateStream(const std::vector<uint32_t>& seeds,
323  const std::string& streamName)
324 {
325  engineConstIter citer = m_engines.find(streamName);
326  if ( citer == m_engines.end() )
327  m_engines.insert(engineValType(streamName,
328  new CLHEP::Ranlux64Engine() ) );
329  engineIter iter = m_engines.find(streamName);
330  std::vector<unsigned long> longSeeds(seeds.size());
331  for (size_t i=0; i<seeds.size(); ++i) longSeeds[i]=seeds[i];
332  return (((*iter).second)->getState( longSeeds ));
333 }
334 
335 void
337 {
338  uint32_t seed1;
339  uint32_t seed2;
340  if (StreamName == "PYTHIA")
341  {
342  seed1 = m_PYTHIA_default_seed1;
343  seed2 = m_PYTHIA_default_seed2;
344  }
345  else if (StreamName == "HERWIG")
346  {
347  seed1 = m_HERWIG_default_seed1;
348  seed2 = m_HERWIG_default_seed2;
349  }
350  else
351  {
352  seed1 = m_default_seed1;
353  seed2 = m_default_seed2;
354  }
356  (" INITIALISING " << StreamName << " stream with DEFAULT seeds "
357  << seed1 << " " << seed2);
358 
359  uint32_t seeds[2] = { seed1, seed2 };
360  const uint32_t* s = seeds;
361  engineIter iter = m_engines.find(StreamName);
362  ((*iter).second)->setSeed(s[0]); //FIXME no need to set luxLevel?
363 }
364 
365 void
366 AtRanluxGenSvc::print(const std::string& StreamName )
367 {
368  engineConstIter citer = m_engines.find(StreamName);
369  if ( citer == m_engines.end() ) {
370  ATH_MSG_WARNING (" Stream = " << StreamName << " NOT FOUND");
371  } else {
372  std::vector<unsigned long> v = ((*citer).second)->put();
373  msg(MSG::INFO) << " Stream = " << StreamName << " ";
374  for (std::vector<unsigned long>::const_iterator i = v.begin(); i != v.end(); ++i){
375  // The state returned is a set of 32-bit numbers.
376  // On 64-bit platforms, though, the vector holds 64-bit ints.
377  // For the first word, one gets garbage in the high 32 bits.
378  // (This is because the crc32 routine used in clhep
379  // to hash the engine names doesn't mask down to 32 bits.)
380  // So mask off the garbage so that we get consistent results
381  // across platforms.
382  msg() << ((*i) & 0xffffffffu) << " ";
383  }
384  msg() << endmsg;
385  }
386 }
387 
388 void
389 AtRanluxGenSvc::print ( void )
390 {
391  for (engineConstIter i = m_engines.begin(); i != m_engines.end(); ++i)
392  print( (*i).first );
393 }
394 
395 CLHEP::HepRandomEngine*
397  const std::string& streamName)
398 {
399  if (m_useOldBrokenSeeding)
400  return oldSetOnDefinedSeeds(eventNumber, runNumber, streamName);
401  // do it properly
402  uint32_t theHash(eventNumber);
403  map<string, uint32_t>::const_iterator citer(m_reseedingOffsets.find(streamName));
404  bool hasOffset(citer != m_reseedingOffsets.end() && 0 != citer->second);
405  if (hasOffset) theHash=crc_combine(theHash, citer->second);
406 
407  theHash=crc_combine(theHash, runNumber);
408  ATH_MSG_VERBOSE( "Reseeding stream " << streamName
409  << " with eventNumber " << eventNumber
410  << " runNumber " << runNumber);
411  if (hasOffset) ATH_MSG_VERBOSE("Applied offset " << citer->second);
412  return this->setOnDefinedSeeds(theHash, streamName);
413 }
414 
415 CLHEP::HepRandomEngine*
417  const std::string& streamName){
418  if (m_useOldBrokenSeeding)
419  return oldSetOnDefinedSeeds(theSeed, streamName);
420  //do it propertly
421  engineConstIter citer = m_engines.find(streamName);
423  if ( citer == m_engines.end() )
424  m_engines.insert(engineValType(streamName,
425  new CLHEP::Ranlux64Engine() ) );
426 
427  engineIter iter = m_engines.find(streamName);
428  theSeed=crc_combine(theSeed, streamName);
429  ATH_MSG_DEBUG("Reseeding stream " << streamName << " with " << theSeed);
430  CLHEP::Ranlux64Engine* eng = (*iter).second;
431  //Ranlux64 takes a long as seed and makes a test on the sign of the seed
432  //so let's make sure that our seed is presented to Ranlux64 as a 32 bit
433  //signed int
434  eng->setSeed( (int32_t)theSeed, eng->getLuxury() );
435  return (CLHEP::HepRandomEngine*)eng;
436 }
437 
438 
439 CLHEP::HepRandomEngine*
441  const std::string& streamName)
442 {
443  engineConstIter citer = m_engines.find(streamName);
444  if ( citer == m_engines.end() )
445  m_engines.insert( engineValType(streamName, new CLHEP::Ranlux64Engine() ) );
446  engineIter iter = m_engines.find(streamName);
447  int hashedStream(SG::simpleStringHash(streamName));
448  long seeds[2] = { (long)(1000*runNumber + hashedStream),
449  (long)eventNumber };
450  assert( seeds[0] > 0 );
451  assert( seeds[1] > 0 );
452  const long* s = seeds;
453  ((*iter).second)->setSeed( s[0], m_defaultLuxLevel);
454  return (CLHEP::HepRandomEngine*)(*iter).second;
455 }
456 
457 CLHEP::HepRandomEngine*
459  const std::string& streamName){
460  engineConstIter citer = m_engines.find(streamName);
461  if ( citer == m_engines.end() )
462  m_engines.insert( engineValType(streamName, new CLHEP::Ranlux64Engine() ) );
463  engineIter iter = m_engines.find(streamName);
464  int hashedStream(SG::simpleStringHash(streamName));
465  long seeds[2] = { (long)(hashedStream % (theSeed+13)),
466  (long)theSeed };
467  assert( seeds[0] > 0 );
468  assert( seeds[1] > 0 );
469  const long* s = seeds;
470  ((*iter).second)->setSeed( s[0], m_defaultLuxLevel );
471  return (CLHEP::HepRandomEngine*)(*iter).second;
472 }
473 
474 
475 bool
477 {
478  bool allOK(true);
479  engineIter i(m_engines.begin()), e(m_engines.end());
480  while (i!=e &&
481  (allOK=(0 != this->setOnDefinedSeeds(eventNumber,
482  runNumber,
483  (*i++).first)))) {
484  /*empty*/
485  }
486  return allOK;
487 }
488 
489 bool
491  bool allOK(true);
492  engineIter i(m_engines.begin()), e(m_engines.end());
493  while (i!=e &&
494  (allOK=(0 != this->setOnDefinedSeeds(theSeed, (*i++).first)))) {
495  /*empty*/
496  }
497  return allOK;
498 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
AtRanluxGenSvc::finalize
virtual StatusCode finalize() override
Definition: AtRanluxGenSvc.cxx:261
run.infile
string infile
Definition: run.py:13
AtRanluxGenSvc::m_HERWIG_default_seed1
uint32_t m_HERWIG_default_seed1
Definition: AtRanluxGenSvc.h:157
detail::ll
long long ll
Definition: PrimitiveHelpers.h:46
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AtRanluxGenSvc::AtRanluxGenSvc
AtRanluxGenSvc(const std::string &name, ISvcLocator *svc)
Standard Gaudi Constructor.
Definition: AtRanluxGenSvc.cxx:29
AtRanluxGenSvc::initialize
virtual StatusCode initialize() override
Definition: AtRanluxGenSvc.cxx:54
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
hash_functions.h
AtRanluxGenSvc::SetStreamSeeds
void SetStreamSeeds(const std::string &streamName)
Definition: AtRanluxGenSvc.cxx:336
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
AtRanluxGenSvc::~AtRanluxGenSvc
virtual ~AtRanluxGenSvc()
Standard Destructor.
Definition: AtRanluxGenSvc.cxx:46
AtRanluxGenSvc::createStream
void createStream(uint32_t seed1, uint32_t seed2, const std::string &streamName, short luxLevel)
allows to specify luxLevel
Definition: AtRanluxGenSvc.cxx:308
AtRanluxGenSvc::print
virtual void print(void) override
crc_combine.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AtRanluxGenSvc::engineConstIter
engineMap::const_iterator engineConstIter
Definition: AtRanluxGenSvc.h:70
genPbPbJobOpt.seed2
seed2
Definition: genPbPbJobOpt.py:57
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AtRanluxGenSvc::CreateStream
virtual void CreateStream(uint32_t seed1, uint32_t seed2, const std::string &streamName) override
crc_combine
uint32_t crc_combine(uint32_t seed, uint32_t v)
using crc32 for architecture independence in combining the seeds
Definition: AthenaKernel/src/crc_combine.h:11
AtRanluxGenSvc.h
The default ATLAS random number engine manager, based on Ranlux64.
AtRanluxGenSvc::m_PYTHIA_default_seed2
uint32_t m_PYTHIA_default_seed2
Definition: AtRanluxGenSvc.h:156
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EventInfoWrite.StreamName
string StreamName
Definition: EventInfoWrite.py:28
lumiFormat.i
int i
Definition: lumiFormat.py:85
AtRanluxGenSvc::m_HERWIG_default_seed2
uint32_t m_HERWIG_default_seed2
Definition: AtRanluxGenSvc.h:158
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
interpretSeeds
bool interpretSeeds(const std::string &buffer, std::string &stream, uint32_t &seed1, uint32_t &seed2, short &luxury, uint32_t &offset)
Definition: interpretSeeds.cxx:28
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
interpretSeeds.h
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
HLT::setFlag
void setFlag(TrigPassFlags *flags, const T *obj, const CONTAINER *container, const std::vector< bool > &flag)
Set the flag at index position.
Definition: TrigPassFlags.h:121
AtRanluxGenSvc::setOnDefinedSeeds
virtual CLHEP::HepRandomEngine * setOnDefinedSeeds(uint32_t theSeed, const std::string &streamName) override
AtRanluxGenSvc::oldSetOnDefinedSeeds
CLHEP::HepRandomEngine * oldSetOnDefinedSeeds(uint32_t theSeed, const std::string &streamName)
broken, temporarily keep for backward compatibility
Definition: AtRanluxGenSvc.cxx:458
AtRanluxGenSvc::m_PYTHIA_default_seed1
uint32_t m_PYTHIA_default_seed1
Definition: AtRanluxGenSvc.h:155
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtRanluxGenSvc::handle
virtual void handle(const Incident &) override
IIncidentListener implementation. Handles EndEvent incident.
Definition: AtRanluxGenSvc.cxx:170
AtRanluxGenSvc::m_default_seed2
uint32_t m_default_seed2
Definition: AtRanluxGenSvc.h:154
AtRanluxGenSvc::setAllOnDefinedSeeds
virtual bool setAllOnDefinedSeeds(uint32_t theSeed) override
seed all streams we manage, combining theSeed and the stream names
python.PyAthena.v
v
Definition: PyAthena.py:154
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
AtRanluxGenSvc::m_default_seed1
uint32_t m_default_seed1
Definition: AtRanluxGenSvc.h:153
AtRanluxGenSvc::engineValType
engineMap::value_type engineValType
Definition: AtRanluxGenSvc.h:71
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:536
DEBUG
#define DEBUG
Definition: page_access.h:11
genPbPbJobOpt.seed1
seed1
Definition: genPbPbJobOpt.py:56
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::simpleStringHash
int simpleStringHash(const std::string &str, int maxInt=0xFFFF)
simple hash function derived from Sedgewick Algorithms in C++ 3rd ed
Definition: hash_functions.h:16
AtRanluxGenSvc::engineIter
engineMap::iterator engineIter
Definition: AtRanluxGenSvc.h:69
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AtRanluxGenSvc::GetEngine
virtual CLHEP::HepRandomEngine * GetEngine(const std::string &streamName) override
Definition: AtRanluxGenSvc.cxx:288
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
ServiceHandle< IIncidentSvc >