]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRawStream.h
Cuts in primary and final state particles are now optionial for AliHLTMCEvent. Usable...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRawStream.h
1 #ifndef ALIPHOSRAWSTREAM_H
2 #define ALIPHOSRAWSTREAM_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 PHOS digits in raw data.
11 ///
12 ///////////////////////////////////////////////////////////////////////////////
13
14 // --- ROOT system ---
15
16 // --- AliRoot header files ---
17 #include "AliAltroRawStream.h"
18 class AliRawReader;
19 class AliAltroMapping;
20
21 class AliPHOSRawStream: public AliAltroRawStream {
22
23 public :
24   AliPHOSRawStream(AliRawReader* rawReader);
25   virtual ~AliPHOSRawStream();
26  
27   virtual void             Reset();
28   virtual Bool_t           Next();
29   
30   Int_t            GetModule()     const {return fModule;}
31   Int_t            GetRow()        const {return fRow;}
32   Int_t            GetColumn()     const {return fColumn;}
33   Int_t            GetPrevModule() const {return fPrevModule;}
34   Int_t            GetPrevRow()    const {return fPrevRow;}
35   Int_t            GetPrevColumn() const {return fPrevColumn;}
36   Bool_t           IsNewModule()   const {return GetModule() != GetPrevModule();}
37   Bool_t           IsNewRow()      const {return (GetRow() != GetPrevRow()) || IsNewModule();}
38   Bool_t           IsNewColumn()   const {return (GetColumn() != GetPrevColumn()) || IsNewRow();}
39   Bool_t           IsLowGain()     const {return (!fGain);} 
40
41 protected:
42
43   AliPHOSRawStream(const AliPHOSRawStream& stream);
44   AliPHOSRawStream& operator = (const AliPHOSRawStream& stream);
45
46   virtual void ApplyAltroMapping();
47
48   Int_t            fModule;       // index of current module
49   Int_t            fPrevModule;   // index of previous module
50   Int_t            fRow;          // index of current row
51   Int_t            fPrevRow;      // index of previous row
52   Int_t            fColumn;       // index of current column
53   Int_t            fPrevColumn;   // index of previous column
54   Bool_t           fGain;         // low (0) or (1) high gain
55   
56   AliAltroMapping *fMapping[4];   // pointers to ALTRO mapping
57
58   ClassDef(AliPHOSRawStream, 0)   // class for reading PHOS raw digits
59
60 };
61
62 #endif
63