]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalSingleChamberStatus.h
Making online tracklets usable in offline reconstruction
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalSingleChamberStatus.h
CommitLineData
7754cd1f 1#ifndef AliTRDCalSingleChamberStatus_H
2#define AliTRDCalSingleChamberStatus_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDCalSingleChamberStatus.h,v */
7
2745a409 8////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration base class containing status values for one ROC //
11// //
12////////////////////////////////////////////////////////////////////////////
7754cd1f 13
14#include <TObject.h>
15
16//_____________________________________________________________________________
17class AliTRDCalSingleChamberStatus : public TObject {
18
19 public:
20
0e09df31 21 enum { kMasked = 2
22 , kPadBridgedLeft = 4
23 , kPadBridgedRight = 8
fa7427d0 24 , kReadSecond = 16
25 , kNotConnected = 32
26};
0e09df31 27
7754cd1f 28 AliTRDCalSingleChamberStatus();
29 AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols);
30 AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c);
2745a409 31 virtual ~AliTRDCalSingleChamberStatus();
32 AliTRDCalSingleChamberStatus &operator=(const AliTRDCalSingleChamberStatus &c);
7754cd1f 33
2745a409 34 virtual void Copy(TObject &c) const;
7754cd1f 35
0e09df31 36 Bool_t IsMasked(Int_t col, Int_t row) const { return ((GetStatus(col,row) & kMasked)
37 ? kTRUE
38 : kFALSE); };
fa7427d0 39 Bool_t IsBridgedLeft(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedLeft) ? kTRUE : kFALSE); };
40 Bool_t IsBridgedRight(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedRight) ? kTRUE : kFALSE); };
41 Bool_t IsNotConnected(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kNotConnected) ? kTRUE : kFALSE); };
0e09df31 42 Int_t GetNrows() const { return fNrows; };
43 Int_t GetNcols() const { return fNcols; };
7754cd1f 44
0e09df31 45 Int_t GetChannel(Int_t col, Int_t row) const { return row+col*fNrows; };
46 Int_t GetNchannels() const { return fNchannels; };
47 Char_t GetStatus(Int_t ich) const { return fData[ich]; };
48 Char_t GetStatus(Int_t col, Int_t row) const { return fData[GetChannel(col,row)]; };
2745a409 49
0e09df31 50 void SetStatus(Int_t ich, Char_t vd) { fData[ich] = vd; };
51 void SetStatus(Int_t col, Int_t row, Char_t vd) { fData[GetChannel(col,row)] = vd; };
7754cd1f 52
53 protected:
54
2745a409 55 Int_t fPla; // Plane number
56 Int_t fCha; // Chamber number
7754cd1f 57
2745a409 58 Int_t fNrows; // Number of rows
59 Int_t fNcols; // Number of columns
7754cd1f 60
2745a409 61 Int_t fNchannels; // Number of channels
62 Char_t *fData; //[fNchannels] Data
7754cd1f 63
2745a409 64 ClassDef(AliTRDCalSingleChamberStatus,1) // TRD ROC calibration class
7754cd1f 65
66};
67
68#endif