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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 /// This class provides access to Calo digits in raw data.
12 ///Modification: Class exported from PHOS to be used by EMCAL and PHOS
13 ///November 2006 Gustavo Conesa Balbastre
14 ///////////////////////////////////////////////////////////////////////////////
16 // --- ROOT system ---
18 // --- AliRoot header files ---
19 #include "AliAltroRawStream.h"
21 class AliAltroMapping;
23 class AliCaloRawStream: public AliAltroRawStream {
26 AliCaloRawStream(AliRawReader* rawReader, TString calo, AliAltroMapping **mapping = NULL);
27 virtual ~AliCaloRawStream();
30 virtual Bool_t Next();
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;}
46 AliCaloRawStream(const AliCaloRawStream& stream);
47 AliCaloRawStream& operator = (const AliCaloRawStream& stream);
49 virtual void ApplyAltroMapping();
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 Bool_t fExternalMapping; // use external mapping or create a default one
60 AliAltroMapping *fMapping[4]; // pointers to ALTRO mapping
62 ClassDef(AliCaloRawStream, 0) // class for reading PHOS/EMCAL raw digits