Coverity (Frederick)
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 11:14:21 +0000 (11:14 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Oct 2010 11:14:21 +0000 (11:14 +0000)
TRD/AliTRDSaxHandler.cxx

index 77afe76..38621eb 100644 (file)
@@ -324,7 +324,7 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
   // if there is a new DCS element put it in the correct array\r
   if (CompareString(tagName, "DCS")) {\r
     if (fSystem == kInsideFEE) {\r
-      fDCSFEEObj = new AliTRDCalDCSFEE();\r
+      fDCSFEEObj = new AliTRDCalDCSFEE(name,dcsTitle);\r
       fDCSFEEObj->SetDCSid(dcsId);\r
     }\r
     if (fSystem == kInsidePTR) {\r
@@ -422,9 +422,13 @@ void AliTRDSaxHandler::OnEndElement(const char *name)
     if (fLevel1Tag == kInsideGainTable) {\r
       if (CompareString(tagName, "name"))   fDCSFEEObj->SetGainTableName(fContent);\r
       if (CompareString(tagName, "desc"))   fDCSFEEObj->SetGainTableDesc(fContent);\r
-      if (CompareString(tagName, "adcdac")) fDCSFEEObj->SetGainTableAdcdac(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
-      if (CompareString(tagName, "fgfn"))   fDCSFEEObj->SetGainTableFgfn(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
-      if (CompareString(tagName, "fgan"))   fDCSFEEObj->SetGainTableFgan(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
+      if (fCurrentROB>=0 && fCurrentMCM>=0) {\r
+       if (CompareString(tagName, "adcdac")) fDCSFEEObj->SetGainTableAdcdac(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (fCurrentADC>=0) {\r
+         if (CompareString(tagName, "fgfn"))   fDCSFEEObj->SetGainTableFgfn(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
+         if (CompareString(tagName, "fgan"))   fDCSFEEObj->SetGainTableFgan(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
+       }\r
+      }\r
     }\r
     if (fInsideRstate == 1) {\r
       if (fCurrentROB>=0 && fCurrentMCM>=0) {\r