///////////////////////////////////////////////////////////////
#include "TObject.h"
-#include "AliTOFHitData.h"
+
+//#include "AliTOFHitData.h"
#include "AliTOFHitDataBuffer.h"
#include "AliTOFDecoder.h"
+class AliTOFHitData;
/**********************************
* OLD DEFINITIONS
#define DRM_C_BIT_MASK 0x00008000
#define DRM_C_BIT_POSITION 15
+//DRM Vers-ID mask/position
+#define DRM_VERS_ID_MASK 0x001f0000
+#define DRM_VERS_ID_POSITION 16
+
+//DRM DRM Header size mask/position
+#define DRM_HEADER_SIZE_MASK 0x01e00000
+#define DRM_HEADER_SIZE_POSITION 21
+
//DRM status header 2 word required bit pattern
#define DRM_STATUS_HEADER_2 0x40000001
#define DRM_ENABLE_ID_MASK 0x00007ff0
#define DRM_ENABLE_ID_POSITION 4
+//DRM zero in word2 mask/position
+#define DRM_ZERO_WORD2_MASK 0x00008000
+#define DRM_ZERO_WORD2_POSITION 15
+
//DRM fault ID mask/position
#define DRM_FAULT_ID_MASK 0x07ff0000
#define DRM_FAULT_ID_POSITION 16
+//DRM RTO bit mask/position
+#define DRM_RTO_BIT_MASK 0x08000000
+#define DRM_RTO_BIT_POSITION 27
+
//DRM status header 3 word required bit pattern
#define DRM_STATUS_HEADER_3 0x40000001
-//DRM TTC event counter mask/position
-#define DRM_TTC_EVENT_COUNTER_MASK 0x0ffffff0
-#define DRM_TTC_EVENT_COUNTER_POSITION 4
+//DRM L0 BCID mask/position
+#define DRM_L0_BCID_MASK 0x0000fff0
+#define DRM_L0_BCID_POSITION 4
+
+//DRM Run Time Info mask/position
+#define DRM_RUNTIME_INFO_MASK 0x0fff0000
+#define DRM_RUNTIME_INFO_POSITION 16
+
+//DRM status header 4 word required bit pattern
+#define DRM_STATUS_HEADER_4 0x40000001
+
+//DRM Temperature mask/position
+#define DRM_TEMPERATURE_MASK 0x00003ff0
+#define DRM_TEMPERATURE_POSITION 4
+
+//DRM 1st zero in word4 mask/position
+#define DRM_ZERO_1_WORD4_MASK 0x00004000
+#define DRM_ZERO_1_WORD4_POSITION 14
+
+//DRM ACK mask/position
+#define DRM_ACK_MASK 0x00008000
+#define DRM_ACK_POSITION 15
+
+//DRM Sens AD mask/position
+#define DRM_SENS_AD_MASK 0x00070000
+#define DRM_SENS_AD_POSITION 16
+
+//DRM 2nd zero in word4 mask/position
+#define DRM_ZERO_2_WORD4_MASK 0x00080000
+#define DRM_ZERO_2_WORD4_POSITION 19
//DRM event CRC mask/position
-//#define DRM_EVENT_CRC_MASK 0x001ffff0
#define DRM_EVENT_CRC_MASK 0x000ffff0
#define DRM_EVENT_CRC_POSITION 4
class TClonesArray;
class AliRawReader;
-class AliTOFGeometry;
class AliTOFrawData;
class AliTOFRawStream: public TObject {
Int_t GetStrip() const {return fStrip;};
Int_t GetPadZ() const {return fPadZ;};
Int_t GetPadX() const {return fPadX;};
- Int_t GetIndex(Int_t *detId); // Get channel index for Online Calibration
Int_t GetTofBin() const {return fTime;};
Int_t GetToTbin() const {return fToT;};
Int_t GetSectorNumber(Int_t nDDL) const;
Bool_t DecodeDDL(Int_t DDLMin, Int_t DDLMax, Int_t verbose);
+ Bool_t Decode(Int_t verbose);
+ AliTOFDecoder *GetDecoder() {return fDecoder;};
+ void SetV2718Patch(Bool_t V2718Patch = kTRUE) {fDecoder->SetV2718Patch(V2718Patch);};
+
AliTOFHitDataBuffer *GetDataBuffer(Int_t DDL) {return fDataBuffer[DDL];};
AliTOFHitDataBuffer *GetPackedDataBuffer(Int_t DDL) {return fPackedDataBuffer[DDL];};
Bool_t LoadRawDataBuffers(Int_t indexDDL, Int_t verbose = 0);
+ enum ETOFRawStreamError {
+ kPadXError = 0,
+ kPadAlongStripError = 1,
+ kPlateError = 2,
+ kStripError = 3,
+ kSectorError = 4,
+ kDDLMinError = 5,
+ kDDLMaxError = 6,
+ kDDLdataReading = 7,
+ kDDLDecoder = 8
+ };
+
private:
Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const;
Int_t fPadX; // pad number along the strip [0;47]
Int_t fPadZ; // pad-row number [0;1]
- AliTOFGeometry *fTOFGeometry; // pointer to the TOF geometry
-
Int_t fPackedDigits; // counter for packed digits
Int_t fWordType; // word type
AliTOFHitDataBuffer *fDataBuffer[72]; // pointer to AliTOFHitDataBuffer
AliTOFHitDataBuffer *fPackedDataBuffer[72]; // pointer to AliTOFHitDataBuffer
- ClassDef(AliTOFRawStream, 2) // class for reading TOF raw digits
+ ClassDef(AliTOFRawStream, 3) // class for reading TOF raw digits
};
#endif