]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtrapConfig.cxx
Coding rules and warnings
[u/mrichter/AliRoot.git] / TRD / AliTRDtrapConfig.cxx
index f35e743f34a681d02b82890c19780f25e1d3f25a..8503813aa2d8fcab9512109e0dddb6cb7fbe505b 100644 (file)
@@ -1,3 +1,26 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  TRAP config                                                           //
+//                                                                        //
+//  Author: J. Klein (Jochen.Klein@cern.ch)                               //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
+
 #include "AliLog.h"\r
 \r
 #include "AliTRDgeometry.h"\r
@@ -790,7 +813,7 @@ Bool_t AliTRDtrapConfig::AddValues(UInt_t det, UInt_t cmd, UInt_t extali, UInt_t
     for(Int_t linkPair=0; linkPair<fgkMaxLinkPairs; linkPair++) {\r
       if(ExtAliToAli(extali, linkPair, rocType)!=0) {\r
         Int_t i=0;\r
-        while(fMcmlist[i] != -1 && i<fMcmlistSize) {\r
+        while(fMcmlist[i] != -1 && i<fgkMcmlistSize) {\r
           if(fMcmlist[i]==127)\r
             SetTrapReg( (TrapReg_t) mcmReg, data, det);\r
           else\r
@@ -868,7 +891,7 @@ Int_t AliTRDtrapConfig::ExtAliToAli( UInt_t dest, UShort_t linkpair, UShort_t ro
 }\r
 \r
 \r
-Short_t AliTRDtrapConfig::GetRobAB( UShort_t robsel, UShort_t linkpair )\r
+Short_t AliTRDtrapConfig::GetRobAB( UShort_t robsel, UShort_t linkpair ) const\r
 {\r
   // Converts the ROB part of the extended ALICE ID to robs\r
 \r
@@ -915,12 +938,15 @@ Short_t AliTRDtrapConfig::ChipmaskToMCMlist( Int_t cmA, Int_t cmB, UShort_t link
 }\r
 \r
 \r
-AliTRDtrapConfig::TrapReg_t AliTRDtrapConfig::GetRegByAddress(Int_t address)\r
+AliTRDtrapConfig::TrapReg_t AliTRDtrapConfig::GetRegByAddress(Int_t address) const\r
 {\r
+  // get register by its address
+  // used for reading of configuration data as sent to real FEE
+
   TrapReg_t mcmReg = kLastReg;\r
   Int_t reg  = 0;\r
   do {\r
-    if(fRegs[reg].addr == address)\r
+    if(fRegs[reg].fAddr == address)\r
       mcmReg = (TrapReg_t) reg;\r
     reg++;\r
   }  while (mcmReg == kLastReg && reg < kLastReg);\r