]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Revert "Fix for coverity (AdC)"
authorhristov <Peter.Hristov@cern.ch>
Tue, 22 Jul 2014 15:46:57 +0000 (17:46 +0200)
committerhristov <Peter.Hristov@cern.ch>
Wed, 20 Aug 2014 08:24:56 +0000 (10:24 +0200)
This reverts commit 1d9e38e2e9166632b03667a21cf8ae1b353a49a2.

TOF/AliTOFClusterFinderV1.cxx
TOF/AliTOFDDLRawData.cxx
TOF/AliTOFQADataMakerRec.cxx
TOF/AliTOFSDigitizer.cxx
TOF/AliTOFTrigger.cxx
TOF/AliTOFcalibHisto.cxx
TOF/AliTOFv6T0.cxx

index a0c5c63ce8d2b8bc9582f2e1ef465e7542d84f36..607bfdc04f3d1fd14b981527a028214897cd4d0d 100644 (file)
@@ -1043,6 +1043,10 @@ void AliTOFClusterFinderV1::FindClusters34(Int_t nSector,
   Float_t pos[3] = {0.,0.,0.};
 
   Int_t jj = 0;
+  Int_t interestingPadX[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadX[jj] = -1;
+  Int_t interestingPadZ[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadZ[jj] = -1;
   Double_t interestingTOT[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingTOT[jj] = 0;
   Double_t interestingADC[kMaxNumberOfInterestingPads];
@@ -1059,6 +1063,9 @@ void AliTOFClusterFinderV1::FindClusters34(Int_t nSector,
   Float_t interestingZ[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingZ[jj] = 0;
 
+  Float_t interDigit[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interDigit[jj] = 0;
+
   Int_t padsCluster[11];
   padsCluster[0] = nSector;
   padsCluster[1] = nPlate;
@@ -1501,6 +1508,10 @@ void AliTOFClusterFinderV1::FindClusters23(Int_t nSector,
   Float_t pos[3] = {0.,0.,0.};
 
   Int_t jj = 0;
+  Int_t interestingPadX[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadX[jj] = -1;
+  Int_t interestingPadZ[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadZ[jj] = -1;
   Double_t interestingTOT[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingTOT[jj] = 0;
   Double_t interestingADC[kMaxNumberOfInterestingPads];
@@ -1517,6 +1528,9 @@ void AliTOFClusterFinderV1::FindClusters23(Int_t nSector,
   Float_t interestingZ[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingZ[jj] = 0;
 
+  Float_t interDigit[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interDigit[jj] = 0;
+
   Int_t padsCluster[11];
   padsCluster[0] = nSector;
   padsCluster[1] = nPlate;
@@ -1901,6 +1915,10 @@ void AliTOFClusterFinderV1::FindClusters24(Int_t nSector,
   Float_t pos[3] = {0.,0.,0.};
 
   Int_t jj = 0;
+  Int_t interestingPadX[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadX[jj] = -1;
+  Int_t interestingPadZ[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadZ[jj] = -1;
   Double_t interestingTOT[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingTOT[jj] = 0;
   Double_t interestingADC[kMaxNumberOfInterestingPads];
@@ -1917,6 +1935,9 @@ void AliTOFClusterFinderV1::FindClusters24(Int_t nSector,
   Float_t interestingZ[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingZ[jj] = 0;
 
+  Float_t interDigit[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interDigit[jj] = 0;
+
   Int_t padsCluster[11];
   padsCluster[0] = nSector;
   padsCluster[1] = nPlate;
@@ -2312,6 +2333,10 @@ void AliTOFClusterFinderV1::FindClustersPerStrip(Int_t nSector,
   Float_t pos[3] = {0.,0.,0.};
 
   Int_t jj = 0;
+  Int_t interestingPadX[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadX[jj] = -1;
+  Int_t interestingPadZ[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingPadZ[jj] = -1;
   Double_t interestingTOT[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingTOT[jj] = 0;
   Double_t interestingADC[kMaxNumberOfInterestingPads];
@@ -2328,6 +2353,9 @@ void AliTOFClusterFinderV1::FindClustersPerStrip(Int_t nSector,
   Float_t interestingZ[kMaxNumberOfInterestingPads];
   for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interestingZ[jj] = 0;
 
+  Float_t interDigit[kMaxNumberOfInterestingPads];
+  for (jj=0; jj<kMaxNumberOfInterestingPads; jj++) interDigit[jj] = 0;
+
   Int_t padsCluster[11];
   padsCluster[0] = nSector;
   padsCluster[1] = nPlate;
index 9e59bef048ec89a306a257914fa6677abbea6a14..099903e19a0e1d4b10060ffc91d94dc98012e112 100644 (file)
@@ -1028,6 +1028,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
     return;
   }
   
+  Int_t psArray[1000];
   UInt_t localBuffer[1000];
   Int_t localIndex = -1;
 
@@ -1152,7 +1153,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
          localIndex++; fWordsPerTRM++;
          localBuffer[localIndex]=baseWord;
-         //psArray[localIndex]=dummyPS;
+         psArray[localIndex]=dummyPS;
 
          baseWord=0;
 
@@ -1310,7 +1311,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
          localIndex++; fWordsPerTRM++;
          localBuffer[localIndex]=baseWord;
-         //psArray[localIndex]=dummyPS;
+         psArray[localIndex]=dummyPS;
 
          baseWord=0;
 
@@ -1371,7 +1372,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
          localIndex++; fWordsPerTRM++;
          localBuffer[localIndex]=baseWord;
-         //psArray[localIndex]=dummyPS;
+         psArray[localIndex]=dummyPS;
 
          baseWord=0;
 
@@ -1423,7 +1424,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
        localIndex++; fWordsPerTRM++;
        localBuffer[localIndex]=baseWord;
-       //psArray[localIndex]=2;
+       psArray[localIndex]=2;
 
        baseWord=0;
 
@@ -1472,7 +1473,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
        localIndex++; fWordsPerTRM++;
        localBuffer[localIndex]=baseWord;
-       //psArray[localIndex]=1;
+       psArray[localIndex]=1;
 
        baseWord=0;
 
@@ -1528,7 +1529,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
 
          localIndex++; fWordsPerTRM++;
          localBuffer[localIndex]=baseWord;
-         //psArray[localIndex]=dummyPS;
+         psArray[localIndex]=dummyPS;
 
          baseWord=0;
 
@@ -1554,7 +1555,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
        fIndex++;
        buf[fIndex] = localBuffer[jj];
        localBuffer[jj] = 0;
-       //psArray[jj] = -1;
+       psArray[jj] = -1;
       }
 
     }
@@ -1589,7 +1590,7 @@ void AliTOFDDLRawData::MakeTDCdigits(Int_t nDDL, Int_t nTRM, Int_t iChain, UInt_
            fIndex++;
            buf[fIndex] = localBuffer[jj];
            localBuffer[jj] = 0;
-           //psArray[jj] = -1;
+           psArray[jj] = -1;
        }
 
        //} // else if (maxMeasuresPerChannelInTDC>1)
index 0cf63ed726fe94064afc2dcd733e1e6f500a45a4..fb597a3182af3554e912de1a688b5ca3986d2aef 100644 (file)
@@ -808,11 +808,12 @@ void AliTOFQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   if (fIsSOC) {
     Int_t geoId[5]={-1,-1,-1,-1,-1};// pgeoId=(sm, mod, strip, padZ, padX)
     Int_t detId[5]={-1,-1,-1,-1,-1};//detID=(ddl,trm,tdc, chain,channel)
-
+    Int_t trmIndex=-1;
     for (Int_t ch = 0; ch <  fCalibData->GetSize(); ch++) {
       AliTOFGeometry::GetVolumeIndices(ch,geoId);
       AliTOFRawStream::Geant2EquipmentId(geoId,detId); 
       if ((detId[1]<0)||(detId[0]<0)) continue;
+      trmIndex=(detId[1]-3)+detId[0]*10;
 
       if ( (!(fCalibData->GetNoiseStatus(ch)==AliTOFChannelOnlineStatusArray::kTOFNoiseBad))
           && (fCalibData->GetHWStatus(ch) == AliTOFChannelOnlineStatusArray::kTOFHWOk) ){
index e86109eaba95db9e5f110206f34e8c3832180401..9898ff04e434f209c3afbfaf7b9649036dff33ab 100644 (file)
@@ -1153,6 +1153,10 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
   //         res[iPad] - resolution of the pad, ns
   //         timeWalk[iPad] - time walk of the pad, ns
   //         timeDelay[iPad] - time delay for neighbouring pad to hited pad, ns
+  //         PadId[iPad] - Pad Identifier
+  //                    E | F    -->   PadId[iPad] = 5 | 6
+  //                    A | B    -->   PadId[iPad] = 1 | 2
+  //                    C | D    -->   PadId[iPad] = 3 | 4
   //         nTail[iPad] - the tail number, = 1 for tailA, = 2 for tailB
   //         qCenterPad - charge extimated for each pad, arb. units
   //         weightsSum - sum of weights extimated for each pad fired, arb. units
@@ -1165,6 +1169,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
   Float_t logOfqInd = 0.;
   Float_t weightsSum = 0.;
   Int_t nTail[4]  = {0,0,0,0};
+  Int_t padId[4]  = {0,0,0,0};
   Float_t eff[4]  = {0.,0.,0.,0.};
   Float_t res[4]  = {0.,0.,0.,0.};
   //  Float_t qCenterPad = fMinimumCharge * fMinimumCharge;
@@ -1188,6 +1193,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
   nActivatedPads++;
   nPlace[nActivatedPads-1] = (iz - 1) * AliTOFGeometry::NpadX() + ix;
   qInduced[nActivatedPads-1] = qCenterPad;
+  padId[nActivatedPads-1] = 1;
   
   if (fEdgeEffect == 0) {
     eff[nActivatedPads-1] = fEffCenter;
@@ -1282,6 +1288,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
        } else {
          timeDelay[nActivatedPads-1] = 0.;
        }
+       padId[nActivatedPads-1] = 2;
       }
     }
 
@@ -1319,6 +1326,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
        } else {
          timeDelay[nActivatedPads-1] = 0.;
        }
+       padId[nActivatedPads-1] = 3;
 
        //     D:
        if(z < k && z > 0) {
@@ -1349,6 +1357,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
            } else {
              timeDelay[nActivatedPads-1] = 0.;
            }
+           padId[nActivatedPads-1] = 4;
          }
        }  // end D
       }  // end C
@@ -1373,6 +1382,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
        } else {
          timeDelay[nActivatedPads-1] = 0.;
        }
+       padId[nActivatedPads-1] = 5;
 
 
        //     F:
@@ -1403,6 +1413,7 @@ void AliTOFSDigitizer::SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float
            } else {
              timeDelay[nActivatedPads-1] = 0.;
            }
+           padId[nActivatedPads-1] = 6;
          }
        }  // end F
       }  // end E
index cab759c0e03b3508714be8407d607c8823a21919..efea00c0616ad4ca332af9a12d971ca1aa092c8b 100644 (file)
@@ -585,6 +585,9 @@ void AliTOFTrigger::CreateLTMMatrixFromRaw(AliRawReader *fRawReader) {
     
     Int_t dummy = -1;
     Int_t detectorIndex[5] = {-1, -1, -1, -1, -1};
+    Int_t digit[2];
+    //Int_t track = -1;
+    //Int_t last = -1;
     
     Int_t indexDDL = 0;
     Int_t iRawData = 0;
@@ -610,6 +613,9 @@ void AliTOFTrigger::CreateLTMMatrixFromRaw(AliRawReader *fRawReader) {
         detectorIndex[3] = detectorIndex[4];//padz
         detectorIndex[4] = dummy;//padx
 
+        digit[0] = tofRawDatum->GetTOF();
+        digit[1] = tofRawDatum->GetTOT();
+
         dummy = detectorIndex[3];
         detectorIndex[3] = detectorIndex[4];//padx
         detectorIndex[4] = dummy;//padz
index b0cba1a5230523fd31a3c790f00222838a17b5df..26452c4e8935e7dec682b4f8cb3a94db6f4025dd 100644 (file)
@@ -663,7 +663,7 @@ AliTOFcalibHisto::GetCorrection(Int_t corr, Int_t index, Double_t tot)
 {
   /* apply correction */
 
-  Int_t ddl, chain, tdc, channel, hptdc, pbCh, feaIndex, sector, padx, trm, icIndex, sectorStrip;
+  Int_t ddl, chain, tdc, channel, hptdc, pbCh, feaIndex, sector, plate, padx, trm, icIndex, sectorStrip;
   Double_t slewing;
   
   switch (corr) {
@@ -694,6 +694,7 @@ AliTOFcalibHisto::GetCorrection(Int_t corr, Int_t index, Double_t tot)
       return GetCalibPar(kLeftFEAchDelayPar, pbCh);
   case kFEAdelayCorr:
     sector = (Int_t)GetCalibMap(kSector, index);
+    plate = (Int_t)GetCalibMap(kPlate, index);
     sectorStrip = (Int_t)GetCalibMap(kSectorStrip, index);
     padx = (Int_t)GetCalibMap(kPadX, index);
     feaIndex = padx / 12 + 4 * sectorStrip + 364 * sector;      
index 608edcb0a0ca664f898c85ceec4150f06fae07af..720e55fbb7394e8fcecea50e19edb09c916bd876 100644 (file)
@@ -2131,7 +2131,7 @@ void AliTOFv6T0::StepManager()
   Float_t hits[14];
   Int_t   vol[5];
   Int_t   sector, plate, padx, padz, strip;
-  Int_t   copy, i;
+  Int_t   copy, padzid, padxid, stripid, i;
   Int_t   *idtmed = fIdtmed->GetArray()-499;
   Float_t incidenceAngle;
 
@@ -2155,12 +2155,15 @@ void AliTOFv6T0::StepManager()
 
     // getting information about hit volumes
     
+    padzid=TVirtualMC::GetMC()->CurrentVolOffID(1,copy);
     padz=copy;
     padz--;
 
+    padxid=TVirtualMC::GetMC()->CurrentVolOffID(0,copy);
     padx=copy; 
     padx--;
     
+    stripid=TVirtualMC::GetMC()->CurrentVolOffID(4,copy);
     strip=copy; 
     strip--;