]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalROC.h
TPC parameters and Pedestals added to the database (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCCalROC.h
1 #ifndef ALITPCCALROC_H
2 #define ALITPCCALROC_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTPCCalROC.h,v */
7
8 //////////////////////////////////////////////////
9 //                                              //
10 //  TPC calibration base class for one ROC      //
11 //                                              //
12 //////////////////////////////////////////////////
13
14 #include <TObject.h>
15 #include <AliTPCROC.h>
16
17 //_____________________________________________________________________________
18 class AliTPCCalROC : public TObject {
19
20  public:
21   
22   AliTPCCalROC();
23   AliTPCCalROC(UInt_t sector);
24   AliTPCCalROC(const AliTPCCalROC &c);
25   virtual           ~AliTPCCalROC();  
26   UInt_t        GetNrows() const               { return fNRows;};
27   UInt_t        GetNchannels()       const     { return fNChannels;};
28   UInt_t        GetNPads(UInt_t row)  const     { return (row<fNRows)? AliTPCROC::Instance()->GetNPads(fSector,row):0;};
29   Float_t      GetValue(UInt_t row, UInt_t pad) const { return ( (row<fNRows) && (fIndexes[row]+pad)<fNChannels)? fData[fIndexes[row]+pad]: 0; };
30   Float_t      GetValue(UInt_t channel) const { return  fData[channel]; };
31   void         SetValue(UInt_t row, UInt_t pad, Float_t vd) { if ( row<fNRows && (fIndexes[row]+pad)<fNChannels)fData[fIndexes[row]+pad]= vd; };
32   void         SetValue(UInt_t channel, Float_t vd) {fData[channel]= vd; };
33   virtual void Draw(Option_t* option = "");
34   static void Test();
35  protected:
36   UInt_t     fSector;          // sector number
37   UInt_t     fNChannels;       // number of channels
38   UInt_t     fNRows;           // number of rows
39   const UInt_t* fIndexes;      //!indexes
40   Float_t  *fData;            //[fNChannels] Data
41   ClassDef(AliTPCCalROC,1)    //  TPC ROC calibration class
42
43 };
44
45 #endif