Coverity fix 8443 : sjena
authorsjena <sjena@cern.ch>
Mon, 1 Sep 2014 09:32:28 +0000 (11:32 +0200)
committersjena <sjena@cern.ch>
Mon, 1 Sep 2014 09:32:28 +0000 (11:32 +0200)
PMD/AliPMDDDLRawData.cxx
PMD/AliPMDDigitizer.cxx

index faca049..7c59513 100644 (file)
@@ -101,7 +101,7 @@ void AliPMDDDLRawData::WritePMDRawData(TTree *treeD)
 
 
   AliRawDataHeaderSim header;
-  UInt_t sizeRawData = 0;
+ // UInt_t sizeRawData = 0;  //coverity (8443) fix satya (1/9/2014) 
   
   const Int_t kbusSize = 51;
   const Int_t kSize = 1536;
@@ -345,7 +345,7 @@ void AliPMDDDLRawData::WritePMDRawData(TTree *treeD)
       // write the total number of words per ddl and bring the
       // pointer to the current file position and close it
       UInt_t cFPosition = outfile->Tellp();
-      sizeRawData = cFPosition - bHPosition - sizeof(header);
+      //sizeRawData = cFPosition - bHPosition - sizeof(header); // coverity (8443) fix satya (1/9/2014) 
 
       header.fSize = cFPosition - bHPosition;
       header.SetAttribute(0);  // valid data
index d77c940..57c7914 100644 (file)
@@ -271,7 +271,7 @@ void AliPMDDigitizer::Hits2SDigits(Int_t ievt)
   Float_t xPos = 0., yPos = 0., zPos = 0.;
   Int_t xpad = -1, ypad = -1;
   Float_t edep = 0.;
-  Float_t vx = -999.0, vy = -999.0, vz = -999.0;
+ // Float_t vx = -999.0, vy = -999.0, vz = -999.0; //coverity (8443) fix satya (1/9/2014) 
 
 
   if (!fSDigits) fSDigits = new TClonesArray("AliPMDsdigit", 1000);
@@ -323,24 +323,25 @@ void AliPMDDigitizer::Hits2SDigits(Int_t ievt)
              trackpid  = mparticle->GetPdgCode();
              Int_t  ks = mparticle->GetStatusCode();
              Int_t imo;
-             Int_t tracknoOld=0, trackpidOld=0, statusOld = 0;
+             Int_t tracknoOld=0, trackpidOld=0;
+             // Int_t statusOld = 0; //coverity (8443) fix satya (1/9/2014)
              
              if (mparticle->GetFirstMother() == -1)
                {
                  tracknoOld  = trackno;
                  trackpidOld = trackpid;
-                 statusOld   = -1;
+                 //statusOld   = -1;
                }
-             Int_t igstatus = 0;
+            // Int_t igstatus = 0;
 
-             Int_t trnotemp = trackno;    // Modified on 25th Nov 2009
+             Int_t trnotemp = trackno;    
              if(ks==1||(imo = mparticle->GetFirstMother())<0 ){
-               vx = mparticle->Vx();
-               vy = mparticle->Vy();
-               vz = mparticle->Vz();
+             //        vx = mparticle->Vx(); //coverity (8443) fix satya (1/9/2014) 
+             //        vy = mparticle->Vy();
+             //        vz = mparticle->Vz();
                
-               if(trackpid==kGamma||trackpid==11||trackpid==-11||
-                  trackpid==kPi0)igstatus=1;
+             //        if(trackpid==kGamma||trackpid==11||trackpid==-11||
+             //           trackpid==kPi0)igstatus=1;
              }
              
              
@@ -350,11 +351,10 @@ void AliPMDDigitizer::Hits2SDigits(Int_t ievt)
                  mparticle =  gAlice->GetMCApp()->Particle(imo);
                  trackpid = mparticle->GetPdgCode();
                  ks = mparticle->GetStatusCode();
-                 vx = mparticle->Vx();
-                 vy = mparticle->Vy();
-                 vz = mparticle->Vz();
+               //  vx = mparticle->Vx();//coverity (8443) fix satya (1/9/2014) 
+               //  vy = mparticle->Vy();
+               //  vz = mparticle->Vz();
                  
-                 // Modified on 25th Nov 2009
 
                  trnotemp = trackno;
                   if(trackpid == 111)
@@ -368,8 +368,8 @@ void AliPMDDigitizer::Hits2SDigits(Int_t ievt)
                  // end of modification on 25th Nov 2009
                }
         
-             if(trackpid==kGamma||trackpid==11||trackpid==-11||
-                trackpid==kPi0)igstatus=1;
+            // if(trackpid==kGamma||trackpid==11||trackpid==-11||
+            // trackpid==kPi0)igstatus=1;
              mtrackpid=trackpid;
              mtrackno=trackno;
              trackpid=trackpidOld;
@@ -516,7 +516,7 @@ void AliPMDDigitizer::Hits2Digits(Int_t ievt)
   Float_t xPos = 0., yPos = 0., zPos = 0.;
   Int_t xpad = -1, ypad = -1;
   Float_t edep = 0.;
-  Float_t vx = -999.0, vy = -999.0, vz = -999.0;
+ // Float_t vx = -999.0, vy = -999.0, vz = -999.0; //coverity (8443) fix satya (1/9/2014) 
 
   if (!fDigits) fDigits = new TClonesArray("AliPMDdigit", 1000);
   ResetDigit();
@@ -574,24 +574,25 @@ void AliPMDDigitizer::Hits2Digits(Int_t ievt)
              trackpid  = mparticle->GetPdgCode();
              Int_t  ks = mparticle->GetStatusCode();
              Int_t imo;
-             Int_t tracknoOld=0, trackpidOld=0, statusOld = 0;
+             Int_t tracknoOld=0, trackpidOld=0;
+              //Int_t statusOld = 0; //coverity (8443) fix satya (1/9/2014)
              if (mparticle->GetFirstMother() == -1)
                {
                  tracknoOld  = trackno;
                  trackpidOld = trackpid;
-                 statusOld   = -1;
+                // statusOld   = -1; 
                }
 
-             Int_t igstatus = 0;
+                // Int_t igstatus = 0;  
 
-             Int_t trnotemp = trackno;   // modified on 25th Nov 2009
+             Int_t trnotemp = trackno;   
              if(ks==1||(imo = mparticle->GetFirstMother())<0 ){
-               vx = mparticle->Vx();
-               vy = mparticle->Vy();
-               vz = mparticle->Vz();
+               //      vx = mparticle->Vx(); //coverity (8443) fix satya (1/9/2014) 
+               //      vy = mparticle->Vy();
+               //      vz = mparticle->Vz();
                
-               if(trackpid==kGamma||trackpid==11||trackpid==-11||trackpid==kPi0)
-                 igstatus=1;
+               //      if(trackpid==kGamma||trackpid==11||trackpid==-11||trackpid==kPi0)
+                       //       igstatus=1;  
              }
              
              
@@ -601,11 +602,10 @@ void AliPMDDigitizer::Hits2Digits(Int_t ievt)
                  mparticle =  gAlice->GetMCApp()->Particle(imo);
                  trackpid = mparticle->GetPdgCode();
                  ks = mparticle->GetStatusCode();
-                 vx = mparticle->Vx();
-                 vy = mparticle->Vy();
-                 vz = mparticle->Vz();
+               //        vx = mparticle->Vx(); //coverity (8443) fix satya (1/9/2014) 
+               //        vy = mparticle->Vy();
+               //        vz = mparticle->Vz();
                  
-                 // Modified on 25th Nov 2009
                  
                  trnotemp = trackno;
                   if(trackpid == 111)
@@ -618,8 +618,8 @@ void AliPMDDigitizer::Hits2Digits(Int_t ievt)
                    }
                }
         
-             if(trackpid==kGamma||trackpid==11||trackpid==-11||trackpid==kPi0)
-               igstatus=1;
+               // if(trackpid==kGamma||trackpid==11||trackpid==-11||trackpid==kPi0)
+               //      igstatus=1; //coverity (8443) fix satya (1/9/2014) 
              mtrackpid=trackpid;
              mtrackno=trackno;
              trackpid=trackpidOld;