4 // set job and simulation variables as :
5 // root.exe -b -q simrun.C --run <x> --chunk <y> --event <n>
11 Bool_t snapshot(kFALSE);
20 for (int i=0; i< gApplication->Argc();i++){
22 printf("Arg %d: %s\n",i,gApplication->Argv(i));
24 if (!(strcmp(gApplication->Argv(i),"--run")))
25 nrun = atoi(gApplication->Argv(i+1));
26 sprintf(srun,"%d",nrun);
28 if (!(strcmp(gApplication->Argv(i),"--chunk")))
29 nchunk = atoi(gApplication->Argv(i+1));
30 sprintf(schunk,"%d",nchunk);
32 if (!(strcmp(gApplication->Argv(i),"--event")))
33 nevent = atoi(gApplication->Argv(i+1));
35 if (!(strcmp(gApplication->Argv(i),"--snapshot")))
39 seed = nrun * 10000 + nchunk;
40 sprintf(sseed,"%d",seed);
43 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
44 fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n");
45 fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
47 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
48 fprintf(stdout,"!!! MC Seed is %d \n",seed);
49 fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
52 // set the seed environment variable
53 gSystem->Setenv("CONFIG_SEED",sseed);
54 gSystem->Setenv("DC_RUN",srun); // used in AliSimulation.cxx
55 gSystem->Setenv("DC_EVENT",schunk); // Not used in Config.C (used for setting seed)
57 // Needed to produce simulated RAW data
58 gSystem->Setenv("ALIMDC_RAWDB1","./mdc1");
59 gSystem->Setenv("ALIMDC_RAWDB2","./mdc2");
60 gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag");
61 gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta");
62 cout<< "SIMRUN:: Run " << gSystem->Getenv("DC_RUN")
63 << " Chunk " << gSystem->Getenv("DC_EVENT")
66 cout<<">>>>> SIMULATION <<<<<"<<endl;
69 gSystem->Setenv("OCDB_SNAPSHOT_CREATE","kTRUE");
70 gSystem->Setenv("OCDB_SNAPSHOT_FILENAME","OCDB_sim.root");
73 gSystem->Exec(Form("aliroot -b -q sim.C\\(%d\\) > sim.log 2>&1",nevent));
74 gSystem->Exec("mv syswatch.log simwatch.log");
78 gSystem->Setenv("OCDB_SNAPSHOT_FILENAME","OCDB_rec.root");
81 cout<<">>>>> RECONSTRUCTION <<<<<"<<endl;
85 // for some reason must include ITS objects in the snapshot
86 // (to be able to instantiante the vertexer later on ?)
87 gSystem->Exec("aliroot -b -q rec.C\\(1\\) > rec.log 2>&1");
91 gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
94 gSystem->Exec("mv syswatch.log recwatch.log");
98 gSystem->Exec(Form("mkdir -p OCDB/%s",srun));
99 gSystem->Exec(Form("mv OCDB_*.root OCDB/%s/",srun));
103 // cout<<">>>>> TAG <<<<<"<<endl;
104 // gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
106 cout<<">>>>> CHECK ESD <<<<<"<<endl;
107 gSystem->Exec("aliroot -b -q CheckESD.C > checkesd.log 2>&1");
108 cout<<">>>>> MAKE AOD <<<<<"<<endl;
109 gSystem->Exec("aliroot -b -q AODtrain.C > aod.log 2>&1");
110 cout<<">>>>> CHECK AOD <<<<<"<<endl;
111 gSystem->Exec("aliroot -b -q CheckAOD.C > checkaod.log 2>&1");