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