]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/scripts/Digits2Raw.C
Fixes for reading zero-suppressed data. Also fixes to simulated raw
[u/mrichter/AliRoot.git] / FMD / scripts / Digits2Raw.C
CommitLineData
e0afd551 1void
2Digits2Raw()
3{
4 AliLog::SetModuleDebugLevel("FMD", 4);
5 AliRunLoader* runLoader = AliRunLoader::Open("galice.root", "Alice", "read");
6 if (!runLoader) {
7 AliError("Coulnd't read the file galice.root");
8 return;
9 }
10
11 if (runLoader->LoadgAlice()) return;
12 AliRun* run = runLoader->GetAliRun();
13
14 // Get the FMD
15 AliFMD* fmd = static_cast<AliFMD*>(run->GetDetector("FMD"));
16 if (!fmd) {
17 AliError("Failed to get detector FMD from loader");
18 return;
19 }
20
21 // Get the FMD loader
22 AliLoader* loader = runLoader->GetLoader("FMDLoader");
23 if (!loader) {
24 AliError("Failed to get detector FMD loader from loader");
25 return;
26 }
27 if (runLoader->LoadHeader()) {
28 AliError("Failed to get event header information from loader");
29 return;
30 }
31 TTree* treeE = runLoader->TreeE();
32
33 AliCDBManager::Instance()->SetRun(0);
34 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
35
36 AliFMDParameters::Instance()->Init();
37
38 fmd->Digits2Raw();
39}