]>
Commit | Line | Data |
---|---|---|
07627591 | 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> | |
c5bbaa2c | 15 | #include <AliTPCROC.h> |
07627591 | 16 | |
17 | //_____________________________________________________________________________ | |
18 | class AliTPCCalROC : public TObject { | |
19 | ||
20 | public: | |
21 | ||
22 | AliTPCCalROC(); | |
c5bbaa2c | 23 | AliTPCCalROC(UInt_t sector); |
07627591 | 24 | AliTPCCalROC(const AliTPCCalROC &c); |
179c6296 | 25 | AliTPCCalROC &operator = (const AliTPCCalROC & param); |
07627591 | 26 | virtual ~AliTPCCalROC(); |
c5bbaa2c | 27 | UInt_t GetNrows() const { return fNRows;}; |
28 | UInt_t GetNchannels() const { return fNChannels;}; | |
29 | UInt_t GetNPads(UInt_t row) const { return (row<fNRows)? AliTPCROC::Instance()->GetNPads(fSector,row):0;}; | |
30 | Float_t GetValue(UInt_t row, UInt_t pad) const { return ( (row<fNRows) && (fIndexes[row]+pad)<fNChannels)? fData[fIndexes[row]+pad]: 0; }; | |
31 | Float_t GetValue(UInt_t channel) const { return fData[channel]; }; | |
32 | void SetValue(UInt_t row, UInt_t pad, Float_t vd) { if ( row<fNRows && (fIndexes[row]+pad)<fNChannels)fData[fIndexes[row]+pad]= vd; }; | |
33 | void SetValue(UInt_t channel, Float_t vd) {fData[channel]= vd; }; | |
2e9bedc9 | 34 | virtual void Draw(Option_t* option = ""); |
c5bbaa2c | 35 | static void Test(); |
36 | protected: | |
37 | UInt_t fSector; // sector number | |
38 | UInt_t fNChannels; // number of channels | |
39 | UInt_t fNRows; // number of rows | |
40 | const UInt_t* fIndexes; //!indexes | |
41 | Float_t *fData; //[fNChannels] Data | |
07627591 | 42 | ClassDef(AliTPCCalROC,1) // TPC ROC calibration class |
43 | ||
44 | }; | |
45 | ||
46 | #endif |