]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRegionalTriggerBoard.cxx
One more attempt to fix coverity MISSING_COPY
[u/mrichter/AliRoot.git] / MUON / AliMUONRegionalTriggerBoard.cxx
index 80cdb7b4e55291e937c042f27fd6b7c7f0fb3976..4d5c22dcf9c66a8f89a3f4500adde1d2e95aac82 100644 (file)
@@ -70,6 +70,8 @@ void AliMUONRegionalTriggerBoard::Response()
 // [+, -] * [Hpt, Lpt]
 // transformed to [+, -, US, LS] * [Hpt, Lpt]
 
+  if ( IsNull() ) return; // Do nothing if all local responses are null
+
   Int_t t[16];
 
    for (Int_t i = 0; i < 16; ++i)
@@ -99,11 +101,12 @@ void AliMUONRegionalTriggerBoard::Response()
       
       rank /= 2; 
    }
+
    fResponse = t[0]; // 8-bit [H4:L4]
 }
 
 //___________________________________________
-UShort_t AliMUONRegionalTriggerBoard::Algo(UShort_t i, UShort_t j, char *thres, Int_t level)
+UShort_t AliMUONRegionalTriggerBoard::Algo(UShort_t i, UShort_t j, const char *thres, Int_t level)
 {
 /// implementation of the regional algorithm
 /// similar to the global algorithm except for the
@@ -210,5 +213,24 @@ void AliMUONRegionalTriggerBoard::Mask(UShort_t mask)
     fMask = mask;
 }
 
+//___________________________________________
+Bool_t AliMUONRegionalTriggerBoard::IsNull()
+{
+  /// Check if all local response are null
+  for (Int_t i=0; i<16; i++) {
+    if ( fLocalResponse[i] ) return kFALSE;
+  }
+  return kTRUE;
+}
 
 
+//___________________________________________
+void AliMUONRegionalTriggerBoard::Reset()
+{
+  /// Reset board
+
+  for (Int_t i=0; i<16; ++i) fLocalResponse[i] = 0;
+
+  fResponse = 0;
+  
+}