Coverity
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Feb 2011 10:38:16 +0000 (10:38 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Feb 2011 10:38:16 +0000 (10:38 +0000)
EVE/EveDet/AliEveITSDigitsInfo.cxx
EVE/EveDet/AliEveITSScaledModule.cxx
EVE/EveDet/AliEveListAnalyserEditor.cxx
EVE/EveDet/AliEveTRDData.cxx

index 7c5624a..4e577ed 100644 (file)
@@ -287,7 +287,9 @@ void AliEveITSDigitsInfo::ReadRaw(AliRawReader* raw, Int_t mode)
        digits = fSPDmap[module];
        if (digits == 0)
          fSPDmap[module] = digits = new TClonesArray("AliITSdigit", 16);
-      }
+      } else if(!digits) {
+                 AliFatal("No module found\n");
+         }
 
       AliITSdigit* d = new ((*digits)[digits->GetEntriesFast()]) AliITSdigit();
       d->SetCoord1(column);
index e8d2609..09c1a02 100644 (file)
@@ -262,7 +262,7 @@ void AliEveITSScaledModule::LoadQuads()
        }
        else
        {
-         sd = dynamic_cast<ScaledDigit_t*>(GetId(miter->second));
+         sd = static_cast<ScaledDigit_t*>(GetId(miter->second));
          if(c1 < sd->fMinI)
            sd->fMinI = c1;
          else if( c1 > sd->fMaxI)
index d7cfb1e..6adc6a3 100644 (file)
@@ -1398,18 +1398,12 @@ void AliEveGeneralMacroWizard::Create(Int_t type)
       // Cancel creation
       if (!useGivenType2)
       {
-        if (typeStr != 0)
-        {
-          typeStr->Clear();
-          delete typeStr;
-        }
+        typeStr->Clear();
+        delete typeStr;
         typeStr = 0;
 
-        if (typeStr2 != 0)
-        {
-          typeStr2->Clear();
-          delete typeStr2;
-        }
+        typeStr2->Clear();
+        delete typeStr2;
         typeStr2 = 0;
 
         return;
index 244af5a..115431a 100644 (file)
@@ -532,10 +532,10 @@ void AliEveTRDTrack::SetStatus(UChar_t s)
       //trk->CookPID();
   
       Int_t species = 0; Float_t pid = 0.;
-      for(Int_t is=0; is<(Int_t) AliPID::kSPECIES; ++is) 
+      for(Int_t is=0; is<AliPID::kSPECIES; ++is) 
         if(trk->GetPID(is) > pid){
           pid = trk->GetPID(is);
-          species = is;
+                 species = (AliPID::EParticleType) is;
         }
       switch(species){
       case AliPID::kElectron: