-#ifndef ALITRDRAWTPSTREAM_H\r
-#define ALITRDRAWTPSTREAM_H\r
-\r
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
- * See cxx source for full Copyright notice */\r
-\r
-/* $Id: AliTRDrawTPStream.h 27696 2008-07-31 09:18:53Z cblume $ */\r
-\r
-///////////////////////////////////////////////////////////////////////////////////////\r
-// //\r
-// This class provides access to pattern generated TRD raw data including //\r
-// configuration data. //\r
-// //\r
-///////////////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-#define NREGS 433 // number of conf. registers\r
-#define NCMD 16 // number of command registers\r
-#define NRO 25 // number of command registers\r
-#define N_BLOCKS 38 // number of blocks\r
-#define N_BLOCKS_n 64 // number of blocks\r
-#define N_PACKD_DAT 0xE0 // the max size of the packed conf., the absolute max is 256!\r
-#define N_NO_BCST 3 // number of regs without broadcast\r
-#define NDMEM 0x400 // number of DMEM words\r
-#define NDBANK 0x100 // number of DBANK words\r
-#define N_IMEM 0x1000 // number of IMEM words/CPU\r
-#define IMEM_EMPTY 0x80000000 // mark for empty IMEM\r
-#define DBANK_ADDR 0xF000 // start address of DBANK in GIO\r
-#define DMEM_ADDR 0xC000 // start address of DMEM in GIO\r
-#define ENDM_CONF 0x7FFF00FE // end marker for the packed configuration\r
-\r
-#include "TObject.h"\r
-#include "TString.h"\r
-#include "AliTRDrawStreamBase.h"\r
-\r
-\r
-\r
-class AliTRDrawTPStream : public AliTRDrawStreamBase\r
-{ // class def begin\r
-\r
- public:\r
-\r
- struct SimpleRegs {\r
- const Char_t * fName; //! Name of the register \r
- UInt_t fAddr; // Address in GIO of TRAP\r
- UInt_t fNbits; // Number of bits, from 1 to 32\r
- UInt_t fResVal; // reset value [mj]\r
- };\r
-\r
- struct CmdRegs{\r
- const Char_t * fName; //! Name of the command register\r
- UInt_t fAddr; // Address in GIO of TRAP\r
- };\r
-\r
- AliTRDrawTPStream(Int_t rawVMajorOpt, UInt_t * pPos);\r
- AliTRDrawTPStream(const AliTRDrawTPStream& st);\r
- AliTRDrawTPStream &operator=(const AliTRDrawTPStream &);\r
- virtual ~AliTRDrawTPStream();\r
-\r
- Bool_t DecodeTPdata();\r
- Bool_t DecodeConfigdata();\r
- Bool_t FillConfig();\r
- Int_t ReadPacked(UInt_t *word, UInt_t *pdata, Int_t * const len);\r
- Int_t UnPackConfN(const UInt_t *pData, Int_t maxLength);\r
- Int_t SetU(UInt_t addr, UInt_t newVal);\r
- Int_t AddrIsDmem(UInt_t addr) const;\r
- Int_t AddrIsDbank(UInt_t addr) const;\r
- UInt_t Addr2Idx(UInt_t addr) const;\r
- const Char_t * Addr2Name(UInt_t addr) const; //!\r
- Char_t CnfStat(UInt_t prop) const;\r
- void PowerUp();\r
- void DumpCnf(Int_t slv);\r
- \r
-\r
-\r
- protected:\r
-\r
- enum DbankProp {kDbankEmpty=0, kDbankHeader, kDbankData, kDbankNoB, kDbankCrc32, kDbankEheader, kScsnDat}; \r
-\r
- SimpleRegs fTrapReg[NREGS]; // all TRAP configuration registers \r
- CmdRegs fCmdReg[NCMD]; // all TRAP command registers\r
- CmdRegs fRoReg[NRO]; // all TRAP command registers\r
-\r
- UInt_t fCnfPro[NREGS]; // something ...\r
- UInt_t fDmemValid[NDMEM]; // 0- empty, 1- valid\r
- UInt_t fRegs[NREGS]; // the actual content of all conf. registers\r
- UInt_t fDmem[NDMEM]; // content of the DMEM, in GIO from 0xC000 to 0xC3FF\r
- UInt_t fDbank[NDBANK]; // 32 bit data, to be send to DBANK\r
- DbankProp fDbankPro[NDBANK]; // property: 0-empty, 1- header, 2- data, 3- data no broadcast, 4- crc-32 checksum, 5- empty header\r
-\r
- UInt_t *fpPos; //! current position in the buffer\r
- Int_t fRawVMajorOpt; // Raw data version\r
-\r
-\r
- ClassDef(AliTRDrawTPStream, 0) // Pattern generated TRD raw data\r
-\r
-}; \r
-\r
-#endif\r
+#ifndef ALITRDRAWTPSTREAM_H\r\r
+#define ALITRDRAWTPSTREAM_H\r\r
+\r\r
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r\r
+ * See cxx source for full Copyright notice */\r\r
+\r\r
+/* $Id: AliTRDrawTPStream.h 27696 2008-07-31 09:18:53Z cblume $ */\r\r
+\r\r
+///////////////////////////////////////////////////////////////////////////////////////\r\r
+// //\r\r
+// This class provides access to pattern generated TRD raw data including //\r\r
+// configuration data. //\r\r
+// //\r\r
+///////////////////////////////////////////////////////////////////////////////////////\r\r
+\r\r
+\r\r
+#define NREGS 433 // number of conf. registers\r\r
+#define NCMD 16 // number of command registers\r\r
+#define NRO 25 // number of command registers\r\r
+#define N_BLOCKS 38 // number of blocks\r\r
+#define N_BLOCKS_n 64 // number of blocks\r\r
+#define N_PACKD_DAT 0xE0 // the max size of the packed conf., the absolute max is 256!\r\r
+#define N_NO_BCST 3 // number of regs without broadcast\r\r
+#define NDMEM 0x400 // number of DMEM words\r\r
+#define NDBANK 0x100 // number of DBANK words\r\r
+#define N_IMEM 0x1000 // number of IMEM words/CPU\r\r
+#define IMEM_EMPTY 0x80000000 // mark for empty IMEM\r\r
+#define DBANK_ADDR 0xF000 // start address of DBANK in GIO\r\r
+#define DMEM_ADDR 0xC000 // start address of DMEM in GIO\r\r
+#define ENDM_CONF 0x7FFF00FE // end marker for the packed configuration\r\r
+\r\r
+//#include "TObject.h"\r\r
+//#include "TString.h"\r\r
+#include "AliTRDrawStreamBase.h"\r\r
+\r\r
+\r\r
+\r\r
+class AliTRDrawTPStream : public AliTRDrawStreamBase\r\r
+{ // class def begin\r\r
+\r\r
+ public:\r\r
+\r\r
+ struct SimpleRegs {\r\r
+ const Char_t * fkName; //! Name of the register \r\r
+ UInt_t fAddr; // Address in GIO of TRAP\r\r
+ UInt_t fNbits; // Number of bits, from 1 to 32\r\r
+ UInt_t fResVal; // reset value [mj]\r\r
+ };\r\r
+\r\r
+ struct CmdRegs{\r\r
+ const Char_t * fkName; //! Name of the command register\r\r
+ UInt_t fAddr; // Address in GIO of TRAP\r\r
+ };\r\r
+\r\r
+ AliTRDrawTPStream(Int_t rawVMajorOpt, UInt_t * pPos);\r\r
+ AliTRDrawTPStream(const AliTRDrawTPStream& st);\r\r
+ AliTRDrawTPStream &operator=(const AliTRDrawTPStream &);\r\r
+ virtual ~AliTRDrawTPStream();\r\r
+\r\r
+ Bool_t DecodeTPdata();\r\r
+ Bool_t DecodeConfigdata();\r\r
+ Bool_t FillConfig();\r\r
+ Int_t ReadPacked(UInt_t *word, UInt_t *pdata, Int_t * const len);\r\r
+ Int_t UnPackConfN(const UInt_t *pData, Int_t maxLength);\r\r
+ Int_t SetU(UInt_t addr, UInt_t newVal);\r\r
+ Int_t AddrIsDmem(UInt_t addr) const;\r\r
+ Int_t AddrIsDbank(UInt_t addr) const;\r\r
+ UInt_t Addr2Idx(UInt_t addr) const;\r\r
+ const Char_t * Addr2Name(UInt_t addr) const; //!\r\r
+ Char_t CnfStat(UInt_t prop) const;\r\r
+ void PowerUp();\r\r
+ void DumpCnf(Int_t slv);\r\r
+ \r\r
+\r\r
+\r\r
+ protected:\r\r
+\r\r
+ enum DbankProp {kDbankEmpty=0, kDbankHeader, kDbankData, kDbankNoB, kDbankCrc32, kDbankEheader, kScsnDat}; \r\r
+\r\r
+ SimpleRegs fTrapReg[NREGS]; // all TRAP configuration registers \r\r
+ CmdRegs fCmdReg[NCMD]; // all TRAP command registers\r\r
+ CmdRegs fRoReg[NRO]; // all TRAP command registers\r\r
+\r\r
+ UInt_t fCnfPro[NREGS]; // something ...\r\r
+ UInt_t fDmemValid[NDMEM]; // 0- empty, 1- valid\r\r
+ UInt_t fRegs[NREGS]; // the actual content of all conf. registers\r\r
+ UInt_t fDmem[NDMEM]; // content of the DMEM, in GIO from 0xC000 to 0xC3FF\r\r
+ UInt_t fDbank[NDBANK]; // 32 bit data, to be send to DBANK\r\r
+ DbankProp fDbankPro[NDBANK]; // property: 0-empty, 1- header, 2- data, 3- data no broadcast, 4- crc-32 checksum, 5- empty header\r\r
+\r\r
+ UInt_t *fpPos; //! current position in the buffer\r\r
+ Int_t fRawVMajorOpt; // Raw data version\r\r
+\r\r
+\r\r
+ ClassDef(AliTRDrawTPStream, 0) // Pattern generated TRD raw data\r\r
+\r\r
+}; \r\r
+\r\r
+#endif\r\r