Changeset 3615 in Sophya for trunk/FrEROS


Ignore:
Timestamp:
May 1, 2009, 1:34:31 PM (16 years ago)
Author:
cmv
Message:

Modifs relatives a l'introduction de RandomGeneratorInterface + delete de srandgen.c, cmv 01/05/2009

Location:
trunk/FrEROS/AnaLC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/FrEROS/AnaLC/nbgene.cc

    r3308 r3615  
    11#include "machdefs.h"
     2#include "sopnamsp.h"  // using SOPHYA namespace
    23#include <stdio.h>
    34#include <stdlib.h>
     
    67#include "fsvcache.h"
    78#include "nbtri.h"
    8 #include "nbrandom.h"
    99#include "nbmath.h"
    1010#include "nbinteg.h"
    1111#include "strutil.h"
    1212#include "fsvst.h"
     13#include "srandgen.h"
    1314#include "nbsread.h"
    1415#include "nbgene.h"
     
    6869  seed_16v[1]=(unsigned short) mc.iseed2;
    6970  seed_16v[2]=(unsigned short) mc.iseed3;
    70   Ini_Ranf(seed_16v,0);
     71  RandGen->SetSeed(seed_16v);
    7172
    7273  mc.NGene = mc.NPoints_ampli = mc.NPoints_ampli_tf = mc.Net_ampli_tf = 0;
     
    238239  printf("Nb d'etoiles amplifiees avec taille finie %d\n"
    239240        ,mc.Net_ampli_tf);
    240   Get_Ranf(seed_16v,0);
     241  RandGen->SetSeed(seed_16v);
    241242  mc.iseed1 = (int_4)seed_16v[0];
    242243  mc.iseed2 = (int_4)seed_16v[1];
  • trunk/FrEROS/AnaLC/nbsread.cc

    r3308 r3615  
    11/* lecture des fichiers de suivi:     cmv 21/12/93 */
    22#include "machdefs.h"
     3#include "sopnamsp.h"  // using SOPHYA namespace
    34#include <stdio.h>
    45#include <stdlib.h>
     
    78#include <signal.h>
    89
     10#include "sophyainit.h"
    911#include "fsvcache.h"
    1012#include "nbtri.h"
    11 #include "nbrandom.h"
    1213#include "nbmath.h"
    1314#include "strutil.h"
     
    106107if (narg < 2) usage(0);
    107108if( !strcmp(arg[1],"-h") != 0 ) usage(1);
     109
     110/*------------------------------------------*/
     111/*-------- Initialisation Aleatoire --------*/
     112/*------------------------------------------*/
     113 SophyaInit();
     114 RandGen = new DR48RandGen;
     115 RandomGeneratorInterface::SetGlobalRandGenP(RandGen);
     116
    108117
    109118/*------------------------------------------*/
     
    417426
    418427printf("Nombre total d'etoiles lues %d\n",netoiles);
    419 
    420 exit(0);
     428delete RandGen;
     429
     430return(0);
    421431}
    422432
  • trunk/FrEROS/AnaLC/nbsread.h

    r3308 r3615  
    2525
    2626#include <stdio.h>
     27#include "randr48.h"
    2728#include "fsvcache.h"
    2829
    2930/* valeurs de control */
     31EXTERN DR48RandGen * RandGen;
    3032
    3133EXTERN double GRAND2_KILL;
  • trunk/FrEROS/AnaLC/nbsreadu_squel.cc

    r3308 r3615  
    44*/
    55#include "machdefs.h"
     6#include "sopnamsp.h"  // using SOPHYA namespace
    67#include <stdlib.h>
    78#include <math.h>
Note: See TracChangeset for help on using the changeset viewer.