Changeset 3615 in Sophya for trunk/Cosmo/SimLSS/cmvschdist.cc


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvschdist.cc

    r3344 r3615  
    1717#include <math.h>
    1818#include <unistd.h>
     19#include "sophyainit.h"
    1920#include "timing.h"
    2021#include "histos.h"
    2122#include "ntuple.h"
     23//#include "randr48.h"
     24#include "randfmt.h"
    2225#include "srandgen.h"
    2326#include "perandom.h"
     
    4649int main(int narg,char *arg[])
    4750{
     51SophyaInit();
    4852 double h75 = 0.71 / 0.75;
    4953 double nstar = 0.006*pow(h75,3.);  // 
     
    6266 string nametoppf = "";
    6367
     68 // --- Choix du generateur aleatoire (a faire ICI imperativement avant AutoInitRand)
     69 FMTRandGen *RandGen = new FMTRandGen;
     70 RandGen->SelectGaussianAlgo(C_Gaussian_RandLibSNorm);
     71 RandGen->SelectPoissonAlgo(C_Poisson_Ahrens);
     72 RandomGeneratorInterface::SetGlobalRandGenP(RandGen);
     73
     74 // --- decodage des arguments
    6475 char c;
    6576 while((c = getopt(narg,arg,"h0avm:N:n:r:R:W:")) != -1) {
     
    99110     break;
    100111   case 'a' :
    101      Auto_Ini_Ranf(5);
     112     AutoInitRand(5);
    102113     break;
    103114   case 'h' :
     
    201212 }
    202213
     214 delete RandGen;
     215
    203216 PrtTim("End of Job");
    204217
Note: See TracChangeset for help on using the changeset viewer.