]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineCalibrationSPD.cxx
Increased size of collection in Merge and protected SaveHistograms
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineCalibrationSPD.cxx
index a6364bd899f65717975b680d92a4dbf95522850b..2942cd438255a3a469fbe70ccd2aed0176df5574 100644 (file)
@@ -12,9 +12,11 @@ AliITSOnlineCalibrationSPD::AliITSOnlineCalibrationSPD():
 fEqNr(0),
 fNrBad(0),
 fBadChannels(0),
-fActiveEq(kTRUE)
+fActiveEq(kTRUE),
+fDeadEq(kFALSE)
 {
   ActivateALL();
+  UnSetDeadALL();
 }
 //____________________________________________________________________________
 Int_t AliITSOnlineCalibrationSPD::GetKeyAt(UInt_t index) const {
@@ -81,4 +83,60 @@ Bool_t AliITSOnlineCalibrationSPD::IsActiveChip(UInt_t hs, UInt_t chip) const {
   }
   return fActiveChip[hs*10+chip];
 }
-
+//____________________________________________________________________________
+void AliITSOnlineCalibrationSPD::UnSetDeadALL() {
+  // activate eq, all hs, all chips
+  SetDeadEq(kFALSE);
+  for (UInt_t hs=0; hs<6; hs++) {
+    SetDeadHS(hs,kFALSE);
+    for (UInt_t chip=0; chip<10; chip++) {
+      SetDeadChip(hs,chip,kFALSE);
+    }
+  }
+}
+//____________________________________________________________________________
+void AliITSOnlineCalibrationSPD::SetDeadEq(Bool_t setval) {
+  // set this eq dead
+  fDeadEq = setval;
+}
+//____________________________________________________________________________
+void AliITSOnlineCalibrationSPD::SetDeadHS(UInt_t hs, Bool_t setval) {
+  // set dead hs on this eq
+  if (hs>=6) {
+    Error("AliITSOnlineCalibrationSPD::SetDeadHS", "hs (%d) out of bounds.",hs);
+    return;
+  }
+  fDeadHS[hs] = setval;
+}
+//____________________________________________________________________________
+void AliITSOnlineCalibrationSPD::SetDeadChip(UInt_t hs, UInt_t chip, Bool_t setval) {
+  // set dead chip on this eq
+  if (hs>=6 || chip>=10) {
+    Error("AliITSOnlineCalibrationSPD::SetDeadChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
+    return;
+  }
+  fDeadChip[hs*10+chip] = setval;
+}
+//____________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPD::IsDeadEq() const {
+  // is this eq dead?
+  return fDeadEq;
+}
+//____________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPD::IsDeadHS(UInt_t hs) const {
+  // is this hs dead?
+  if (hs>=6) {
+    Error("AliITSOnlineCalibrationSPD::IsDeadHS", "hs (%d) out of bounds.",hs);
+    return kFALSE;
+  }
+  return fDeadHS[hs];
+}
+//____________________________________________________________________________
+Bool_t AliITSOnlineCalibrationSPD::IsDeadChip(UInt_t hs, UInt_t chip) const {
+  // is this chip dead?
+  if (hs>=6 || chip>=10) {
+    Error("AliITSOnlineCalibrationSPD::IsDeadChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
+    return kFALSE;
+  }
+  return fDeadChip[hs*10+chip];
+}