]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGlobalCrateConfig.cxx
Fixing Doxygen warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONGlobalCrateConfig.cxx
index fc3b1da676e8911a029d6f09bf7a2153c6ad104a..b0d884b04441ff7ae5d82ea438d329127528bf3d 100644 (file)
@@ -121,8 +121,8 @@ Int_t AliMUONGlobalCrateConfig::ReadData(const TString& fileName)
     // enable
     in.getline(line, 255);
     tmp = AliMpHelper::Normalize(line);
-    UChar_t en = 0;
-    sscanf(tmp.Data(), "%c", &en);
+    UInt_t en = 0;
+    sscanf(tmp.Data(), "%x", &en);
     SetGlobalCrateEnable(en);
 
     in.getline(line, 255);
@@ -378,6 +378,43 @@ void AliMUONGlobalCrateConfig::SetGlobalRegister(Int_t index, UInt_t reg)
   fGlobalRegisters[index] = reg;
 }
    
+//______________________________________________________________________________
+void AliMUONGlobalCrateConfig::SetGlobalMask(Int_t index, UInt_t mask)  
+{
+  /// set one word of the global mask
+
+  if (index >= 0 && index < 4) {
+    SetGlobalRegister(index,mask);
+  } else {
+    AliWarning(Form("Check register number of the mask (%d) \n",index));
+  }
+
+}
+
+//______________________________________________________________________________
+UInt_t AliMUONGlobalCrateConfig::GetGlobalMask(Int_t index) const       
+{
+  /// return one word of the global mask
+  if (index >= 0 && index < 4) {
+    return fGlobalRegisters[index];
+  } else {
+    AliWarning(Form("Check register number of the mask (%d) \n",index));
+    return 0;
+  }
+}
+
+//______________________________________________________________________________
+Bool_t AliMUONGlobalCrateConfig::GetMasksOn() const       
+{
+  /// indicates if global masks are active on global inputs
+
+  // test 7th lsb
+  if (fGlobalRegisters[4] & 0x40) return kTRUE;
+
+  return kFALSE;
+
+}
+
 //______________________________________________________________________________
 UInt_t AliMUONGlobalCrateConfig::GetFetRegister(Int_t index) const       
 {