]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Introduce decoding of configuration data
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Feb 2009 12:10:37 +0000 (12:10 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Feb 2009 12:10:37 +0000 (12:10 +0000)
TRD/AliTRDrawStream.cxx
TRD/AliTRDrawStream.h
TRD/AliTRDrawTPStream.cxx

index 1298e510f23ef832d22be29488f988d22a4c2c31..d8a649b5121a8a196c7c90658d2a457248dd0179 100644 (file)
@@ -120,6 +120,7 @@ Bool_t AliTRDrawStream::fgEnableMemoryReset = kTRUE;
 Bool_t AliTRDrawStream::fgStackNumberChecker = kTRUE;\r
 Bool_t AliTRDrawStream::fgStackLinkNumberChecker = kTRUE;\r
 Bool_t AliTRDrawStream::fgSkipData = kTRUE;\r
+Bool_t AliTRDrawStream::fgEnableDecodeConfigData = kFALSE;\r
 Int_t AliTRDrawStream::fgDumpHead = -1;\r
 Int_t  AliTRDrawStream::fgCommonAdditive = 0;\r
 Int_t AliTRDrawStream::fgEmptySignals[] = \r
@@ -1118,7 +1119,6 @@ AliTRDrawStream::DecodeSM(void *buffer, UInt_t length)
           fgLastIndex = -1 ; // to check mcm number odering \r
     if (DecodeHC() == kFALSE)\r
       {\r
-        if ((fHC->fRawVMajor & 64) == 64 && fHC->fRawVMajorOpt == 7) continue; // special treatmeant for the configuration data which doesn't have data-end-marker \r
         fSM.fClean = kFALSE;\r
               if (fHC->fCorrupted < 16)  SeekEndOfData(); // In case that we meet END_OF_TRACKLET_MARKERNEW \r
                                                           // during ADC data decoding or MCM header decoding\r
@@ -1490,7 +1490,6 @@ AliTRDrawStream::DecodeMCMheader()
   fMCM->fROW = fTRDfeeParam->GetPadRowFromMCM(fMCM->fROB, fMCM->fMCM); \r
 \r
   if ((fHC->fRawVMajor > 2 && fHC->fRawVMajor <5) || ((fHC->fRawVMajor & 32) == 32)) //cover old and new version definition of ZS data\r
-  //if ((fHC->fRawVMajor > 2 && fHC->fRawVMajor <5) || (fHC->fRawVMajor > 31 && fHC->fRawVMajor < 64)) //cover old and new version definition of ZS data\r
     {\r
       fpPos++;\r
       if ( fpPos < fpEnd )\r
@@ -1700,7 +1699,6 @@ AliTRDrawStream::DecodeHC()
          if (fgWarnError) AliError("failed to decode test pattern data");\r
          return kFALSE; \r
         }\r
-      else if(fHC->fRawVMajorOpt == 7) return kFALSE; // always return false in case of configuration data(special treatment due to lack of data-end-marker).\r
       return kTRUE;\r
     } \r
 \r
index f9d6d17f0b8ed75e6de6f54452f8ddcd23ea1ac1..56471e5732e83c5cd5a85982c6aba854fe922da4 100644 (file)
@@ -534,6 +534,10 @@ class AliTRDrawStream : public AliTRDrawStreamBase
   static void    SetSubtractBaseline(Int_t baseline) {fgCommonAdditive = baseline;}
   Int_t          GetCommonAdditive() const {return fgCommonAdditive;}           // return the common additive
 
+  static void    EnableDecodeConfigData() {fgEnableDecodeConfigData = kTRUE;} // allow configuration data decoding
+  static Bool_t  fgEnableDecodeConfigData;
+
+
   //--------------------------------------------------------
   // Decoding functions
   //--------------------------------------------------------
index f126900b65ae8a063890a2d83d893639aec39c51..28eb09af9c25993934d65c3f02fcdb426da5a23b 100644 (file)
@@ -32,6 +32,7 @@
 #include "TString.h"
 #include "AliLog.h"
 
+#include "AliTRDrawStream.h"
 #include "AliTRDrawTPStream.h"
 
 
@@ -114,14 +115,11 @@ AliTRDrawTPStream::~AliTRDrawTPStream()
 //---------------------------------------------------------------------
 Bool_t AliTRDrawTPStream::DecodeTPdata()
 {
-  //////////////////////////////////////////////////////////////////////////////////////
-  //since this is not yet tested with test pattern data, by default, it returns false!!!  
-  AliError("These are test pattern data. You need other reader");
-  return kFALSE;
-  //////////////////////////////////////////////////////////////////////////////////////
 
-  if (fRawVMajorOpt == 7) 
+  if (fRawVMajorOpt == 7)
     {
+     AliInfo("This is configuration data event read by first trigger.");
+     if(!AliTRDrawStream::fgEnableDecodeConfigData) return kTRUE;
      if (DecodeConfigdata() == kFALSE) // configuration data 
        {
         AliError("failed to to decode configuration data");
@@ -174,7 +172,7 @@ Int_t AliTRDrawTPStream::ReadPacked(UInt_t *word, UInt_t *pData, Int_t *nWords)
     err = 0;
 
     // decode mcm header
-    if(!MCM_HEADER_MASK_ERR(vword)) err++;
+    if(MCM_HEADER_MASK_ERR(vword)) err++;
 
     robNum = MCM_ROB_NUMBER(vword);
     mcmNum = MCM_MCM_NUMBER(vword);
@@ -199,6 +197,9 @@ Int_t AliTRDrawTPStream::ReadPacked(UInt_t *word, UInt_t *pData, Int_t *nWords)
         iLength++;
     } while (NoEndMarker && (iLength < 256));
 
+    word++;       
+    fpPos = word;
+
     *nWords = iLength;
     if (iLength == 0) 
       return -1;