]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDRawStream.h
In the calculation of the jacobian use the transposed matrix instead of its inverse...
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDRawStream.h
index e2710905da9bda2c3017c58226e0ec613815475f..20d8bb98f37ce3d13785f232798961469fdaef7a 100644 (file)
@@ -46,7 +46,7 @@ class AliHMPIDRawStream: public TObject {
            Int_t   PadPcX      ( Int_t ddl,Int_t row,Int_t dil,Int_t pad                            ) {return AliHMPIDParam::A2X(GetPad(ddl,row,dil,pad));}                                                 //pad pc x # 0..79
            Int_t   PadPcY      ( Int_t ddl,Int_t row,Int_t dil,Int_t pad                            ) {return AliHMPIDParam::A2Y(GetPad(ddl,row,dil,pad));}                                                 //pad pc y # 0..47
 
-    static inline  Char_t* GetErrName(Int_t eType);      
+    static inline const Char_t* GetErrName(Int_t eType);      
     inline  Bool_t SetZeroSup (Bool_t isSup);
     inline  Bool_t GetZeroSup()const; 
     inline  Int_t  GetErrors(Int_t ddl,Int_t eType)const;                                                                                   //Get errors and occurance
@@ -54,8 +54,9 @@ class AliHMPIDRawStream: public TObject {
     UInt_t GetLDCNumber() const{ return fLDCNumber;} //return the number of LDC actually being decoded
     UInt_t GetTimeStamp() const{ return fTimeStamp;} //return the time stamp of the event actually being decoded
 
-  
-        
+    void   SetTurbo(Bool_t isTurbo){fTurbo=isTurbo;}     // Enable/Disable Turbo
+    Bool_t GetTurbo(){ return fTurbo;}                   // Enable Turbo
+    Bool_t Turbo();                                      // Read HMPID Raw data without error checks
     Bool_t ReadHMPIDRawData();                           // Read HMPID Raw data
     Bool_t ReadSegment(Int_t &cntSegment);               // Read Segment
     Bool_t ReadRow(Int_t &cntRow);                       // Read Row
@@ -127,6 +128,7 @@ enum Ebits {kbit0,kbit1 , kbit2, kbit3, kbit4, kbit5, kbit6, kbit7, kbit8,
     Bool_t           fZeroSup;                                           // set if zero suppression is applied
     Int_t           *fPos;                                               // for debug purposes
     Int_t            fiPos;                                              // counter for debug
+    Bool_t           fTurbo;                                             // kTRUE = Turbo decoding is called. DEFAULT: kFALSE = normal decoding is called
     ClassDef(AliHMPIDRawStream, 2)                                       // base class for reading HMPID raw digits
 };
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -195,16 +197,15 @@ Int_t AliHMPIDRawStream::GetPad(Int_t ddl,Int_t row,Int_t dil,Int_t pad)
   // in case the charge from the channels
   // has not been read or invalid arguments
  
-  assert(0<=ddl&&ddl<=13);  
-  assert(1<=row&&row<=24); 
-  assert(1<=dil&&dil<=10);   
-  assert(0<=pad&&pad<=47);  
-  
+  //assert(0<=ddl&&ddl<=13);  assert(1<=row&&row<=24);   assert(1<=dil&&dil<=10);     assert(0<=pad&&pad<=47);  
+  /* clm */ //corrupted data from ddl aborts the pedestal run at the assert
+  if(ddl<0 || ddl >13 || row<1 || row >25 || dil<1 || dil >10 || pad<0 || pad >47 ) return -1;
+  /* clm */
   Int_t a2y[6]={3,2,4,1,5,0};     //pady for a given padress (for single DILOGIC chip)
-                                  Int_t ch=ddl/2;
+  Int_t ch=ddl/2;
   Int_t tmp=(24-row)/8;
   Int_t pc=(ddl%2)?5-2*tmp:2*tmp;
-  Int_t px=(dil-1)*8+pad/6;
+  Int_t px=(kNDILOGICAdd+1 - dil)*8-pad/6-1;  //flip according to Paolo (2-9-2008)
 
   tmp=(ddl%2)?row-1:(24-row);
   Int_t py=6*(tmp%8)+a2y[pad%6];
@@ -373,16 +374,16 @@ Int_t AliHMPIDRawStream::GetErrors(Int_t ddl,Int_t eType)const
   else return fNumOfErr[ddl][eType];
 } //GetErrors()     
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Char_t* AliHMPIDRawStream::GetErrName(Int_t eType)
+const Char_t* AliHMPIDRawStream::GetErrName(Int_t eType)
 {
   // Return the name of the error for a given error tye during raw data reading
   // Arguments: errorType
   // Returns: error or -999 if error Type does not exist
-  Char_t *eName[]={ "kRawDataSizeErr",  "kRowMarkerErr" , "kWrongRowErr" , "kWrongDilogicErr",
+  const Char_t *eName[]={ "kRawDataSizeErr",  "kRowMarkerErr" , "kWrongRowErr" , "kWrongDilogicErr",
                     "kWrongPadErr"   ,  "kEoEFlagErr"   , "kEoESizeErr"  , "kEoEDILOGICErr",
                     "kEoERowErr"     ,  "kBadSegWordErr", "kWrongSegErr" , "kRowMarkerSizeErr",
                     "kPedQZero"      ,  "kSumErr"        };                       
-  Char_t *eNoErr="NotDefinedErrorType";
+  const Char_t *eNoErr="NotDefinedErrorType";
   if(eType<0 || eType>kSumErr) return eNoErr;
   else                         return eName[eType];
 }//GetErrName()