1 #ifndef ALIPHOSRAWSTREAM2004_H
2 #define ALIPHOSRAWSTREAM2004_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 PHOS digits in raw data.
12 ///////////////////////////////////////////////////////////////////////////////
14 // --- ROOT system ---
17 // --- AliRoot header files ---
18 #include "AliAltroRawStream.h"
20 class AliPHOSConTableDB ;
23 class AliPHOSRawStream2004: public TObject {
27 AliPHOSRawStream2004(AliRawReader* rawReader);
29 //Class does not own/free any resources, compiler generated version
30 //are OK, but to supress -Weffc++ we define them explicitly.
31 AliPHOSRawStream2004(const AliPHOSRawStream2004 & rhs);
32 AliPHOSRawStream2004 & operator = (const AliPHOSRawStream2004 & rhs);
36 Bool_t ReadDigits(TClonesArray * digits) ;
38 //PHOS does not need this method
39 virtual Bool_t Next(){return kFALSE ;} ;
42 Int_t GetColumn() const {return 0;}
43 Int_t GetModule() const {return 0;}
44 Int_t GetPrevColumn() const {return 0;}
45 Int_t GetPrevModule() const {return 0;}
46 Int_t GetPrevRow() const {return 0;}
47 Int_t GetRow() const {return 0;}
48 Int_t GetSignal() const {return 0;}
49 Int_t GetTime() const {return 0;}
50 Bool_t IsNewColumn() const {return kFALSE; }
51 Bool_t IsNewModule() const {return kFALSE;}
52 Bool_t IsNewRow() const {return kFALSE ;}
55 void SetConTableDB(AliPHOSConTableDB * ctdb){fctdb = ctdb ;}
57 Int_t GetTrigger(void) const {return fTrig ;}
58 Bool_t IsLEDevent(void)const {return fTrig == kLED;}
59 Bool_t IsPULevent(void)const {return fTrig == kPUL;}
60 Bool_t IsPEDevent(void)const {return fTrig == kPED;}
61 Bool_t IsWELevent(void)const {return fTrig == kWEL;}
62 Bool_t IsNELevent(void)const {return fTrig == kNEL;}
66 enum { kLED = 129, // Physics pattern unit for LED events
67 kPUL = 33, // Physics pattern unit for PULSER events
68 kPED = 257, // Physics pattern unit for PEDESTAL events
69 kNEL =1029, // Physics pattern unit for NARROW ELECTRON events
70 kWEL =1027, // Physics pattern unit for WIDE ELECTRON events
71 kSOB =2048, // Pattern unit mask for Start Of Burst trigger or 0 to disable SOB trigger
72 kEOB =4096, // Pattern unit mask for End Of Burst trigger or 0 to disable EOB trigger
74 kPattUnitMarker = 27, // Equipment type marker for Pattern Unit
75 kPattUnitEquipId= 64, // Equipment ID for Pattern Unit
77 kPhosAdcMarker = 22, // Equipment type marker for PhosAdc (Kurchatov ADC)
78 kPhosAdcEquipId= 16, // Equipment ID for PhosAdc
80 kTdcMarker = 26, // Equipment type marker for Tdc
81 kTdcEquipId=128, // Equipment ID for Tdc
83 kChargeAdcMarker = 24, // Equipment type marker for ChargeAdc
84 kChargeAdcEquipId= 32, // Equipment ID for ChargeAdc
86 kScalerMarker = 25, // Equipment type marker for Scaler
87 kScalerEquipId=256}; // Equipment ID for Scaler
91 AliRawReader* fRawReader; //! object for reading the raw data
92 UChar_t* fData; //! raw data
93 AliPHOSConTableDB * fctdb ; //! connection between RAW index and AbsId of crystal
95 Int_t fTrig ; //current trigger
97 ClassDef(AliPHOSRawStream2004, 0) // class for reading PHOS raw digits