X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=ITS%2FAliITSRawStreamSPD.h;h=5d7a70c933d828d44f36475bd6beae28ce8aeefb;hp=33836fe551885e57ae490b5d62477322a9fc744a;hb=2d2fd9090de59e76196b8163bda7d9eed93a00a4;hpb=d9c6833588e8d97dfa11cfb17ec830c09d0fbd6f diff --git a/ITS/AliITSRawStreamSPD.h b/ITS/AliITSRawStreamSPD.h index 33836fe5518..5d7a70c933d 100644 --- a/ITS/AliITSRawStreamSPD.h +++ b/ITS/AliITSRawStreamSPD.h @@ -11,6 +11,7 @@ /// /////////////////////////////////////////////////////////////////////////////// +#include "AliRawReader.h" #include "AliITSRawStream.h" #include "AliITSRawStreamSPDErrorLog.h" @@ -21,8 +22,8 @@ class AliITSRawStreamSPD: public AliITSRawStream { AliITSRawStreamSPD& operator=(const AliITSRawStreamSPD& rstream); virtual ~AliITSRawStreamSPD() {}; - virtual Bool_t Next(); - virtual Bool_t ReadCalibHeader(); + virtual Bool_t Next(); + virtual Int_t ReadCalibHeader(); // the 2 methods below are equivalent to AliITSRawStream::GetCoord1 and GetCoord2 // together with the AliITSRawStream::GetModuleID these are the "offline" coordinates @@ -51,13 +52,26 @@ class AliITSRawStreamSPD: public AliITSRawStream { static UInt_t GetOnlineRowFromOffline(UInt_t module, UInt_t rowM); // coordinate conversions - online->offline static UInt_t GetOfflineModuleFromOnline(UInt_t eqId, UInt_t hs, UInt_t chip); + static UInt_t GetOfflineChipKeyFromOnline(UInt_t eqId, UInt_t hs, UInt_t chip); static UInt_t GetOfflineColFromOnline(UInt_t eqId, UInt_t hs, UInt_t chip, UInt_t col); static UInt_t GetOfflineRowFromOnline(UInt_t eqId, UInt_t hs, UInt_t chip, UInt_t row); + Bool_t GetFastOrSignal(UInt_t eq, UInt_t hs, UInt_t chip); + + Int_t GetEventCounter() const {return fEventCounter;} // get last read event counter value + Short_t GetEventCounterFullEq(UInt_t eq) const; + Short_t GetEventCounterFullHS(UInt_t eq, UInt_t hs) const; + Short_t GetEventCounterFullChip(UInt_t eq, UInt_t hs, UInt_t chip) const; + Bool_t IsEventCounterFullConsistent() const; + + Bool_t IsActiveEq(UInt_t eq) const; + Bool_t IsActiveHS(UInt_t eq, UInt_t hs) const; + Bool_t IsActiveChip(UInt_t eq, UInt_t hs, UInt_t chip) const; Bool_t GetHalfStavePresent(UInt_t hs); - // use the methods below to extract the information from the calibration header + Int_t GetHword(UInt_t index); + // use the methods below to extract the information from the scan calibration header: UInt_t GetHrouterNr() const {return (fCalHeadWord[0] & 0x0000003f);} Bool_t GetHhalfStaveScanned(UInt_t hs) const; UInt_t GetHtype() const {return (Int_t)((fCalHeadWord[1]) & 0x000000ff);} @@ -71,18 +85,35 @@ class AliITSRawStreamSPD: public AliITSRawStream { UInt_t GetHrowStart() const {return (UInt_t) ((fCalHeadWord[6]>>24) & 0x000000ff);} UInt_t GetHrowEnd() const {return (UInt_t) ((fCalHeadWord[6]>>16) & 0x000000ff);} UInt_t GetHrowValue() const {return (UInt_t) ((fCalHeadWord[6]>> 8) & 0x000000ff);} + UInt_t GetHrowSpan() const {return (UInt_t) ((fCalHeadWord[6]) & 0x000000ff);} UInt_t GetHdacValue() const {return (Int_t) ((fCalHeadWord[6]) & 0x000000ff);} UInt_t GetHdacHigh(UInt_t hs) const; UInt_t GetHdacLow(UInt_t hs) const; UInt_t GetHTPAmp(UInt_t hs) const; Bool_t GetHminTHchipPresent(UInt_t chip) const; + UInt_t GetHglobalDBversion() const {return fCalHeadWord[16];} + // use the methods below to extract the information from the fo calibration header: + UInt_t GetFOHrouterNr() const {return GetHrouterNr();} + UInt_t GetFOHtype() const {return GetHtype();} + UInt_t GetFOHtriggers() const {return GetHtriggers();} + Bool_t GetFOHchipPresent(UInt_t hs, UInt_t chip) const {return GetHchipPresent(hs,chip);} + UInt_t GetFOHglobalDBversion() const {return fCalHeadWord[5];} + UInt_t GetFOHMatrixID() const {return fCalHeadWord[6] & 0x0000000f;} + UInt_t GetFOHpixelCol() const {return (fCalHeadWord[6] >> 20) & 0x0000001f;} + UInt_t GetFOHpixelRow() const {return (fCalHeadWord[6] >> 10) & 0x000000ff;} + UInt_t GetFOHnumDacs() const; + UInt_t GetFOHdacIndex(UInt_t index) const; + UInt_t GetFOHdacValue(UInt_t index) const; + UInt_t GetFOHchipCount(UInt_t hs, UInt_t chip) const; + void ActivateAdvancedErrorLog(Bool_t activate, AliITSRawStreamSPDErrorLog* advLogger = NULL); - static const Char_t* GetErrorName(UInt_t errorCode); + AliITSRawStreamSPDErrorLog* GetAdvancedErrorLog() {return fAdvLogger;} + static const Char_t* GetErrorName(UInt_t errorCode); enum {kDDLsNumber = 20}; // number of DDLs in SPD enum {kModulesPerDDL = 12}; // number of modules in each DDL - enum {kCalHeadLenMax = 16}; // maximum number of calib header words + enum {kCalHeadLenMax = 64}; // maximum number of calib header words enum ESPDRawStreamError { kTotal, kHeaderMissingErr, @@ -98,7 +129,13 @@ class AliITSRawStreamSPD: public AliITSRawStream { kDDLNumberErr, kHSNumberErr, kChipAddrErr, - kCalHeaderLengthErr + kCalHeaderLengthErr, + kAdvEventCounterErr, // used by SPDmood + kAdvEventCounterOrderErr,// used by SPDmood + kTrailerErrorBitErr, + kLinkRxDetectorFatalErr, + kTSMtriggerErr, + kHighMultiplicityFlag }; private : @@ -110,12 +147,15 @@ class AliITSRawStreamSPD: public AliITSRawStream { void CheckHeaderAndTrailerCount(Int_t ddlID); Int_t fEventCounter; // chip event counter + Short_t fEventCounterFull[20][6][10]; // chip event counter + UShort_t fChipAddr; // chip nr UShort_t fHalfStaveNr; // half stave nr UInt_t fCol; // chip column nr UInt_t fRow; // chip row nr UInt_t fCalHeadWord[kCalHeadLenMax]; // calibration header words - + UInt_t fCalHeadLen; // calibration header length + UShort_t fData; // 16 bit data word read UInt_t fOffset; // offset for cell column UInt_t fHitCount; // counter of hits @@ -136,6 +176,12 @@ class AliITSRawStreamSPD: public AliITSRawStream { Bool_t fAdvancedErrorLog; // is the advanced error logging activated? AliITSRawStreamSPDErrorLog *fAdvLogger; // pointer to special error logger object + Bool_t fFastOrSignal[20][6][10]; // fastor signal bit (one per chip) + + Bool_t fActiveEq[20]; // which equipments are active (found in data) + Bool_t fActiveHS[20][6]; // which half-staves are active (blockattribute bits) + Bool_t fActiveChip[20][6][10]; // which chips are active (found in data) + ClassDef(AliITSRawStreamSPD, 0) // class for reading ITS SPD raw digits };