]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/raw2sdigits.sh
remove dependency to aliroot libraries, access of ESDEvent object through abstract...
[u/mrichter/AliRoot.git] / MUON / raw2sdigits.sh
CommitLineData
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
9rawfile=$1
10esdfile=""
11
12if [ $# -ge 2 ]; then
13 esdfile=$2
14fi
15
16echo "rawfile=$rawfile esdfile=$esdfile"
17
18aliroot -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
35EOF