1 // #define VERBOSEARGS
\r
4 // extract the run and event variables given with
\r
5 // --run <x> --event <y> --type <t>
\r
6 // where "type" can be "ppMBias" or "pptrg2mu"
\r
16 for (int i=0; i< gApplication->Argc();i++){
\r
18 printf("Arg %d: %s\n",i,gApplication->Argv(i));
\r
20 if (!(strcmp(gApplication->Argv(i),"--run")))
\r
21 nrun = atoi(gApplication->Argv(i+1));
\r
22 sprintf(srun,"%d",nrun);
\r
23 if (!(strcmp(gApplication->Argv(i),"--event")))
\r
24 nevent = atoi(gApplication->Argv(i+1));
\r
25 sprintf(sevent,"%d",nevent);
\r
26 if (!(strcmp(gApplication->Argv(i),"--type")))
\r
27 strcpy(type,gApplication->Argv(i+1));
\r
30 seed = nrun * 100000 + nevent;
\r
31 sprintf(sseed,"%d",seed);
\r
34 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
\r
35 fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n");
\r
36 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
\r
38 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
\r
39 fprintf(stdout,"!!! MC Seed is %d \n",seed);
\r
40 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
\r
43 gSystem->Setenv("CONFIG_SEED",sseed);
\r
44 gSystem->Setenv("CONFIG_RUN_TYPE",type);
\r
45 gSystem->Setenv("DC_RUN",srun);
\r
47 gSystem->Setenv("ALIMDC_RAWDB1","./mdc1");
\r
48 gSystem->Setenv("ALIMDC_RAWDB2","./mdc2");
\r
49 gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag");
\r
50 gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta");
\r
52 gSystem->Exec("cp $ALICE_ROOT/.rootrc .rootrc");
\r
53 gSystem->Exec("aliroot -b -q sim.C 2>&1 | tee sim.log");
\r
54 gSystem->Exec("mkdir generated");
\r
55 gSystem->Exec("mv *.root generated");
\r
56 gSystem->Exec("ln -s generated/geometry.root");
\r
57 gSystem->Exec("ln -s generated/raw.root");
\r
58 gSystem->Exec("aliroot -b -q rec.C 2>&1 | tee rec.log");
\r
59 gSystem->Exec("mv galice.root galice_rec.root");
\r
60 gSystem->Exec("mv generated/*.root .");
\r
61 gSystem->Exec("aliroot -b -q tag.C 2>&1 | tee tag.log");
\r
62 gSystem->Exec("aliroot -b -q CheckESD.C 2>&1 | tee check.log");
\r