1 #include "AliITSOnlineCalibrationSPD.h"
3 ///////////////////////////////////////////////////////////////////////
4 // Author: Henrik Tydesjo //
5 // Implementation of the online container for dead and noisy pixels. //
7 ///////////////////////////////////////////////////////////////////////
9 ClassImp(AliITSOnlineCalibrationSPD)
11 AliITSOnlineCalibrationSPD::AliITSOnlineCalibrationSPD():
18 //_________________________________________________________________________
19 void AliITSOnlineCalibrationSPD::AddDead(UInt_t col, UInt_t row) {
21 // Add a dead channel to fDeadChannel array
23 fDeadChannels.Set(fNrDead*2+2);
24 fDeadChannels.AddAt(col,fNrDead*2);
25 fDeadChannels.AddAt(row,fNrDead*2+1);
28 //_________________________________________________________________________
29 Int_t AliITSOnlineCalibrationSPD::GetDeadColAt(UInt_t index) const {
31 // Returns column of index-th dead channel
34 return fDeadChannels.At(index*2);
38 //_________________________________________________________________________
39 Int_t AliITSOnlineCalibrationSPD::GetDeadRowAt(UInt_t index) const {
41 // Returns row of index-th dead channel
44 return fDeadChannels.At(index*2+1);
48 //_________________________________________________________________________
49 Bool_t AliITSOnlineCalibrationSPD::IsPixelDead(Int_t col, Int_t row) const {
51 // Check if pixel (col,row) is dead
53 for (UInt_t i=0; i<fNrDead; i++) {
54 if (fDeadChannels.At(i*2)==col && fDeadChannels.At(i*2+1)==row) {
60 //____________________________________________________________________________
61 void AliITSOnlineCalibrationSPD::AddNoisy(UInt_t col, UInt_t row) {
65 fDeadChannels.Set(fNrNoisy*2+2);
66 fNoisyChannels.AddAt(col,fNrNoisy*2);
67 fNoisyChannels.AddAt(row,fNrNoisy*2+1);
70 //____________________________________________________________________________
71 Int_t AliITSOnlineCalibrationSPD::GetNoisyColAt(UInt_t index) const {
73 // Get column of index-th noisy pixel
76 return fNoisyChannels.At(index*2);
80 //____________________________________________________________________________
81 Int_t AliITSOnlineCalibrationSPD::GetNoisyRowAt(UInt_t index) const {
83 // Get row of index-th noisy pixel
86 return fNoisyChannels.At(index*2+1);
90 //____________________________________________________________________________
91 Bool_t AliITSOnlineCalibrationSPD::IsPixelNoisy(Int_t col, Int_t row) const {
93 // Check if pixel (col,row) is noisy
95 for (UInt_t i=0; i<fNrNoisy; i++) {
96 if (fNoisyChannels.At(i*2)==col && fNoisyChannels.At(i*2+1)==row) {