]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFFEEReader.cxx
some coverity fixes
[u/mrichter/AliRoot.git] / TOF / AliTOFFEEReader.cxx
index c19ff41622f5422b38fd043805f5faef72bafc99..8cd7420dccbd193570c60ca90951a8315b79470d 100644 (file)
@@ -69,6 +69,7 @@ AliTOFFEEReader::AliTOFFEEReader(const AliTOFFEEReader &source) :
    *
    */
 
+  Reset();
   memcpy(fFEEConfig, source.fFEEConfig, sizeof(AliTOFFEEConfig));
   memcpy(fFEElightConfig, source.fFEElightConfig, sizeof(AliTOFFEElightConfig));
 }
@@ -121,6 +122,21 @@ AliTOFFEEReader::ResetChannelEnabledArray()
 
 //_______________________________________________________________
 
+void
+AliTOFFEEReader::ResetTriggerMaskArray()
+{
+  /*
+   *
+   * reset trigger mask array
+   *
+   */
+
+  for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++)
+    fTriggerMask[iddl] = 0x0;
+}
+
+//_______________________________________________________________
+
 void
 AliTOFFEEReader::Reset()
 {
@@ -135,6 +151,9 @@ AliTOFFEEReader::Reset()
     fMatchingWindow[iIndex] = 0;
     fLatencyWindow[iIndex] = 0;
   }
+
+  for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++)
+    fTriggerMask[iddl] = 0x0;
 }
 
 //_______________________________________________________________
@@ -244,6 +263,8 @@ AliTOFFEEReader::ParseFEElightConfig()
 
   AliInfo("parsing TOF FEElight config");
 
+  Reset();
+
   AliTOFcalibHisto calibHisto;
   calibHisto.LoadCalibHisto();
 
@@ -260,6 +281,12 @@ AliTOFFEEReader::ParseFEElightConfig()
     fMatchingWindow[index] = channelConfig->GetMatchingWindow();
     fLatencyWindow[index] = channelConfig->GetLatencyWindow();
   }
+
+  AliTOFFEEtriggerConfig *triggerConfig = NULL;
+  for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++) {
+    triggerConfig = fFEElightConfig->GetTriggerConfig(iddl);
+    fTriggerMask[iddl] = triggerConfig->GetStatusMap();
+  }
  
   return nEnabled;
 }
@@ -384,7 +411,7 @@ AliTOFFEEReader::IsChannelEnabled(Int_t iDDL, Int_t iTRM, Int_t iChain, Int_t iT
 //_______________________________________________________________
 
 Int_t 
-AliTOFFEEReader::GetMatchingWindow(Int_t iDDL, Int_t iTRM, Int_t iChain, Int_t iTDC, Int_t iChannel) const
+AliTOFFEEReader::GetMatchingWindow(Int_t iDDL, Int_t iTRM, Int_t, Int_t, Int_t) const
 {
   /*
    *
@@ -400,8 +427,6 @@ AliTOFFEEReader::GetMatchingWindow(Int_t iDDL, Int_t iTRM, Int_t iChain, Int_t i
   AliTOFCrateConfig *crateConfig;
   AliTOFTRMConfig *trmConfig;
 
-  iChain = 0; iTDC = 0; iChannel = 0; /* dummy for the time being */
-  
   /* get and check fee config */
   if (!(feeConfig = GetFEEConfig()))
     return 0;
@@ -445,7 +470,7 @@ AliTOFFEEReader::DumpFEEConfig()
   AliInfo("dumping TOF FEE config");
   AliInfo("-------------------------------------");
   AliInfo(Form("version: %d", feeConfig->GetVersion()));
-  AliInfo(Form("dump time: %d", feeConfig->GetDumpTime()));
+  AliInfo(Form("dump time: %d", (Int_t)feeConfig->GetDumpTime()));
   AliInfo(Form("run number: %d", feeConfig->GetRunNumber()));
   AliInfo(Form("run type: %d", feeConfig->GetRunType()));
   AliInfo("-------------------------------------");