]>
Commit | Line | Data |
---|---|---|
2906f4c2 | 1 | #ifndef ALIITSRAWSTREAMSDD_H |
2 | #define ALIITSRAWSTREAMSDD_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 | /// | |
1ba0280f | 10 | /// This class provides access to ITS SDD digits in raw data |
11 | /// (default=simulated data). | |
2906f4c2 | 12 | /////////////////////////////////////////////////////////////////////////////// |
13 | ||
14 | #include "AliITSRawStream.h" | |
979b5a5f | 15 | #include "AliITSDDLModuleMapSDD.h" |
2906f4c2 | 16 | |
17 | class AliRawReader; | |
18 | ||
19 | ||
20 | class AliITSRawStreamSDD: public AliITSRawStream { | |
21 | public : | |
22 | AliITSRawStreamSDD(AliRawReader* rawReader); | |
979b5a5f | 23 | AliITSRawStreamSDD(const AliITSRawStreamSDD& rs); |
24 | AliITSRawStreamSDD& operator=(const AliITSRawStreamSDD& rs); | |
25 | virtual ~AliITSRawStreamSDD(); | |
2906f4c2 | 26 | |
27 | virtual Bool_t Next(); | |
28 | ||
1ba0280f | 29 | virtual Int_t GetAnode() const {return fCoord1;} |
30 | virtual Int_t GetTime() const {return fCoord2;} | |
31 | virtual Int_t GetChannel() const {return fChannel;} | |
a97b3678 | 32 | virtual Int_t ReadJitter() const {return 0;} |
33 | virtual Int_t GetCarlosId() const {return fCarlosId;} | |
979b5a5f | 34 | virtual Int_t GetEventId() const {return fEventId;} |
5dfa68c5 | 35 | |
979b5a5f | 36 | virtual void SetDDLModuleMap(AliITSDDLModuleMapSDD* ddlsdd){fDDLModuleMap->SetDDLMap(ddlsdd);} |
a97b3678 | 37 | virtual void SetLowCarlosThreshold(Int_t th, Int_t i) |
38 | {fLowThreshold[i]=th;} | |
cfe25271 | 39 | virtual void SetNCarlos(Int_t nC=12){fNCarlos=nC;} |
979b5a5f | 40 | Int_t GetModuleNumber(UInt_t iDDL, UInt_t iModule) const { |
41 | return fDDLModuleMap->GetModuleNumber(iDDL,iModule); | |
42 | } | |
a97b3678 | 43 | virtual void Reset(); |
765a9f95 | 44 | virtual Bool_t ResetSkip(Int_t ddln); |
2906f4c2 | 45 | |
a97b3678 | 46 | enum {kDDLsNumber = 24}; // number of DDLs in SDD |
47 | enum {kModulesPerDDL = 12}; // number of modules in each DDL | |
765a9f95 | 48 | enum {kCarlosWords = 12}; // number of FIFOCARLOS Words |
49 | enum {kFifoWords = 4}; // number of FIFO Words | |
50 | enum ESDDRawStreamError { | |
39a7c5cc | 51 | kDataError = 1, |
52 | kDataFormatErr = 2 | |
53 | }; | |
1ba0280f | 54 | protected: |
1ba0280f | 55 | virtual UInt_t ReadBits(); |
56 | virtual Int_t DecompAmbra(Int_t value) const; | |
2906f4c2 | 57 | |
38300302 | 58 | static const UInt_t fgkCodeLength[8]; //code length |
2906f4c2 | 59 | |
979b5a5f | 60 | AliITSDDLModuleMapSDD* fDDLModuleMap; // mapping DDL/module -> module number |
2906f4c2 | 61 | UInt_t fData; // data read for file |
a97b3678 | 62 | Int_t fSkip[kDDLsNumber];// number of skipped words |
a97b3678 | 63 | Int_t fEventId; // event ID from header |
14dceddf | 64 | Int_t fCarlosId; // carlos ID |
1ba0280f | 65 | Int_t fChannel; // current channel |
66 | Int_t fJitter; // jitter between L0 and pascal stop (x25ns) | |
a97b3678 | 67 | ULong64_t fChannelData[kModulesPerDDL][2];// packed data for the 2 channels |
68 | UInt_t fLastBit[kModulesPerDDL][2]; // last filled bit in fChannelData | |
69 | UInt_t fChannelCode[kModulesPerDDL][2];// current channel code | |
70 | Bool_t fReadCode[kModulesPerDDL][2]; // next bits are code or data | |
71 | UInt_t fReadBits[kModulesPerDDL][2]; // number of bits to read | |
1ba0280f | 72 | Int_t fLowThreshold[2]; // low Carlos threshold |
a97b3678 | 73 | Int_t fNCarlos; // number of Carlos |
14dceddf | 74 | Int_t fNfifo[kFifoWords]; // FIFO number |
a97b3678 | 75 | Int_t fTimeBin[kModulesPerDDL][2]; // current timebin [ncarlos][nchannels] |
76 | Int_t fAnode[kModulesPerDDL][2]; // current anode [ncarlos][nchannels] | |
77 | Int_t fDDL; //current ddl number | |
14dceddf | 78 | UInt_t fICarlosWord[kCarlosWords]; // Carlos words |
79 | UInt_t fIFifoWord[kFifoWords]; // FIFO words | |
80 | Int_t fICountFoot[kModulesPerDDL]; // counter for carlos footer words | |
81 | Int_t fEndWords; //number of 3f1f1f1f | |
82 | Int_t fResetSkip; //if it is 0, the ResetSkip Funcion is called | |
5dfa68c5 | 83 | ClassDef(AliITSRawStreamSDD, 7) // class for reading ITS SDD raw digits |
2906f4c2 | 84 | }; |
85 | ||
86 | #endif |