a09a2da4 |
1 | #ifndef ALIPMDRAWSTREAM_H |
2 | #define ALIPMDRAWSTREAM_H |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
6 | /* $Id$ */ |
7 | |
8 | /////////////////////////////////////////////////////////////////////////////// |
9 | /// |
10 | /// This class provides access to PMD digits in raw data. |
11 | /// |
12 | /////////////////////////////////////////////////////////////////////////////// |
13 | |
14 | #include <TObject.h> |
15 | |
16 | class AliRawReader; |
17 | |
18 | |
19 | class AliPMDRawStream: public TObject { |
20 | public : |
21 | AliPMDRawStream(AliRawReader* rawReader); |
22 | virtual ~AliPMDRawStream(); |
23 | |
24 | virtual Bool_t Next(); |
25 | |
26 | Int_t GetModule() const {return fModule;}; |
27 | Int_t GetPrevModule() const {return fPrevModule;}; |
28 | Bool_t IsNewModule() const {return fModule != fPrevModule;}; |
29 | Int_t GetMCM() const {return fMCM;}; |
30 | Int_t GetChannel() const {return fChannel;}; |
31 | Int_t GetRow() const {return fRow;}; |
32 | Int_t GetColumn() const {return fColumn;}; |
33 | Int_t GetSignal() const {return fSignal;}; |
34 | Int_t GetDetector() const {return fDetector;}; |
35 | Int_t GetSMN() const {return fSMN;}; |
36 | |
37 | |
38 | enum {kDDLOffset = 0xC00}; // offset for DDL numbers |
39 | |
40 | private : |
41 | AliPMDRawStream(const AliPMDRawStream& stream); |
42 | AliPMDRawStream& operator = (const AliPMDRawStream& stream); |
43 | |
44 | void GetRowCol(Int_t ddlno, UInt_t mcmno, UInt_t chno, |
45 | Int_t &um, Int_t &row, Int_t &col) const; |
46 | |
47 | AliRawReader* fRawReader; // object for reading the raw data |
48 | |
49 | Int_t fModule; // index of current module |
50 | Int_t fPrevModule; // index of previous module |
51 | Int_t fMCM; // index of current MCM |
52 | Int_t fChannel; // index of current channel |
53 | Int_t fRow; // index of current row |
54 | Int_t fColumn; // index of current column |
55 | Int_t fSignal; // signal in ADC counts |
56 | Int_t fDetector; // PRE = 0, CPV = 1 |
57 | Int_t fSMN; // serial module number (0-23) |
58 | |
59 | ClassDef(AliPMDRawStream, 0) // class for reading PMD raw digits |
60 | }; |
61 | |
62 | #endif |