]>
Commit | Line | Data |
---|---|---|
8da43270 | 1 | CheckEnabledChannels(Int_t run, const Char_t *dbString) |
2 | { | |
3 | ||
4 | /* init */ | |
5 | AliCDBManager *cdb = AliCDBManager::Instance(); | |
6 | cdb->SetDefaultStorage(dbString); | |
7 | cdb->SetRun(run); | |
8 | AliTOFcalib calib; | |
9 | calib.Init(); | |
10 | ||
11 | TH2F *hEnabledMap = new TH2F("hEnabledMap", "Enabled channel map;sector;strip", 72, 0., 18., 91, 0., 91.); | |
12 | ||
13 | AliTOFcalibHisto calibhisto; | |
14 | calibhisto.LoadCalibHisto(); | |
15 | calibhisto.LoadCalibStat(); /* temp */ | |
16 | ||
17 | Int_t sector, sectorStrip, padx, fea; | |
18 | Float_t hitmapx, hitmapy; | |
19 | /* loop over channels */ | |
20 | for (Int_t ich = 0; ich < 157248; ich++) { | |
21 | if (!calib.IsChannelEnabled(ich, kTRUE, kTRUE)) continue; | |
22 | sector = calibhisto.GetCalibMap(AliTOFcalibHisto::kSector, ich); | |
23 | sectorStrip = calibhisto.GetCalibMap(AliTOFcalibHisto::kSectorStrip, ich); | |
24 | padx = calibhisto.GetCalibMap(AliTOFcalibHisto::kPadX, ich); | |
25 | fea = padx / 12; | |
26 | hitmapx = sector + ((Double_t)(3 - fea) + 0.5) / 4.; | |
27 | hitmapy = sectorStrip; | |
28 | hEnabledMap->Fill(hitmapx, hitmapy); | |
29 | } | |
30 | ||
31 | hEnabledMap->DrawCopy("colz"); | |
32 | TFile *fileout = TFile::Open("CheckEnabledChannels.root", "RECREATE"); | |
33 | hEnabledMap->Write(); | |
34 | fileout->Close(); | |
35 | ||
36 | } |