]>
Commit | Line | Data |
---|---|---|
d84933b0 | 1 | #ifndef ALICALORAWSTREAM_H |
2 | #define ALICALORAWSTREAM_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 Calo digits in raw data. | |
11 | /// | |
12 | ///Modification: Class exported from PHOS to be used by EMCAL and PHOS | |
13 | ///November 2006 Gustavo Conesa Balbastre | |
14 | /////////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | // --- ROOT system --- | |
17 | ||
18 | // --- AliRoot header files --- | |
19 | #include "AliAltroRawStream.h" | |
20 | class AliRawReader; | |
21 | class AliAltroMapping; | |
22 | ||
23 | class AliCaloRawStream: public AliAltroRawStream { | |
24 | ||
25 | public : | |
26 | AliCaloRawStream(AliRawReader* rawReader, TString calo); | |
27 | virtual ~AliCaloRawStream(); | |
28 | ||
29 | virtual void Reset(); | |
30 | virtual Bool_t Next(); | |
31 | ||
32 | Int_t GetModule() const {return fModule;} | |
33 | Int_t GetRow() const {return fRow;} | |
34 | Int_t GetColumn() const {return fColumn;} | |
35 | Int_t GetPrevModule() const {return fPrevModule;} | |
36 | Int_t GetPrevRow() const {return fPrevRow;} | |
37 | Int_t GetPrevColumn() const {return fPrevColumn;} | |
38 | Bool_t IsNewModule() const {return GetModule() != GetPrevModule();} | |
39 | Bool_t IsNewRow() const {return (GetRow() != GetPrevRow()) || IsNewModule();} | |
40 | Bool_t IsNewColumn() const {return (GetColumn() != GetPrevColumn()) || IsNewRow();} | |
41 | Bool_t IsLowGain() const {return (!fGain);} | |
42 | Int_t GetNRCU() const {return fNRCU;} | |
43 | ||
44 | protected: | |
45 | ||
46 | AliCaloRawStream(const AliCaloRawStream& stream); | |
47 | AliCaloRawStream& operator = (const AliCaloRawStream& stream); | |
48 | ||
49 | virtual void ApplyAltroMapping(); | |
50 | ||
51 | Int_t fModule; // index of current module | |
52 | Int_t fPrevModule; // index of previous module | |
53 | Int_t fRow; // index of current row | |
54 | Int_t fPrevRow; // index of previous row | |
55 | Int_t fColumn; // index of current column | |
56 | Int_t fPrevColumn; // index of previous column | |
57 | Bool_t fGain; // low (0) or (1) high gain | |
58 | Int_t fNRCU; // number of RCU per (super)module | |
59 | AliAltroMapping *fMapping[4]; // pointers to ALTRO mapping | |
60 | ||
61 | ClassDef(AliCaloRawStream, 0) // class for reading PHOS/EMCAL raw digits | |
62 | ||
63 | }; | |
64 | ||
65 | #endif | |
66 |