Script to get # of dead channels from OCDB
[u/mrichter/AliRoot.git] / FMD / scripts / WriteMedArrays.C
CommitLineData
55f0ce5b 1void
2WriteMedArrays()
3{
4 TFile* file = TFile::Open("medid.root", "RECREATE");
5 if (!file) {
6 Warning("WriteMedArrays", "failed to open medid.root");
7 return;
8 }
9 TObjArray* modules = gAlice->Modules();
10 if (!modules) {
11 Warning("WriteMedArrays", "failed to get modules");
12 return;
13 }
14 TIter next(modules);
15 AliModule* module = 0;
16 while ((module = static_cast<AliModule*>(next()))) {
17 Info("WriteMedArrays", "Getting medium id's for %s", module->GetName());
18 TArrayI* mediumIds = module->GetIdtmed();
19 if (!mediumIds) {
20 Warning("WriteMedArrays", "No medium id's for %s", module->GetName());
21 continue;
22 }
23 file->WriteObject(mediumIds,module->GetName());
24 }
25 file->Write();
26 file->Close();
27}
28
29
30