Anonymous avatar Anonymous committed e9d200d

fix #90947 setSeeds requires a 0-terminated array(thanks Michael)

Comments (0)

Files changed (2)

+2012-02-01  Paolo Calafiura  <calaf@localhost6.localdomain6>
+
+	* tagging AthenaServices-01-55-05
+	* src/AtRndmGenSvc.cxx (AtRndmGenSvc::CreateStream): fix #90947
+	setSeeds requires a 0-terminated array(thanks Michael)
+
 2012-01-27  Peter van Gemmeren  <gemmeren@anl.gov>
 	* tagging AthenaServices-01-55-04
 	* src/AthenaSummarySvc.cxx, DecisionSvc.cxx, UserDataSvc.cxx: Directly #include FileIncident from Gaudi.

src/AtRndmGenSvc.cxx

     if (citer == m_engines.end())
       m_engines.insert(engineValType(streamName, new RanecuEngine()));
     engineIter iter = m_engines.find(streamName);
-    long seeds[2] = { seed1, seed2 };
+    long seeds[3] = { seed1, seed2, 0 };
     ((*iter).second)->setSeeds( seeds, -1 );
 }
 
       (" INITIALISING " << streamName << " stream with DEFAULT seeds "
        << seed1 << "  " << seed2);
     
-    long seeds[2] = { seed1, seed2 };
+    long seeds[3] = { seed1, seed2, 0 };
     const long* s = seeds;
     engineIter	iter	=	m_engines.find(streamName);
     ((*iter).second)->setSeeds( s, -1 );
     m_engines.insert( engineValType(streamName, new RanecuEngine() ) ); 
   engineIter iter = m_engines.find(streamName); 
   int hashedStream(SG::simpleStringHash(streamName)); 
-  long seeds[2] = { 1000*runNumber + hashedStream,  
-		    eventNumber }; 
+  long seeds[3] = { 1000*runNumber + hashedStream,  
+		    eventNumber, 0 }; 
   assert( seeds[0] > 0 ); 
   assert( seeds[1] > 0 ); 
   const long* s = seeds; 
     m_engines.insert( engineValType(streamName, new RanecuEngine() ) ); 
   engineIter iter = m_engines.find(streamName); 
   int hashedStream(SG::simpleStringHash(streamName)); 
-  long seeds[2] = { hashedStream % (theSeed+13), theSeed }; 
+  long seeds[3] = { hashedStream % (theSeed+13), theSeed, 0 }; 
   assert( seeds[0] > 0 ); 
   assert( seeds[1] > 0 ); 
   const long* s = seeds; 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.