]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/scripts/Hits2SDigits.C
EMCAL/DCAL Trigger Mapping for Run 2
[u/mrichter/AliRoot.git] / FMD / scripts / Hits2SDigits.C
1 void
2 Hits2SDigits()
3 {
4   AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
5   AliCDBManager::Instance()->SetRun(0);
6   
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   
35   AliLog::SetModuleDebugLevel("FMD", 1);
36
37   fmd->Hits2SDigits();
38 }