Line data Source code
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 */
5 :
6 : /* $Id: $ */
7 :
8 : ///////////////////////////////////////////////////////////////////////////////
9 : ///
10 : /// This class provides access to Calo digits in raw data.
11 : ///
12 : /// Yuri Kharlov. 23 June 2009
13 : ///
14 : ///////////////////////////////////////////////////////////////////////////////
15 :
16 : // --- ROOT system ---
17 : #include "TString.h"
18 :
19 : // --- AliRoot header files ---
20 : #include "AliAltroRawStreamV3.h"
21 : class AliRawReader;
22 : class AliAltroMapping;
23 :
24 : class AliCaloRawStreamV3: public AliAltroRawStreamV3 {
25 :
26 : public :
27 : AliCaloRawStreamV3(AliRawReader* rawReader, TString calo, AliAltroMapping **mapping = NULL);
28 : virtual ~AliCaloRawStreamV3();
29 :
30 : virtual void Reset();
31 : virtual Bool_t NextChannel();
32 :
33 424 : Int_t GetModule() const {return fModule;}
34 116 : Int_t GetRow() const {return fRow ;} // EMCAL notation
35 116 : Int_t GetColumn() const {return fColumn;} // EMCAL notation
36 308 : Int_t GetCellX() const {return fRow ;} // PHOS notation
37 308 : Int_t GetCellZ() const {return fColumn;} // PHOS notation
38 0 : Int_t GetNRCU() const {return fNRCU ;}
39 0 : Int_t GetNSides() const {return fNSides;}
40 0 : TString GetCalorimeter() const {return fCalo ;}
41 :
42 : enum EAliCaloFlag { kLowGain=0, kHighGain=1, kTRUData=2, kLEDMonData=3 };
43 116 : Bool_t IsLowGain() const {return (fCaloFlag == kLowGain) ;}
44 0 : Bool_t IsHighGain() const {return (fCaloFlag == kHighGain) ;}
45 366 : Bool_t IsTRUData() const {return (fCaloFlag == kTRUData) ;}
46 0 : Bool_t IsLEDMonData() const {return (fCaloFlag == kLEDMonData);}
47 :
48 424 : Int_t GetCaloFlag() const { return fCaloFlag; }
49 :
50 : protected:
51 :
52 : AliCaloRawStreamV3& operator = (const AliCaloRawStreamV3& stream);
53 : AliCaloRawStreamV3(const AliCaloRawStreamV3& stream);
54 :
55 : virtual void ApplyAltroMapping();
56 :
57 : Int_t fModule; // index of current module
58 : Int_t fRow; // index of current row
59 : Int_t fColumn; // index of current column
60 : Int_t fCaloFlag; // low (0) or (1) high gain; see enum EAliCaloFlag above
61 : Int_t fNModules; // number of (super)modules
62 : Int_t fNRCU; // number of RCU per (super)module
63 : Int_t fNSides; // Division of EMCal in "A" "C" sides
64 : TString fCalo; // Calorimeter name
65 : Bool_t fExternalMapping; // use external mapping or create a default one
66 : AliAltroMapping *fMapping[20]; // pointers to ALTRO mapping
67 :
68 336 : ClassDef(AliCaloRawStreamV3, 3) // class for reading PHOS/EMCAL raw digits
69 :
70 : };
71 :
72 : #endif
|