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