1 #ifndef ALICALORAWSTREAMV3_H
2 #define ALICALORAWSTREAMV3_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 /// Yuri Kharlov. 23 June 2009
14 ///////////////////////////////////////////////////////////////////////////////
16 // --- ROOT system ---
19 // --- AliRoot header files ---
20 #include "AliAltroRawStreamV3.h"
22 class AliAltroMapping;
24 class AliCaloRawStreamV3: public AliAltroRawStreamV3 {
27 AliCaloRawStreamV3(AliRawReader* rawReader, TString calo, AliAltroMapping **mapping = NULL);
28 virtual ~AliCaloRawStreamV3();
31 virtual Bool_t NextChannel();
33 Int_t GetModule() const {return fModule;}
34 Int_t GetRow() const {return fRow ;} // EMCAL notation
35 Int_t GetColumn() const {return fColumn;} // EMCAL notation
36 Int_t GetCellX() const {return fRow ;} // PHOS notation
37 Int_t GetCellZ() const {return fColumn;} // PHOS notation
38 Int_t GetNRCU() const {return fNRCU ;}
39 Int_t GetNSides() const {return fNSides;}
40 TString GetCalorimeter() const {return fCalo ;}
42 enum EAliCaloFlag { kLowGain=0, kHighGain=1, kTRUData=2, kLEDMonData=3 };
43 Bool_t IsLowGain() const {return (fCaloFlag == kLowGain) ;}
44 Bool_t IsHighGain() const {return (fCaloFlag == kHighGain) ;}
45 Bool_t IsTRUData() const {return (fCaloFlag == kTRUData) ;}
46 Bool_t IsLEDMonData() const {return (fCaloFlag == kLEDMonData);}
48 Int_t GetCaloFlag() const { return fCaloFlag; }
49 Int_t GetFilter() const { return fFilter; }
51 void SkipData(EAliCaloFlag caloFlag=kLEDMonData)
52 { fFilter |= (1<<caloFlag); }
56 AliCaloRawStreamV3& operator = (const AliCaloRawStreamV3& stream);
57 AliCaloRawStreamV3(const AliCaloRawStreamV3& stream);
59 virtual void ApplyAltroMapping();
61 Int_t fModule; // index of current module
62 Int_t fRow; // index of current row
63 Int_t fColumn; // index of current column
64 Int_t fCaloFlag; // low (0) or (1) high gain; see enum EAliCaloFlag above
65 Int_t fFilter; // default 0 = let everything through
66 Int_t fNModules; // number of (super)modules
67 Int_t fNRCU; // number of RCU per (super)module
68 Int_t fNSides; // Division of EMCal in "A" "C" sides
69 TString fCalo; // Calorimeter name
70 Bool_t fExternalMapping; // use external mapping or create a default one
71 AliAltroMapping *fMapping[20]; // pointers to ALTRO mapping
73 ClassDef(AliCaloRawStreamV3, 2) // class for reading PHOS/EMCAL raw digits