]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCMonitor.cxx
Adding pad type correction (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitor.cxx
index dcaea80f37125ceab9634ea5de8b4d0e5399478a..f8a0119ad1f472f37381240cb137f0fc1aa85912 100755 (executable)
@@ -752,7 +752,7 @@ Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* dateform,
          
          eventPtr = dateform->GetFirstDataPointer();
          eventPtrUI = (UInt_t *) eventPtr;
-         Int_t payload = dateform->GetPayloadSize();
+         Int_t payload = dateform->GetPayloadSize(); // 40Bit words
          
          if(fVerb)DumpHeader(dateform);          
          if(fVerb) cout << "Check sector and fEqId  " << endl;
@@ -767,7 +767,7 @@ Int_t AliTPCMonitor::ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* dateform,
          if(CheckEqId(secid,fEqId)) 
            {
              if(fVerb) cout << " init altro " << endl;
-             AliTPCMonitorAltro* altro  = new AliTPCMonitorAltro((UInt_t *)eventPtrUI,(payload/4),1);
+             AliTPCMonitorAltro* altro  = new AliTPCMonitorAltro((UInt_t *)eventPtrUI,(payload/4),1); //hier
              altro->SetWrite10Bit(GetWrite10Bit());
              altro->SetActFilename(GetFile());
              if(fVerb) cout << " allocated 10bit " << endl;
@@ -910,7 +910,7 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
   Double_t  hrms             = 0.0;
   Double_t  hmean            = 0.0;
   Int_t     supnextpos        = 0;
-  TH1D*     hbase             =  new TH1D("hbase","hbase",GetTimeBins(),0.5,(GetTimeBins()+0.5));
+//  TH1D*     hbase             =  new TH1D("hbase","hbase",GetTimeBins(),0.5,(GetTimeBins()+0.5));
  
   while(lastpos>0) 
     {
@@ -926,11 +926,12 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
       fPad[fChannelIter][0] = nextHwAddress ;
       
       if(fPadMapHw[nextHwAddress]!=-1 ) 
-       {
+      {
          //Int_t hw_before1 = fPad[fChannelIter-2][0];
          //Int_t hw_before2 = fPad[fChannelIter-3][0];
          
          if(fVerb){ cout  <<"\n //// Ambiguous hwaddress "   << nextHwAddress << "  write 10bit files and check file for eqid : "  << fEqId << " /////// " << endl;}
+          return;
          
          if( TMath::Abs(fPadMapRCU[nextHwAddress][4] - fChannelIter)==1) 
            {
@@ -966,7 +967,7 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
       sum           = 0.0;
       sumn          = 0;
       
-      hbase->Reset();
+//      hbase->Reset();
       
       for(Int_t iterwords = 0 ; iterwords< nwords ; iterwords++) 
        {
@@ -978,23 +979,25 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
              samplebins   =  0;
              timestamp    =  entries[blockpos-iterwords-1];
              iterwords++;
+              sampleiter-=2;
            }
          else 
            {
              ntime = timestamp-samplebins;
              adc   = entries[blockpos-iterwords];
              fPad[fChannelIter][ntime]  = adc;
-             if( (adc!=0)  && (ntime>=GetRangeBaseMin()  ) && (ntime<GetRangeBaseMax()    ))  {hbase->Fill(adc)        ;}
+//           if( (adc!=0)  && (ntime>=GetRangeBaseMin()  ) && (ntime<GetRangeBaseMax()    ))  {hbase->Fill(adc)        ;}
              if( (adc>max) && (ntime>=GetRangeMaxAdcMin()) && (ntime<GetRangeMaxAdcMax()  ))  {max = adc;maxx = ntime ;}
              if(              (ntime>=GetRangeSumMin())    && (ntime<GetRangeSumMax()     ))  {sum+=adc; sumn++;}
              samplebins++;
+              sampleiter--;
            }
        }
       
-      hmean = hbase->GetMean();
-      hbase->GetXaxis()->SetRangeUser(hmean- hmean/3 , hmean + hmean/3);
-      hmean =  hbase->GetMean();
-      hrms  = hbase->GetRMS();
+//      hmean = hbase->GetMean();
+//      hbase->GetXaxis()->SetRangeUser(hmean- hmean/3 , hmean + hmean/3);
+//      hmean =  hbase->GetMean();
+//      hrms  = hbase->GetRMS();
 
       if(       GetPedestals()==1) fHistAddrMaxAdc->SetBinContent(  nextHwAddress,max- hmean);
       else                         fHistAddrMaxAdc->SetBinContent(  nextHwAddress,max        );
@@ -1025,7 +1028,7 @@ void AliTPCMonitor::FillHistsDecode(AliTPCMonitorAltro* altro ,Int_t rcupatch, I
       fChannelIter++;
       if(nextpos<0)  { AliError("Error :  next pos < 0 "); break  ;}
     }
-  delete hbase;
+//  delete hbase;
   return ;
 }
 
@@ -1250,6 +1253,8 @@ void AliTPCMonitor::FillGlobal(Int_t sector)
          pad    = fMapHand->GetPad(   hw);
          row    = fMapHand->GetPadRow(hw);
          padmax = fMapHand->GetNumofPads(row);
+         if (sector%36>17) fMirror=-1;
+          else fMirror=1;
          GetXY(xval ,yval , padmax,row ,pad);
          xdr    =  xval*m11 +yval*m12;
          ydr    =  xval*m21 +yval*m22;