Script to get # of dead channels from OCDB
[u/mrichter/AliRoot.git] / FMD / scripts / Digits2Raw.C
CommitLineData
e0afd551 1void
2Digits2Raw()
3{
28ede577 4 // AliLog::SetModuleDebugLevel("FMD", 10);
5 AliLog::SetModuleDebugLevel("RAW", 1);
e0afd551 6 AliRunLoader* runLoader = AliRunLoader::Open("galice.root", "Alice", "read");
7 if (!runLoader) {
8 AliError("Coulnd't read the file galice.root");
9 return;
10 }
11
12 if (runLoader->LoadgAlice()) return;
13 AliRun* run = runLoader->GetAliRun();
14
15 // Get the FMD
16 AliFMD* fmd = static_cast<AliFMD*>(run->GetDetector("FMD"));
17 if (!fmd) {
18 AliError("Failed to get detector FMD from loader");
19 return;
20 }
21
22 // Get the FMD loader
23 AliLoader* loader = runLoader->GetLoader("FMDLoader");
24 if (!loader) {
25 AliError("Failed to get detector FMD loader from loader");
26 return;
27 }
28 if (runLoader->LoadHeader()) {
29 AliError("Failed to get event header information from loader");
30 return;
31 }
32 TTree* treeE = runLoader->TreeE();
33
34 AliCDBManager::Instance()->SetRun(0);
162637e4 35 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
e0afd551 36
28ede577 37 AliFMDParameters::Instance()->Init(kFALSE,
38 (AliFMDParameters::kPulseGain|
39 (AliFMDParameters::kPedestal|
40 AliFMDParameters::kDeadMap|
41 AliFMDParameters::kSampleRate|
42 AliFMDParameters::kAltroMap|
43 AliFMDParameters::kStripRange)));
44 AliFMDParameters::Instance()->SetZeroSuppression(1);
45 // AliFMDParameters::Instance()->SetPedestal(100);
46 // AliFMDParameters::Instance()->SetPedestalWidth(0);
47 // AliFMDParameters::Instance()->SetZSPreSamples(0);
48 // AliFMDParameters::Instance()->SetZSPostSamples(0);
e0afd551 49
50 fmd->Digits2Raw();
51}