]>
Commit | Line | Data |
---|---|---|
ca8c8223 | 1 | #!/bin/sh |
2 | ||
3 | # raw2sdigits.sh rawfile [esdfile] | |
4 | # | |
5 | # convert a (real) raw data file into SDigits suitable for embedding. | |
6 | # if esdfile is present (should correspond to the raw data file ;-) ) | |
7 | # then zvertex is taken from it | |
8 | ||
9 | rawfile=$1 | |
10 | esdfile="" | |
11 | ||
12 | if [ $# -ge 2 ]; then | |
13 | esdfile=$2 | |
14 | fi | |
15 | ||
16 | echo "rawfile=$rawfile esdfile=$esdfile" | |
17 | ||
18 | aliroot -l -b << EOF | |
19 | ||
20 | AliSimulation sim("$ALICE_ROOT/MUON/Config.C"); | |
21 | gAlice->SetConfigFunction("Config(\"\", \"param\", \"AliMUONDigitStoreV2R\",kTRUE);"); | |
22 | AliCDBManager *cdbm = AliCDBManager::Instance(); | |
23 | AliRawReader* reader = AliRawReader::Create(gSystem->ExpandPathName("$rawfile")); | |
24 | reader->NextEvent(); | |
25 | Int_t runNumber = reader->GetRunNumber(); | |
26 | delete reader; | |
27 | cout << "SETTING RUN NUMBER TO " << runNumber << endl; | |
28 | cdbm->SetRun(runNumber); | |
29 | cdbm->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
30 | cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd())); | |
31 | sim.SetMakeSDigits("MUON"); | |
32 | ||
33 | sim.ConvertRaw2SDigits("$rawfile","$esdfile"); | |
34 | ||
35 | EOF |