22 ISvcLocator* pSvcLoc( 0 );
23 if ( !initGaudi(
"AtRndmGen_test.txt", pSvcLoc ) )
25 cerr <<
"This test can not be run" << endl;
30 IAtRndmGenSvc* pAtRndmGen( 0 );
31 assert( ( pSvcLoc->service(
"AtRndmGenSvc", pAtRndmGen,
true ) ).isSuccess() );
34 HepRandomEngine* pEng( pAtRndmGen->GetEngine(
"PITHIA_INIT" ) );
36 const long* seeds( pEng->getSeeds() );
37 assert( 1 == seeds[1] - seeds[0] );
39 pEng = pAtRndmGen->setOnDefinedSeeds( 1,
"PITHIA" );
41 seeds = pEng->getSeeds();
43 assert( 9000 == seeds[0] - seeds[1] );
44 assert( SG::simpleStringHash(
"PITHIA" ) == seeds[0] - 10000 );
46 cout <<
"*** AtRndSvc_test OK ***" << endl;