]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineCalibrationSPD.cxx
added check for AliMUONDigitMaker::GetRawStreamTracker method to allow conditional...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineCalibrationSPD.cxx
CommitLineData
b15de2d2 1#include "AliITSOnlineCalibrationSPD.h"
2
3///////////////////////////////////////////////////////////////////////
4// Author: Henrik Tydesjo //
5// Implementation of the online container for dead and noisy pixels. //
6// //
7///////////////////////////////////////////////////////////////////////
8
9ClassImp(AliITSOnlineCalibrationSPD)
10
11AliITSOnlineCalibrationSPD::AliITSOnlineCalibrationSPD():
6727e2db 12fEqNr(0),
13fNrBad(0),
b696414b 14fBadChannels(0),
15fActiveEq(kTRUE)
16{
17 ActivateALL();
18}
b15de2d2 19//____________________________________________________________________________
6727e2db 20Int_t AliITSOnlineCalibrationSPD::GetKeyAt(UInt_t index) const {
21 // Get key of index-th bad pixel
22 if (index<fNrBad) {
23 return fBadChannels.At(index);
b15de2d2 24 }
25 return -1;
26}
b696414b 27//____________________________________________________________________________
28void AliITSOnlineCalibrationSPD::ActivateALL() {
29 // activate eq, all hs, all chips
30 ActivateEq();
31 for (UInt_t hs=0; hs<6; hs++) {
32 ActivateHS(hs);
33 for (UInt_t chip=0; chip<10; chip++) {
34 ActivateChip(hs,chip);
35 }
36 }
37}
38//____________________________________________________________________________
39void AliITSOnlineCalibrationSPD::ActivateEq(Bool_t setval) {
40 // activate this eq
41 fActiveEq = setval;
42}
43//____________________________________________________________________________
44void AliITSOnlineCalibrationSPD::ActivateHS(UInt_t hs, Bool_t setval) {
45 // activate hs on this eq
46 if (hs>=6) {
47 Error("AliITSOnlineCalibrationSPD::ActivateHS", "hs (%d) out of bounds.",hs);
48 return;
49 }
50 fActiveHS[hs] = setval;
51}
52//____________________________________________________________________________
53void AliITSOnlineCalibrationSPD::ActivateChip(UInt_t hs, UInt_t chip, Bool_t setval) {
54 // activate chip on this eq
55 if (hs>=6 || chip>=10) {
56 Error("AliITSOnlineCalibrationSPD::ActivateChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
57 return;
58 }
59 fActiveChip[hs*10+chip] = setval;
60}
61//____________________________________________________________________________
62Bool_t AliITSOnlineCalibrationSPD::IsActiveEq() const {
63 // is this eq active?
64 return fActiveEq;
65}
66//____________________________________________________________________________
67Bool_t AliITSOnlineCalibrationSPD::IsActiveHS(UInt_t hs) const {
68 // is this hs active?
69 if (hs>=6) {
70 Error("AliITSOnlineCalibrationSPD::IsActiveHS", "hs (%d) out of bounds.",hs);
71 return kFALSE;
72 }
73 return fActiveHS[hs];
74}
75//____________________________________________________________________________
76Bool_t AliITSOnlineCalibrationSPD::IsActiveChip(UInt_t hs, UInt_t chip) const {
77 // is this chip active?
78 if (hs>=6 || chip>=10) {
79 Error("AliITSOnlineCalibrationSPD::IsActiveChip", "hs,chip (%d,%d) out of bounds.",hs,chip);
80 return kFALSE;
81 }
82 return fActiveChip[hs*10+chip];
83}
84