+ for (UInt_t hs=0; hs<6; hs++) {
+ ActivateHS(eq,hs);
+ for (UInt_t chip=0; chip<10; chip++) {
+ ActivateChip(eq,hs,chip);
+ }
+ }
+ }
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateEq(UInt_t eq, Bool_t setval) {
+ // activate eq
+ if (eq>=20) {
+ Error("AliITSOnlineCalibrationSPDhandler::ActivateEq", "eq (%d) out of bounds.",eq);
+ return;
+ }
+ fActiveEq[eq] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateHS(UInt_t eq, UInt_t hs, Bool_t setval) {
+ // activate hs
+ if (eq>=20 || hs>=6) {
+ Error("AliITSOnlineCalibrationSPDhandler::ActivateHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+ return;
+ }
+ fActiveHS[eq][hs] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::ActivateChip(UInt_t eq, UInt_t hs, UInt_t chip, Bool_t setval) {
+ // activate chip
+ if (eq>=20 || hs>=6 || chip>=10) {
+ Error("AliITSOnlineCalibrationSPDhandler::ActivateChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+ return;
+ }
+ fActiveChip[eq][hs][chip] = setval;
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveEq(UInt_t eq) const {
+ // Is eq active?
+ if (eq>=20) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsActiveEq", "eq (%d) out of bounds.",eq);
+ return kFALSE;
+ }
+ return fActiveEq[eq];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveHS(UInt_t eq, UInt_t hs) const {
+ // Is hs active?
+ if (eq>=20 || hs>=6) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsActiveHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+ return kFALSE;
+ }
+ return fActiveHS[eq][hs];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsActiveChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+ // Is chip active?
+ if (eq>=20 || hs>=6 || chip>=10) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsActiveChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+ return kFALSE;
+ }
+ return fActiveChip[eq][hs][chip];
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::UnSetDeadALL() {
+ // Clear all dead eq,hs,chips
+ for (UInt_t eq=0; eq<20; eq++) {
+ SetDeadEq(eq,kFALSE);
+ for (UInt_t hs=0; hs<6; hs++) {
+ SetDeadHS(eq,hs,kFALSE);
+ for (UInt_t chip=0; chip<10; chip++) {
+ SetDeadChip(eq,hs,chip,kFALSE);
+ }
+ }
+ }
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::SetDeadEq(UInt_t eq, Bool_t setval) {
+ // set eq dead
+ if (eq>=20) {
+ Error("AliITSOnlineCalibrationSPDhandler::SetDeadEq", "eq (%d) out of bounds.",eq);
+ return;
+ }
+ fDeadEq[eq] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::SetDeadHS(UInt_t eq, UInt_t hs, Bool_t setval) {
+ // set hs dead
+ if (eq>=20 || hs>=6) {
+ Error("AliITSOnlineCalibrationSPDhandler::SetDeadHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+ return;
+ }
+ fDeadHS[eq][hs] = setval;
+}
+//____________________________________________________________________________________________
+void AliITSOnlineCalibrationSPDhandler::SetDeadChip(UInt_t eq, UInt_t hs, UInt_t chip, Bool_t setval) {
+ // set chip dead
+ if (eq>=20 || hs>=6 || chip>=10) {
+ Error("AliITSOnlineCalibrationSPDhandler::SetDeadChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+ return;
+ }
+ fDeadChip[eq][hs][chip] = setval;
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsDeadEq(UInt_t eq) const {
+ // is eq dead?
+ if (eq>=20) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsDeadEq", "eq (%d) out of bounds.",eq);
+ return kFALSE;
+ }
+ return fDeadEq[eq];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsDeadHS(UInt_t eq, UInt_t hs) const {
+ // is hs dead?
+ if (eq>=20 || hs>=6) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsDeadHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+ return kFALSE;
+ }
+ return fDeadHS[eq][hs];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsDeadChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+ // is chip dead?
+ if (eq>=20 || hs>=6 || chip>=10) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsDeadChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+ return kFALSE;
+ }
+ return fDeadChip[eq][hs][chip];
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsSilentEq(UInt_t eq) const {
+ // is eq silent?
+ if (eq>=20) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsSilentEq", "eq (%d) out of bounds.",eq);
+ return kFALSE;
+ }
+ return (!IsActiveEq(eq) || IsDeadEq(eq));
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsSilentHS(UInt_t eq, UInt_t hs) const {
+ // is hs silent?
+ if (eq>=20 || hs>=6) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsSilentHS", "eq,hs (%d,%d) out of bounds.",eq,hs);
+ return kFALSE;
+ }
+ return (!IsActiveEq(eq) || IsDeadEq(eq) || !IsActiveHS(eq,hs) || IsDeadHS(eq,hs));
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsSilentChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+ // is chip silent?
+ if (eq>=20 || hs>=6 || chip>=10) {
+ Error("AliITSOnlineCalibrationSPDhandler::IsSilentChip", "eq,hs,chip (%d,%d,%d) out of bounds.",eq,hs,chip);
+ return kFALSE;
+ }
+ return (!IsActiveEq(eq) || IsDeadEq(eq) || !IsActiveHS(eq,hs) || IsDeadHS(eq,hs) || !IsActiveChip(eq,hs,chip) || IsDeadChip(eq,hs,chip));
+}
+//____________________________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPDhandler::IsNoisyChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+ // returns true if there is at least a noisy pixel in the chip