forked from alisw/AliDPG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsim.C
46 lines (37 loc) · 1.18 KB
/
sim.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* AliDPG - ALICE Experiment Data Preparation Group
* Simulation steering script
*
*/
/*****************************************************************/
/*****************************************************************/
/*****************************************************************/
void sim()
{
// number of events configuration
Int_t nev = 200;
if (gSystem->Getenv("CONFIG_NEVENTS"))
nev = atoi(gSystem->Getenv("CONFIG_NEVENTS"));
// simulation configuration
gROOT->LoadMacro("$ALIDPG_ROOT/MC/SimulationConfig.C");
Int_t simulationConfig = kSimulationDefault;
if (gSystem->Getenv("CONFIG_SIMULATION")) {
Bool_t valid = kFALSE;
for (Int_t isim = 0; isim < kNSimulations; isim++)
if (strcmp(gSystem->Getenv("CONFIG_SIMULATION"), SimulationName[isim]) == 0) {
simulationConfig = isim;
valid = kTRUE;
break;
}
if (!valid) {
printf(">>>>> Unknown simulation configuration: %s \n", gSystem->Getenv("CONFIG_SIMULATION"));
abort();
}
}
/* initialisation */
AliSimulation sim("$ALIDPG_ROOT/MC/Config.C");
/* configuration */
SimulationConfig(sim, simulationConfig);
/* run */
sim.Run(nev);
}