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():
21 //____________________________________________________________________________
22 Int_t AliITSOnlineCalibrationSPD::GetKeyAt(UInt_t index) const {
23 // Get key of index-th bad pixel
25 return fBadChannels.At(index);
29 //____________________________________________________________________________
30 void AliITSOnlineCalibrationSPD::ActivateALL() {
31 // activate eq, all hs, all chips
33 for (UInt_t hs=0; hs<6; hs++) {
35 for (UInt_t chip=0; chip<10; chip++) {
36 ActivateChip(hs,chip);
40 //____________________________________________________________________________
41 void AliITSOnlineCalibrationSPD::ActivateEq(Bool_t setval) {
45 //____________________________________________________________________________
46 void AliITSOnlineCalibrationSPD::ActivateHS(UInt_t hs, Bool_t setval) {
47 // activate hs on this eq
49 Error("AliITSOnlineCalibrationSPD::ActivateHS", "hs (%d) out of bounds.",hs);
52 fActiveHS[hs] = setval;
54 //____________________________________________________________________________
55 void AliITSOnlineCalibrationSPD::ActivateChip(UInt_t hs, UInt_t chip, Bool_t setval) {
56 // activate chip on this eq
57 if (hs>=6 || chip>=10) {
58 Error("AliITSOnlineCalibrationSPD::ActivateChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
61 fActiveChip[hs*10+chip] = setval;
63 //____________________________________________________________________________
64 Bool_t AliITSOnlineCalibrationSPD::IsActiveEq() const {
68 //____________________________________________________________________________
69 Bool_t AliITSOnlineCalibrationSPD::IsActiveHS(UInt_t hs) const {
72 Error("AliITSOnlineCalibrationSPD::IsActiveHS", "hs (%d) out of bounds.",hs);
77 //____________________________________________________________________________
78 Bool_t AliITSOnlineCalibrationSPD::IsActiveChip(UInt_t hs, UInt_t chip) const {
79 // is this chip active?
80 if (hs>=6 || chip>=10) {
81 Error("AliITSOnlineCalibrationSPD::IsActiveChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
84 return fActiveChip[hs*10+chip];
86 //____________________________________________________________________________
87 void AliITSOnlineCalibrationSPD::UnSetDeadALL() {
88 // activate eq, all hs, all chips
90 for (UInt_t hs=0; hs<6; hs++) {
92 for (UInt_t chip=0; chip<10; chip++) {
93 SetDeadChip(hs,chip,kFALSE);
97 //____________________________________________________________________________
98 void AliITSOnlineCalibrationSPD::SetDeadEq(Bool_t setval) {
102 //____________________________________________________________________________
103 void AliITSOnlineCalibrationSPD::SetDeadHS(UInt_t hs, Bool_t setval) {
104 // set dead hs on this eq
106 Error("AliITSOnlineCalibrationSPD::SetDeadHS", "hs (%d) out of bounds.",hs);
109 fDeadHS[hs] = setval;
111 //____________________________________________________________________________
112 void AliITSOnlineCalibrationSPD::SetDeadChip(UInt_t hs, UInt_t chip, Bool_t setval) {
113 // set dead chip on this eq
114 if (hs>=6 || chip>=10) {
115 Error("AliITSOnlineCalibrationSPD::SetDeadChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
118 fDeadChip[hs*10+chip] = setval;
120 //____________________________________________________________________________
121 Bool_t AliITSOnlineCalibrationSPD::IsDeadEq() const {
125 //____________________________________________________________________________
126 Bool_t AliITSOnlineCalibrationSPD::IsDeadHS(UInt_t hs) const {
129 Error("AliITSOnlineCalibrationSPD::IsDeadHS", "hs (%d) out of bounds.",hs);
134 //____________________________________________________________________________
135 Bool_t AliITSOnlineCalibrationSPD::IsDeadChip(UInt_t hs, UInt_t chip) const {
136 // is this chip dead?
137 if (hs>=6 || chip>=10) {
138 Error("AliITSOnlineCalibrationSPD::IsDeadChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
141 return fDeadChip[hs*10+chip];