ATLAS Offline Software
List of all members
AtRndmGenSvc Class Reference

A random number engine manager, based on Ranecu. Its usage is deprecated, at least when high quality sequences of randoms are required (Ranecu period has been shown to be too short, and sensitive to the quality of initial seeds). More...

#include <AtRndmGenSvc.h>

Inheritance diagram for AtRndmGenSvc:
Collaboration diagram for AtRndmGenSvc:

Public Member Functions

Stream access
engineConstIter begin (void) const
 
engineConstIter end (void) const
 
unsigned int number_of_streams (void) const
 
virtual void print (const std::string &streamName) override
 
virtual void print (void) override
 
virtual CLHEP::HepRandomEngine * setOnDefinedSeeds (uint32_t theSeed, const std::string &streamName) override
 
virtual CLHEP::HepRandomEngine * setOnDefinedSeeds (uint32_t eventNumber, uint32_t runNumber, const std::string &streamName) override
 
CLHEP::HepRandomEngine * oldSetOnDefinedSeeds (uint32_t theSeed, const std::string &streamName)
 broken, temporarily keep for backward compatibility More...
 
CLHEP::HepRandomEngine * oldSetOnDefinedSeeds (uint32_t eventNumber, uint32_t runNumber, const std::string &streamName)
 broken, temporarily keep for backward compatibility More...
 
virtual bool setAllOnDefinedSeeds (uint32_t theSeed) override
 seed all streams we manage, combining theSeed and the stream names More...
 
virtual bool setAllOnDefinedSeeds (uint32_t eventNumber, uint32_t runNumber) override
 seed all streams, combining eventNumber, runNumber and the stream names More...
 
Gaudi Service Implementation
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual void handle (const Incident &) override
 IIncidentListener implementation. Handles EndEvent incident. More...
 

Private Attributes

Properties
Gaudi::Property< bool > m_useOldBrokenSeeding {this,"UseOldBrokenSeeding",false}
 backward compatibility only, broken 32/64 bits More...
 
StringArrayProperty m_streams_seeds
 
Gaudi::Property< bool > m_read_from_file {this,"ReadFromFile",false,"set/restore the status of the engine from file"}
 read engine status from file More...
 
Gaudi::Property< std::string > m_file_to_read
 name of the file to read the engine status from More...
 
Gaudi::Property< bool > m_save_to_file {this,"SaveToFile", true,"save the status of the engine to file"}
 should current engine status be saved to file ? More...
 
Gaudi::Property< std::string > m_file_to_write
 name of the file to save the engine status to. More...
 
Gaudi::Property< bool > m_eventReseed {this,"EventReseeding",true,"reseed every event using a hash of run and event numbers"}
 reseed for every event More...
 
StringArrayProperty m_reseedStreamNames {this,"ReseedStreamNames",{}, "the streams we are going to set the seeds of (default: all streams)"}
 streams to be reseeded for every event
More...
 
std::map< std::string, uint32_t > m_reseedingOffsets
 optional offsets to combine to run/evt no when reseeding. More...
 
engineMap m_engines
 
std::map< std::string, std::vector< long int > > m_engines_copy
 Random engine copy (for output to a file) More...
 

Interface to the CLHEP engine

typedef std::map< std::string, CLHEP::RanecuEngine * > engineMap
 CLHEP engines typedefs: More...
 
typedef engineMap::iterator engineIter
 
typedef engineMap::const_iterator engineConstIter
 
typedef engineMap::value_type engineValType
 
virtual CLHEP::HepRandomEngine * GetEngine (const std::string &streamName) override
 
virtual void CreateStream (uint32_t seed1, uint32_t seed2, const std::string &streamName) override
 

Default seed values

long m_default_seed1
 
long m_default_seed2
 
long m_PYTHIA_default_seed1
 
long m_PYTHIA_default_seed2
 
long m_HERWIG_default_seed1
 
long m_HERWIG_default_seed2
 
 AtRndmGenSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~AtRndmGenSvc ()
 Standard Destructor. More...
 
void SetStreamSeeds (const std::string &streamName)
 

Detailed Description

A random number engine manager, based on Ranecu. Its usage is deprecated, at least when high quality sequences of randoms are required (Ranecu period has been shown to be too short, and sensitive to the quality of initial seeds).

this service mantains a number of named, independent random number sequences. Each sequence is initialized by an entry of the form "SequenceName Seed1 Seed2" in the Seeds property. For example

Seeds = [ "PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532",
"JIMMY 390020611 821000366", "JIMMY_INIT 820021 2347532",
"HERWIG 390020611 821000366", "HERWIG_INIT 820021 2347532" ]

At the end of the job in AtRndmGenSvc::finalize(), the status of the engine is dumped as an array of unsigned long to the ASCII file "AtRndmGenSvc.out". This file can be used to restore the status of the engine in another job by setting the properties

ReadFromFile = true
FileToRead = path_to_ascii_file

Definition at line 56 of file AtRndmGenSvc.h.

Member Typedef Documentation

◆ engineConstIter

typedef engineMap::const_iterator AtRndmGenSvc::engineConstIter

Definition at line 69 of file AtRndmGenSvc.h.

◆ engineIter

typedef engineMap::iterator AtRndmGenSvc::engineIter

Definition at line 68 of file AtRndmGenSvc.h.

◆ engineMap

typedef std::map<std::string, CLHEP::RanecuEngine*> AtRndmGenSvc::engineMap

CLHEP engines typedefs:

Definition at line 67 of file AtRndmGenSvc.h.

◆ engineValType

typedef engineMap::value_type AtRndmGenSvc::engineValType

Definition at line 70 of file AtRndmGenSvc.h.

Constructor & Destructor Documentation

◆ AtRndmGenSvc()

AtRndmGenSvc::AtRndmGenSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Standard Constructor.

Definition at line 27 of file AtRndmGenSvc.cxx.

28  : base_class(name,svc),
31 {
32  // Set Default values
33  m_default_seed1 = 3591;
34  m_default_seed2 = 2309736;
35  m_PYTHIA_default_seed1 = 93453591;
36  m_PYTHIA_default_seed2 = 73436;
37  m_HERWIG_default_seed1 = 355391;
38  m_HERWIG_default_seed2 = 97336;
39 }

◆ ~AtRndmGenSvc()

AtRndmGenSvc::~AtRndmGenSvc ( )
virtual

Standard Destructor.

Definition at line 43 of file AtRndmGenSvc.cxx.

44 {
45  engineIter i(m_engines.begin()), e(m_engines.end());
46  while (i != e) delete (i++)->second;
47 }

Member Function Documentation

◆ begin()

AtRndmGenSvc::engineConstIter AtRndmGenSvc::begin ( void  ) const
inline

Definition at line 165 of file AtRndmGenSvc.h.

166 { return m_engines.begin(); }

◆ CreateStream()

void AtRndmGenSvc::CreateStream ( uint32_t  seed1,
uint32_t  seed2,
const std::string &  streamName 
)
overridevirtual

Definition at line 268 of file AtRndmGenSvc.cxx.

270 {
271  engineConstIter citer = m_engines.find(streamName);
272  if (citer == m_engines.end())
273  m_engines.insert(engineValType(streamName, new CLHEP::RanecuEngine()));
274  engineIter iter = m_engines.find(streamName);
275  long seeds[3] = { (long)seed1, (long) seed2, 0 };
276  ((*iter).second)->setSeeds( seeds, -1 );
277 }

◆ end()

AtRndmGenSvc::engineConstIter AtRndmGenSvc::end ( void  ) const
inline

Definition at line 169 of file AtRndmGenSvc.h.

170 { return m_engines.end(); }

◆ finalize()

StatusCode AtRndmGenSvc::finalize ( )
overridevirtual

Definition at line 232 of file AtRndmGenSvc.cxx.

233 {
234  ATH_MSG_INFO (" FINALISING ");
235 
236  if (m_save_to_file) {
237  // Write the status of the Service into a file
238  std::ofstream outfile( m_file_to_write.value().c_str() );
239  if ( !outfile ) {
240  ATH_MSG_ERROR ("error: unable to open: " << m_file_to_write.value());
241  } else {
242  for (std::map<std::string, std::vector<long int> >::const_iterator i = m_engines_copy.begin();
243  i != m_engines_copy.end();
244  ++i) {
245  outfile << (*i).first << " " << (*i).second[0] << " " << (*i).second[1] << "\n";
246  }
247  ATH_MSG_DEBUG (" wrote seeds to " << m_file_to_write.value() );
248  }
249  }
250  return StatusCode::SUCCESS;
251 }

◆ GetEngine()

CLHEP::HepRandomEngine * AtRndmGenSvc::GetEngine ( const std::string &  streamName)
overridevirtual

Definition at line 254 of file AtRndmGenSvc.cxx.

255 {
256  engineConstIter citer = m_engines.find(streamName);
257  if ( citer == m_engines.end() )
258  {
259  m_engines.insert( engineValType( streamName, new CLHEP::RanecuEngine() ) );
261  }
262 
263  engineIter iter = m_engines.find(streamName);
264  return (CLHEP::HepRandomEngine*)(*iter).second;
265 }

◆ handle()

void AtRndmGenSvc::handle ( const Incident &  inc)
overridevirtual

IIncidentListener implementation. Handles EndEvent incident.

Definition at line 150 of file AtRndmGenSvc.cxx.

150  {
151 
152  if ( inc.type() == "EndEvent" ||
153  inc.type() == "AfterReseedIncident" )
154  {
155  ATH_MSG_DEBUG (" Handle EndEvent ");
156  m_engines_copy.clear();
157  for (engineConstIter i = begin(); i != end(); ++i)
158  {
159  CLHEP::HepRandomEngine* engine = GetEngine((*i).first);
160  const long* s = engine->getSeeds();
161  std::vector<long int> tseeds;
162  tseeds.push_back(s[0]);
163  tseeds.push_back(s[1]);
164  m_engines_copy.insert(
165  std::map<std::string, std::vector<long int> >::value_type( (*i).first,
166  tseeds ) );
167  }
168  print();
169  } else if (inc.type() == "BeginEvent") {
170  ATH_MSG_DEBUG (" Handle BeginEvent ");
171  EventContext context = inc.context();
172  const EventIDBase& ei = context.eventID();
173  //clear static RandGauss cache (generates two numbers per call to shoot()
175  //loop over generator streams, combining the stream name to the hash
176  vector<string>::const_iterator i(m_reseedStreamNames.begin());
177  vector<string>::const_iterator e(m_reseedStreamNames.end());
178  //by default (when no streams are specified in streamNames, seed all
179  //streams
180  if (i == e) {
181  if (!(this->setAllOnDefinedSeeds(ei.event_number(),
182  ei.run_number())))
183  throw GaudiException("can not reseed all streams ", name(), StatusCode::FAILURE);
184  } else {
185  while (i != e) {
186  const string& strName(*i++);
187  if (0 == this->setOnDefinedSeeds(ei.event_number(),
188  ei.run_number(),
189  strName)) {
190  throw GaudiException(string("can not reseed stream ") + strName,
191  name(), StatusCode::FAILURE);
192  } else {
193  msg() << MSG::VERBOSE << "Reseeded stream " << strName
194  << " for random service " << endmsg;
195  }
196  }
197  }
198  }
199  else if (inc.type() == "ReseedIncident") {
200  typedef ContextIncident<std::pair<unsigned,unsigned> > Ctxt;
201  const Ctxt* incident = dynamic_cast<const Ctxt*>(&inc);
202  const std::pair<unsigned,unsigned>& data = incident->tag();
203  //clear static RandGauss cache (generates two numbers per call to shoot()
205  //loop over generator streams, combining the stream name to the hash
206  vector<string>::const_iterator i(m_reseedStreamNames.begin());
207  vector<string>::const_iterator e(m_reseedStreamNames.end());
208  //by default (when no streams are specified in streamNames, seed all
209  //streams
210  if (i == e) {
211  if (!(this->setAllOnDefinedSeeds(data.first,
212  data.second)))
213  throw GaudiException("can not reseed all streams ", name(), StatusCode::FAILURE);
214  } else {
215  while (i != e) {
216  const string& strName(*i++);
217  if (0 == this->setOnDefinedSeeds(data.first,
218  data.second,
219  strName)) {
220  throw GaudiException(string("can not reseed stream ") + strName,
221  name(), StatusCode::FAILURE);
222  } else {
223  msg() << MSG::VERBOSE << "Reseeded stream " << strName
224  << " for random service " << endmsg;
225  }
226  }
227  }
228  }
229 }

◆ initialize()

StatusCode AtRndmGenSvc::initialize ( )
overridevirtual

Incident Service

Definition at line 51 of file AtRndmGenSvc.cxx.

52 {
54  ("Initializing " << name()
55  << "\n INITIALISING RANDOM NUMBER STREAMS. ");
56 
57 
59  ServiceHandle<IIncidentSvc> pIncSvc("IncidentSvc", name());
60 
61  // set up the incident service:
62  ATH_CHECK( pIncSvc.retrieve() );
63 
64  //start listening to "EndEvent"
65  static const int PRIORITY = 100;
66  pIncSvc->addListener(this, "EndEvent", PRIORITY);
67  pIncSvc->addListener(this, "AfterReseedIncident", PRIORITY);
68 
69  //and to BeginEvent if we are reseeding
70  if (m_eventReseed) {
71  ATH_MSG_INFO ("will be reseeded for every event");
72  pIncSvc->addListener(this, "BeginEvent");
73  pIncSvc->addListener(this, "ReseedIncident", PRIORITY);
74  }
75  pIncSvc.release().ignore();
76 
77  if (m_read_from_file)
78  {
79  // Read from a file
80  ifstream infile( m_file_to_read.value().c_str() );
81  if ( !infile ) {
82  ATH_MSG_ERROR (" Unable to open: " << m_file_to_read.value());
83  return StatusCode::FAILURE;
84  } else {
85  std::string buffer;
86  while (std::getline(infile, buffer)) {
87  string stream;
91  (" INITIALISING " << stream << " stream with seeds "
92  << seed1 << " " << seed2
93  << " read from file " << m_file_to_read.value());
95  } else {
97  ("bad line\n" << buffer
98  << "\n in input file " << m_file_to_read.value());
99  return StatusCode::FAILURE;
100  }
101  }
102 
103  }
104  }
105 
106  // Create the various streams according to user's request
107  for (const auto& i : m_streams_seeds.value()) {
108  string stream;
109  uint32_t seed1, seed2, offset(0);
110  short dummy;
113  ("Seeds property: stream " << stream
114  << " seeds " << seed1 << ' ' << seed2
115  << ", reseeding offset " << offset);
116  } else {
117  ATH_MSG_ERROR ("bad Seeds property\n" << i);
118  return StatusCode::FAILURE;
119  }
120 
121  // Check if stream already generated (e.g. from reading a file)
122  bool not_found = true;
123  if ( number_of_streams() != 0 ) {
125  do {
126  if ((*sf).first == stream) not_found = false;
127  ++sf;
128  } while (sf != end() && not_found);
129  }
130 
131  if (not_found) {
133  (" INITIALISING " << stream << " stream with seeds "
134  << seed1 << " " << seed2);
136  if (m_eventReseed) {
137  m_reseedingOffsets.insert(std::make_pair(stream, offset));
138  // apply the offset we just inserted
139  ATH_MSG_DEBUG("Applying reseeding offset " << offset <<
140  " to stream " << stream);
141  this->setOnDefinedSeeds(seed1, seed2, stream);
142  }
143  }
144 
145  }
146  return StatusCode::SUCCESS;
147 }

◆ number_of_streams()

unsigned int AtRndmGenSvc::number_of_streams ( void  ) const
inline

Definition at line 173 of file AtRndmGenSvc.h.

174 { return m_engines.size(); }

◆ oldSetOnDefinedSeeds() [1/2]

CLHEP::HepRandomEngine * AtRndmGenSvc::oldSetOnDefinedSeeds ( uint32_t  eventNumber,
uint32_t  runNumber,
const std::string &  streamName 
)

broken, temporarily keep for backward compatibility

Definition at line 374 of file AtRndmGenSvc.cxx.

376 {
377  engineConstIter citer = m_engines.find(streamName);
378  if ( citer == m_engines.end() )
379  m_engines.insert( engineValType(streamName, new CLHEP::RanecuEngine() ) );
380  engineIter iter = m_engines.find(streamName);
381  int hashedStream(SG::simpleStringHash(streamName));
382  long seeds[3] = { (long)(1000*runNumber + hashedStream),
383  (long)eventNumber, 0 };
384  assert( seeds[0] > 0 );
385  assert( seeds[1] > 0 );
386  const long* s = seeds;
387  ((*iter).second)->setSeeds( s, -1 );
388  return (CLHEP::HepRandomEngine*)(*iter).second;
389 }

◆ oldSetOnDefinedSeeds() [2/2]

CLHEP::HepRandomEngine * AtRndmGenSvc::oldSetOnDefinedSeeds ( uint32_t  theSeed,
const std::string &  streamName 
)

broken, temporarily keep for backward compatibility

Definition at line 392 of file AtRndmGenSvc.cxx.

393  {
394  engineConstIter citer = m_engines.find(streamName);
395  if ( citer == m_engines.end() )
396  m_engines.insert( engineValType(streamName, new CLHEP::RanecuEngine() ) );
397  engineIter iter = m_engines.find(streamName);
398  int hashedStream(SG::simpleStringHash(streamName));
399  long seeds[3] = { (long)(hashedStream % (theSeed+13)), (long)theSeed, 0 };
400  assert( seeds[0] > 0 );
401  assert( seeds[1] > 0 );
402  const long* s = seeds;
403  ((*iter).second)->setSeeds( s, -1 );
404  return (CLHEP::HepRandomEngine*)(*iter).second;
405 }

◆ print() [1/2]

virtual void AtRndmGenSvc::print ( const std::string &  streamName)
overridevirtual

◆ print() [2/2]

virtual void AtRndmGenSvc::print ( void  )
overridevirtual

◆ setAllOnDefinedSeeds() [1/2]

virtual bool AtRndmGenSvc::setAllOnDefinedSeeds ( uint32_t  eventNumber,
uint32_t  runNumber 
)
overridevirtual

seed all streams, combining eventNumber, runNumber and the stream names

◆ setAllOnDefinedSeeds() [2/2]

virtual bool AtRndmGenSvc::setAllOnDefinedSeeds ( uint32_t  theSeed)
overridevirtual

seed all streams we manage, combining theSeed and the stream names

◆ setOnDefinedSeeds() [1/2]

virtual CLHEP::HepRandomEngine* AtRndmGenSvc::setOnDefinedSeeds ( uint32_t  eventNumber,
uint32_t  runNumber,
const std::string &  streamName 
)
overridevirtual

◆ setOnDefinedSeeds() [2/2]

virtual CLHEP::HepRandomEngine* AtRndmGenSvc::setOnDefinedSeeds ( uint32_t  theSeed,
const std::string &  streamName 
)
overridevirtual

◆ SetStreamSeeds()

void AtRndmGenSvc::SetStreamSeeds ( const std::string &  streamName)
private

Definition at line 280 of file AtRndmGenSvc.cxx.

281 {
282  long seed1;
283  long seed2;
284  if (streamName == "PYTHIA")
285  {
288  }
289  else if (streamName == "HERWIG")
290  {
293  }
294  else
295  {
298  }
300  (" INITIALISING " << streamName << " stream with DEFAULT seeds "
301  << seed1 << " " << seed2);
302 
303  long seeds[3] = { seed1, seed2, 0 };
304  const long* s = seeds;
305  engineIter iter = m_engines.find(streamName);
306  ((*iter).second)->setSeeds( s, -1 );
307 }

Member Data Documentation

◆ m_default_seed1

long AtRndmGenSvc::m_default_seed1
private

Definition at line 144 of file AtRndmGenSvc.h.

◆ m_default_seed2

long AtRndmGenSvc::m_default_seed2
private

Definition at line 145 of file AtRndmGenSvc.h.

◆ m_engines

engineMap AtRndmGenSvc::m_engines
private

Definition at line 137 of file AtRndmGenSvc.h.

◆ m_engines_copy

std::map<std::string, std::vector<long int> > AtRndmGenSvc::m_engines_copy
private

Random engine copy (for output to a file)

Definition at line 139 of file AtRndmGenSvc.h.

◆ m_eventReseed

Gaudi::Property<bool> AtRndmGenSvc::m_eventReseed {this,"EventReseeding",true,"reseed every event using a hash of run and event numbers"}
private

reseed for every event

Definition at line 128 of file AtRndmGenSvc.h.

◆ m_file_to_read

Gaudi::Property<std::string> AtRndmGenSvc::m_file_to_read
private
Initial value:
{this,"FileToRead",this->name()+".out",
"name of a ASCII file, usually produced by AtRndmGenSvc itself at the end of a job, "
"containing the information to fully set/restore the status of Ranecu",
}

name of the file to read the engine status from

Definition at line 120 of file AtRndmGenSvc.h.

◆ m_file_to_write

Gaudi::Property<std::string> AtRndmGenSvc::m_file_to_write
private
Initial value:
{this,"FileToWrite",this->name()+".out",
"name of an ASCII file which will be produced on finalize, containing the information to fully set/restore the status"}

name of the file to save the engine status to.

Definition at line 125 of file AtRndmGenSvc.h.

◆ m_HERWIG_default_seed1

long AtRndmGenSvc::m_HERWIG_default_seed1
private

Definition at line 148 of file AtRndmGenSvc.h.

◆ m_HERWIG_default_seed2

long AtRndmGenSvc::m_HERWIG_default_seed2
private

Definition at line 149 of file AtRndmGenSvc.h.

◆ m_PYTHIA_default_seed1

long AtRndmGenSvc::m_PYTHIA_default_seed1
private

Definition at line 146 of file AtRndmGenSvc.h.

◆ m_PYTHIA_default_seed2

long AtRndmGenSvc::m_PYTHIA_default_seed2
private

Definition at line 147 of file AtRndmGenSvc.h.

◆ m_read_from_file

Gaudi::Property<bool> AtRndmGenSvc::m_read_from_file {this,"ReadFromFile",false,"set/restore the status of the engine from file"}
private

read engine status from file

Definition at line 119 of file AtRndmGenSvc.h.

◆ m_reseedingOffsets

std::map<std::string, uint32_t> AtRndmGenSvc::m_reseedingOffsets
private

optional offsets to combine to run/evt no when reseeding.

Set using OFFSET keyword of the Seeds property

Definition at line 135 of file AtRndmGenSvc.h.

◆ m_reseedStreamNames

StringArrayProperty AtRndmGenSvc::m_reseedStreamNames {this,"ReseedStreamNames",{}, "the streams we are going to set the seeds of (default: all streams)"}
private

streams to be reseeded for every event

Definition at line 129 of file AtRndmGenSvc.h.

◆ m_save_to_file

Gaudi::Property<bool> AtRndmGenSvc::m_save_to_file {this,"SaveToFile", true,"save the status of the engine to file"}
private

should current engine status be saved to file ?

Definition at line 124 of file AtRndmGenSvc.h.

◆ m_streams_seeds

StringArrayProperty AtRndmGenSvc::m_streams_seeds
private
Initial value:
{this,"Seeds",{},
"seeds for the engines, this is a vector of strings of the form ['SequenceName [OFFSET num] Seed1 Seed2', ...] "
"where OFFSET is an optional integer that allows to change the sequence of randoms for a given run/event no "
"and SequenceName combination. Notice that Seed1/Seed2 are dummy when EventReseeding is used",
"OrderedSet<std::string>"}

Definition at line 112 of file AtRndmGenSvc.h.

◆ m_useOldBrokenSeeding

Gaudi::Property<bool> AtRndmGenSvc::m_useOldBrokenSeeding {this,"UseOldBrokenSeeding",false}
private

backward compatibility only, broken 32/64 bits

Definition at line 111 of file AtRndmGenSvc.h.


The documentation for this class was generated from the following files:
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
run.infile
string infile
Definition: run.py:13
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AtRndmGenSvc::GetEngine
virtual CLHEP::HepRandomEngine * GetEngine(const std::string &streamName) override
Definition: AtRndmGenSvc.cxx:254
AtRndmGenSvc::m_default_seed2
long m_default_seed2
Definition: AtRndmGenSvc.h:145
AtRndmGenSvc::m_reseedStreamNames
StringArrayProperty m_reseedStreamNames
streams to be reseeded for every event
Definition: AtRndmGenSvc.h:129
AtRndmGenSvc::m_read_from_file
Gaudi::Property< bool > m_read_from_file
read engine status from file
Definition: AtRndmGenSvc.h:119
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AtRndmGenSvc::number_of_streams
unsigned int number_of_streams(void) const
Definition: AtRndmGenSvc.h:173
AtRndmGenSvc::m_engines_copy
std::map< std::string, std::vector< long int > > m_engines_copy
Random engine copy (for output to a file)
Definition: AtRndmGenSvc.h:139
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
AtRndmGenSvc::m_HERWIG_default_seed1
long m_HERWIG_default_seed1
Definition: AtRndmGenSvc.h:148
genPbPbJobOpt.seed2
seed2
Definition: genPbPbJobOpt.py:57
AtRndmGenSvc::setOnDefinedSeeds
virtual CLHEP::HepRandomEngine * setOnDefinedSeeds(uint32_t theSeed, const std::string &streamName) override
AtRndmGenSvc::begin
engineConstIter begin(void) const
Definition: AtRndmGenSvc.h:165
AtRndmGenSvc::SetStreamSeeds
void SetStreamSeeds(const std::string &streamName)
Definition: AtRndmGenSvc.cxx:280
AtRndmGenSvc::m_file_to_read
Gaudi::Property< std::string > m_file_to_read
name of the file to read the engine status from
Definition: AtRndmGenSvc.h:120
AtRndmGenSvc::m_PYTHIA_default_seed1
long m_PYTHIA_default_seed1
Definition: AtRndmGenSvc.h:146
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
AtRndmGenSvc::m_reseedingOffsets
std::map< std::string, uint32_t > m_reseedingOffsets
optional offsets to combine to run/evt no when reseeding.
Definition: AtRndmGenSvc.h:135
AtRndmGenSvc::m_HERWIG_default_seed2
long m_HERWIG_default_seed2
Definition: AtRndmGenSvc.h:149
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AtRndmGenSvc::setAllOnDefinedSeeds
virtual bool setAllOnDefinedSeeds(uint32_t theSeed) override
seed all streams we manage, combining theSeed and the stream names
AtRndmGenSvc::m_streams_seeds
StringArrayProperty m_streams_seeds
Definition: AtRndmGenSvc.h:112
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AtRndmGenSvc::engineIter
engineMap::iterator engineIter
Definition: AtRndmGenSvc.h:68
AtRndmGenSvc::m_save_to_file
Gaudi::Property< bool > m_save_to_file
should current engine status be saved to file ?
Definition: AtRndmGenSvc.h:124
python.xAODType.dummy
dummy
Definition: xAODType.py:4
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
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AtRndmGenSvc::m_eventReseed
Gaudi::Property< bool > m_eventReseed
reseed for every event
Definition: AtRndmGenSvc.h:128
AtRndmGenSvc::m_engines
engineMap m_engines
Definition: AtRndmGenSvc.h:137
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
AtRndmGenSvc::CreateStream
virtual void CreateStream(uint32_t seed1, uint32_t seed2, const std::string &streamName) override
Definition: AtRndmGenSvc.cxx:268
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
AtRndmGenSvc::print
virtual void print(void) override
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AtRndmGenSvc::m_default_seed1
long m_default_seed1
Definition: AtRndmGenSvc.h:144
TestSeedRunEvent.Seeds
Seeds
Definition: TestSeedRunEvent.py:12
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
AtRndmGenSvc::m_file_to_write
Gaudi::Property< std::string > m_file_to_write
name of the file to save the engine status to.
Definition: AtRndmGenSvc.h:125
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AtRndmGenSvc::engineConstIter
engineMap::const_iterator engineConstIter
Definition: AtRndmGenSvc.h:69
AtRndmGenSvc::m_PYTHIA_default_seed2
long m_PYTHIA_default_seed2
Definition: AtRndmGenSvc.h:147
value_type
Definition: EDM_MasterSearch.h:11
AtRndmGenSvc::engineValType
engineMap::value_type engineValType
Definition: AtRndmGenSvc.h:70
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
python.KeyStore.msg
msg
Definition: KeyStore.py:26
ServiceHandle< IIncidentSvc >
AtRndmGenSvc::end
engineConstIter end(void) const
Definition: AtRndmGenSvc.h:169