]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Transition to the new RCU format
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jun 2009 16:31:04 +0000 (16:31 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Jun 2009 16:31:04 +0000 (16:31 +0000)
Jens

TPC/AliTPCCalibCE.cxx
TPC/AliTPCCalibCE.h
TPC/AliTPCCalibPulser.cxx
TPC/AliTPCCalibPulser.h
TPC/AliTPCCalibRawBase.cxx
TPC/AliTPCCalibRawBase.h
TPC/AliTPCRawStreamV3.cxx [new file with mode: 0644]
TPC/AliTPCRawStreamV3.h [new file with mode: 0644]
TPC/TPCbaseLinkDef.h
TPC/libTPCbase.pkg

index 7c945a1843503c6f3f7997d7889ae9c606d6db94..869cd7793e812c3f68d7f311486d2020b1ab778f 100644 (file)
@@ -341,10 +341,8 @@ AliTPCCalibCE::AliTPCCalibCE() :
   fVEventNumber(1000),
   fVTime0SideA(1000),
   fVTime0SideC(1000),
-  fTimeStamp(0),
   fEventId(-1),
-  fRunNumber(-1),
-  fOldRunNumber(-1),
+  fOldRunNumber(0),
   fPadTimesArrayEvent(72),
   fPadQArrayEvent(72),
   fPadRMSArrayEvent(72),
@@ -417,10 +415,8 @@ AliTPCCalibCE::AliTPCCalibCE(const AliTPCCalibCE &sig) :
   fVEventNumber(sig.fVEventNumber),
   fVTime0SideA(sig.fVTime0SideA),
   fVTime0SideC(sig.fVTime0SideC),
-  fTimeStamp(0),
   fEventId(-1),
-  fRunNumber(-1),
-  fOldRunNumber(-1),
+  fOldRunNumber(0),
   fPadTimesArrayEvent(72),
   fPadQArrayEvent(72),
   fPadRMSArrayEvent(72),
@@ -558,10 +554,8 @@ AliTPCCalibCE::AliTPCCalibCE(const TMap *config) :
   fVEventNumber(1000),
   fVTime0SideA(1000),
   fVTime0SideC(1000),
-  fTimeStamp(0),
   fEventId(-1),
-  fRunNumber(-1),
-  fOldRunNumber(-1),
+  fOldRunNumber(0),
   fPadTimesArrayEvent(72),
   fPadQArrayEvent(72),
   fPadRMSArrayEvent(72),
@@ -1065,7 +1059,9 @@ void AliTPCCalibCE::EndEvent()
       }
 
       if ( (fNevents>0) && (fOldRunNumber==fRunNumber) )
-        GetHistoT0(iSec,kTRUE)->Fill( time-time0Side[(iSec/18)%2],iChannel );
+        // test that we really found the CE signal reliably 
+        if ( TMath::Abs(fVTime0SideA.GetMatrixArray()[fNevents-1]-time0Side[0])<.05)
+          GetHistoT0(iSec,kTRUE)->Fill( time-time0Side[(iSec/18)%2],iChannel );
 
 
 
index fca7b049463b1a7f4ac641788df3a0acb62f66a8..755c572f1467455e033fda6f7d621f453a7cfdb9 100644 (file)
@@ -93,9 +93,7 @@ public:
   void  SetNnoiseThresholdMax(Float_t n) {fNoiseThresholdMax=n;}
   void  SetNnoiseThresholdSum(Float_t n) {fNoiseThresholdSum=n;}
   //
-  void  SetTimeStampEvent(Double_t timestamp){ fTimeStamp = timestamp; }
-  void  SetRunNumber(Double_t eventnumber){ fRunNumber = eventnumber; }
-  void  SetEventInfo(Double_t runNumber, Double_t timestamp, Double_t eventId){ fRunNumber=runNumber; fTimeStamp=timestamp; fEventId=eventId;}
+  void  SetEventInfo(UInt_t runNumber,UInt_t timestamp, UInt_t eventId){ fRunNumber=runNumber; fTimeStamp=timestamp; fEventId=eventId;}
   //
   void  SetPedestalDatabase(AliTPCCalPad *pedestalTPC, AliTPCCalPad *padNoiseTPC) {fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
   void  SetIsZeroSuppressed(Bool_t zs=kTRUE) { fIsZeroSuppressed=zs; }
@@ -172,10 +170,8 @@ private:
   TVectorD  fVEventNumber;          //  Eventnumbers of the events
   TVectorF  fVTime0SideA;           //  Mean Time0 for side A for all events
   TVectorF  fVTime0SideC;           //  Mean Time0 for side C for all events
-  Double_t  fTimeStamp;             //! Timestamp of the current event
   Double_t  fEventId;               //! Event Id of the current event
-  Double_t  fRunNumber;             //! Run Number of the current event
-  Double_t  fOldRunNumber;          //! Old Run Number
+  UInt_t  fOldRunNumber;          //! Old Run Number
   
   TObjArray fPadTimesArrayEvent;    //! Pad Times for the event, before mean Time0 corrections
   TObjArray fPadQArrayEvent;        //! Charge for the event, only needed for debugging streamer
index 938cfed01902bd72a8380fe37dd52f34361eb715..79d9b88bb890583f468fb73a2bf9d15f8e1f3aff 100644 (file)
 ClassImp(AliTPCCalibPulser)
 
 AliTPCCalibPulser::AliTPCCalibPulser() :
-  AliTPCCalibRawBase(),
-  fNbinsT0(200),
-  fXminT0(-2),
-  fXmaxT0(2),
-  fNbinsQ(200),
-  fXminQ(10),
-  fXmaxQ(40),
-  fNbinsRMS(100),
-  fXminRMS(0.1),
-  fXmaxRMS(5.1),
-  fPeakIntMinus(2),
-  fPeakIntPlus(2),
-  fIsZeroSuppressed(kFALSE),
-  fLastSector(-1),
-  fParam(new AliTPCParam),
-  fPedestalTPC(0x0),
-  fPadNoiseTPC(0x0),
-  fOutliers(0x0),
-  fPedestalROC(0x0),
-  fPadNoiseROC(0x0),
-  fCalRocArrayT0(72),
-  fCalRocArrayQ(72),
-  fCalRocArrayRMS(72),
-  fCalRocArrayOutliers(72),
-  fHistoQArray(72),
-  fHistoT0Array(72),
-  fHistoRMSArray(72),
-  fHMeanTimeSector(0x0),
-  fVMeanTimeSector(72),
-  fPadTimesArrayEvent(72),
-  fPadQArrayEvent(72),
-  fPadRMSArrayEvent(72),
-  fPadPedestalArrayEvent(72),
-  fCurrentChannel(-1),
-  fCurrentSector(-1),
-  fCurrentRow(-1),
-  fCurrentPad(-1),
-  fMaxPadSignal(-1),
-  fMaxTimeBin(-1),
-  fPadSignal(1024),
-  fPadPedestal(0),
-  fPadNoise(0),
-  fVTime0Offset(72),
-  fVTime0OffsetCounter(72)
+AliTPCCalibRawBase(),
+fNbinsT0(200),
+fXminT0(-2),
+fXmaxT0(2),
+fNbinsQ(200),
+fXminQ(10),
+fXmaxQ(40),
+fNbinsRMS(100),
+fXminRMS(0.1),
+fXmaxRMS(5.1),
+fPeakIntMinus(2),
+fPeakIntPlus(2),
+fIsZeroSuppressed(kFALSE),
+fLastSector(-1),
+fParam(new AliTPCParam),
+fPedestalTPC(0x0),
+fPadNoiseTPC(0x0),
+fOutliers(0x0),
+fPedestalROC(0x0),
+fPadNoiseROC(0x0),
+fCalRocArrayT0(72),
+fCalRocArrayQ(72),
+fCalRocArrayRMS(72),
+fCalRocArrayOutliers(72),
+fHistoQArray(72),
+fHistoT0Array(72),
+fHistoRMSArray(72),
+fHMeanTimeSector(0x0),
+fVMeanTimeSector(72),
+fPadTimesArrayEvent(72),
+fPadQArrayEvent(72),
+fPadRMSArrayEvent(72),
+fPadPedestalArrayEvent(72),
+fCurrentChannel(-1),
+fCurrentSector(-1),
+fCurrentRow(-1),
+fCurrentPad(-1),
+fMaxPadSignal(-1),
+fMaxTimeBin(-1),
+fPadSignal(1024),
+fPadPedestal(0),
+fPadNoise(0),
+fVTime0Offset(72),
+fVTime0OffsetCounter(72)
 {
   //
   // AliTPCSignal default constructor
@@ -257,50 +257,50 @@ AliTPCCalibPulser::AliTPCCalibPulser() :
 }
 //_____________________________________________________________________
 AliTPCCalibPulser::AliTPCCalibPulser(const AliTPCCalibPulser &sig) :
-  AliTPCCalibRawBase(sig),
-  fNbinsT0(sig.fNbinsT0),
-  fXminT0(sig.fXminT0),
-  fXmaxT0(sig.fXmaxT0),
-  fNbinsQ(sig.fNbinsQ),
-  fXminQ(sig.fXminQ),
-  fXmaxQ(sig.fXmaxQ),
-  fNbinsRMS(sig.fNbinsRMS),
-  fXminRMS(sig.fXminRMS),
-  fXmaxRMS(sig.fXmaxRMS),
-  fPeakIntMinus(sig.fPeakIntMinus),
-  fPeakIntPlus(sig.fPeakIntPlus),
-  fIsZeroSuppressed(sig.fIsZeroSuppressed),
-  fLastSector(-1),
-  fParam(new AliTPCParam),
-  fPedestalTPC(0x0),
-  fPadNoiseTPC(0x0),
-  fOutliers(0x0),
-  fPedestalROC(0x0),
-  fPadNoiseROC(0x0),
-  fCalRocArrayT0(72),
-  fCalRocArrayQ(72),
-  fCalRocArrayRMS(72),
-  fCalRocArrayOutliers(72),
-  fHistoQArray(72),
-  fHistoT0Array(72),
-  fHistoRMSArray(72),
-  fHMeanTimeSector(0x0),
-  fVMeanTimeSector(72),
-  fPadTimesArrayEvent(72),
-  fPadQArrayEvent(72),
-  fPadRMSArrayEvent(72),
-  fPadPedestalArrayEvent(72),
-  fCurrentChannel(-1),
-  fCurrentSector(-1),
-  fCurrentRow(-1),
-  fCurrentPad(-1),
-  fMaxPadSignal(-1),
-  fMaxTimeBin(-1),
-  fPadSignal(1024),
-  fPadPedestal(0),
-  fPadNoise(0),
-  fVTime0Offset(72),
-  fVTime0OffsetCounter(72)
+AliTPCCalibRawBase(sig),
+fNbinsT0(sig.fNbinsT0),
+fXminT0(sig.fXminT0),
+fXmaxT0(sig.fXmaxT0),
+fNbinsQ(sig.fNbinsQ),
+fXminQ(sig.fXminQ),
+fXmaxQ(sig.fXmaxQ),
+fNbinsRMS(sig.fNbinsRMS),
+fXminRMS(sig.fXminRMS),
+fXmaxRMS(sig.fXmaxRMS),
+fPeakIntMinus(sig.fPeakIntMinus),
+fPeakIntPlus(sig.fPeakIntPlus),
+fIsZeroSuppressed(sig.fIsZeroSuppressed),
+fLastSector(-1),
+fParam(new AliTPCParam),
+fPedestalTPC(0x0),
+fPadNoiseTPC(0x0),
+fOutliers(0x0),
+fPedestalROC(0x0),
+fPadNoiseROC(0x0),
+fCalRocArrayT0(72),
+fCalRocArrayQ(72),
+fCalRocArrayRMS(72),
+fCalRocArrayOutliers(72),
+fHistoQArray(72),
+fHistoT0Array(72),
+fHistoRMSArray(72),
+fHMeanTimeSector(0x0),
+fVMeanTimeSector(72),
+fPadTimesArrayEvent(72),
+fPadQArrayEvent(72),
+fPadRMSArrayEvent(72),
+fPadPedestalArrayEvent(72),
+fCurrentChannel(-1),
+fCurrentSector(-1),
+fCurrentRow(-1),
+fCurrentPad(-1),
+fMaxPadSignal(-1),
+fMaxTimeBin(-1),
+fPadSignal(1024),
+fPadPedestal(0),
+fPadNoise(0),
+fVTime0Offset(72),
+fVTime0OffsetCounter(72)
 {
   //
   // AliTPCSignal default constructor
@@ -343,50 +343,50 @@ AliTPCCalibPulser::AliTPCCalibPulser(const AliTPCCalibPulser &sig) :
   fParam->Update();
 }
 AliTPCCalibPulser::AliTPCCalibPulser(const TMap *config) :
-  AliTPCCalibRawBase(),
-  fNbinsT0(200),
-  fXminT0(-2),
-  fXmaxT0(2),
-  fNbinsQ(200),
-  fXminQ(10),
-  fXmaxQ(40),
-  fNbinsRMS(100),
-  fXminRMS(0.1),
-  fXmaxRMS(5.1),
-  fPeakIntMinus(2),
-  fPeakIntPlus(2),
-  fIsZeroSuppressed(kFALSE),
-  fLastSector(-1),
-  fParam(new  AliTPCParam),
-  fPedestalTPC(0x0),
-  fPadNoiseTPC(0x0),
-  fOutliers(0x0),
-  fPedestalROC(0x0),
-  fPadNoiseROC(0x0),
-  fCalRocArrayT0(72),
-  fCalRocArrayQ(72),
-  fCalRocArrayRMS(72),
-  fCalRocArrayOutliers(72),
-  fHistoQArray(72),
-  fHistoT0Array(72),
-  fHistoRMSArray(72),
-  fHMeanTimeSector(0x0),
-  fVMeanTimeSector(72),
-  fPadTimesArrayEvent(72),
-  fPadQArrayEvent(72),
-  fPadRMSArrayEvent(72),
-  fPadPedestalArrayEvent(72),
-  fCurrentChannel(-1),
-  fCurrentSector(-1),
-  fCurrentRow(-1),
-  fCurrentPad(-1),
-  fMaxPadSignal(-1),
-  fMaxTimeBin(-1),
-  fPadSignal(1024),
-  fPadPedestal(0),
-  fPadNoise(0),
-  fVTime0Offset(72),
-  fVTime0OffsetCounter(72)
+AliTPCCalibRawBase(),
+fNbinsT0(200),
+fXminT0(-2),
+fXmaxT0(2),
+fNbinsQ(200),
+fXminQ(10),
+fXmaxQ(40),
+fNbinsRMS(100),
+fXminRMS(0.1),
+fXmaxRMS(5.1),
+fPeakIntMinus(2),
+fPeakIntPlus(2),
+fIsZeroSuppressed(kFALSE),
+fLastSector(-1),
+fParam(new  AliTPCParam),
+fPedestalTPC(0x0),
+fPadNoiseTPC(0x0),
+fOutliers(0x0),
+fPedestalROC(0x0),
+fPadNoiseROC(0x0),
+fCalRocArrayT0(72),
+fCalRocArrayQ(72),
+fCalRocArrayRMS(72),
+fCalRocArrayOutliers(72),
+fHistoQArray(72),
+fHistoT0Array(72),
+fHistoRMSArray(72),
+fHMeanTimeSector(0x0),
+fVMeanTimeSector(72),
+fPadTimesArrayEvent(72),
+fPadQArrayEvent(72),
+fPadRMSArrayEvent(72),
+fPadPedestalArrayEvent(72),
+fCurrentChannel(-1),
+fCurrentSector(-1),
+fCurrentRow(-1),
+fCurrentPad(-1),
+fMaxPadSignal(-1),
+fMaxTimeBin(-1),
+fPadSignal(1024),
+fPadPedestal(0),
+fPadNoise(0),
+fVTime0Offset(72),
+fVTime0OffsetCounter(72)
 {
   //
   // This constructor uses a TMap for setting some parametes
@@ -408,7 +408,7 @@ AliTPCCalibPulser::AliTPCCalibPulser(const TMap *config) :
   if (config->GetValue("PeakIntMinus")) fPeakIntMinus = (Int_t)((TObjString*)config->GetValue("PeakIntMinus"))->GetString().Atof();
   if (config->GetValue("PeakIntPlus")) fPeakIntPlus = (Int_t)((TObjString*)config->GetValue("PeakIntPlus"))->GetString().Atof();
   if (config->GetValue("IsZeroSuppressed")) fIsZeroSuppressed = (Bool_t)((TObjString*)config->GetValue("IsZeroSuppressed"))->GetString().Atoi();
-
+  
   fParam->Update();
 }
 //_____________________________________________________________________
@@ -419,7 +419,7 @@ AliTPCCalibPulser& AliTPCCalibPulser::operator = (const  AliTPCCalibPulser &sour
   //
   if (&source == this) return *this;
   new (this) AliTPCCalibPulser(source);
-
+  
   return *this;
 }
 //_____________________________________________________________________
@@ -455,54 +455,54 @@ void AliTPCCalibPulser::Reset()
 }
 //_____________________________________________________________________
 Int_t AliTPCCalibPulser::Update(const Int_t icsector,
-                               const Int_t icRow,
-                               const Int_t icPad,
-                               const Int_t icTimeBin,
-                               const Float_t csignal)
+                                const Int_t icRow,
+                                const Int_t icPad,
+                                const Int_t icTimeBin,
+                                const Float_t csignal)
 {
     //
     // Signal filling methode on the fly pedestal and time offset correction if necessary.
     // no extra analysis necessary. Assumes knowledge of the signal shape!
     // assumes that it is looped over consecutive time bins of one pad
     //
-
-   if (icRow<0) return 0;
-   if (icPad<0) return 0;
-   if (icTimeBin<0) return 0;
-    if ( (icTimeBin>fLastTimeBin) || (icTimeBin<fFirstTimeBin)   ) return 0;
-
-    if ( icRow<0 || icPad<0 ){
-       AliWarning("Wrong Pad or Row number, skipping!");
-       return 0;
-    }
-
-    Int_t iChannel  = fROC->GetRowIndexes(icsector)[icRow]+icPad; //  global pad position in sector
-
+  
+  if (icRow<0) return 0;
+  if (icPad<0) return 0;
+  if (icTimeBin<0) return 0;
+  if ( (icTimeBin>fLastTimeBin) || (icTimeBin<fFirstTimeBin)   ) return 0;
+  
+  if ( icRow<0 || icPad<0 ){
+    AliWarning("Wrong Pad or Row number, skipping!");
+    return 0;
+  }
+  
+  Int_t iChannel  = fROC->GetRowIndexes(icsector)[icRow]+icPad; //  global pad position in sector
+  
     //init first pad and sector in this event
-    if ( fCurrentChannel == -1 ) {
-       fCurrentChannel = iChannel;
-       fCurrentSector  = icsector;
-        fCurrentRow     = icRow;
-        fCurrentPad     = icPad;
-    }
-
+  if ( fCurrentChannel == -1 ) {
+    fCurrentChannel = iChannel;
+    fCurrentSector  = icsector;
+    fCurrentRow     = icRow;
+    fCurrentPad     = icPad;
+  }
+  
     //process last pad if we change to a new one
-    if ( iChannel != fCurrentChannel ){
-        ProcessPad();
-       fLastSector=fCurrentSector;
-       fCurrentChannel = iChannel;
-       fCurrentSector  = icsector;
-        fCurrentRow     = icRow;
-        fCurrentPad     = icPad;
-    }
-
+  if ( iChannel != fCurrentChannel ){
+    ProcessPad();
+    fLastSector=fCurrentSector;
+    fCurrentChannel = iChannel;
+    fCurrentSector  = icsector;
+    fCurrentRow     = icRow;
+    fCurrentPad     = icPad;
+  }
+  
     //fill signals for current pad
-    fPadSignal[icTimeBin]=csignal;
-    if ( csignal > fMaxPadSignal ){
-       fMaxPadSignal = csignal;
-       fMaxTimeBin   = icTimeBin;
-    }
-    return 0;
+  fPadSignal[icTimeBin]=csignal;
+  if ( csignal > fMaxPadSignal ){
+    fMaxPadSignal = csignal;
+    fMaxTimeBin   = icTimeBin;
+  }
+  return 0;
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::FindPedestal(Float_t part)
@@ -511,102 +511,102 @@ void AliTPCCalibPulser::FindPedestal(Float_t part)
     // find pedestal and noise for the current pad. Use either database or
     // truncated mean with part*100%
     //
-    Bool_t noPedestal = kTRUE;;
-    if (fPedestalTPC&&fPadNoiseTPC){
+  Bool_t noPedestal = kTRUE;;
+  if (fPedestalTPC&&fPadNoiseTPC){
         //use pedestal database
         //only load new pedestals if the sector has changed
-       if ( fCurrentSector!=fLastSector ){
-           fPedestalROC = fPedestalTPC->GetCalROC(fCurrentSector);
-            fPadNoiseROC = fPadNoiseTPC->GetCalROC(fCurrentSector);
-       }
-
-       if ( fPedestalROC&&fPadNoiseROC ){
-           fPadPedestal = fPedestalROC->GetValue(fCurrentChannel);
-           fPadNoise    = fPadNoiseROC->GetValue(fCurrentChannel);
-            noPedestal   = kFALSE;
-       }
-
+    if ( fCurrentSector!=fLastSector ){
+      fPedestalROC = fPedestalTPC->GetCalROC(fCurrentSector);
+      fPadNoiseROC = fPadNoiseTPC->GetCalROC(fCurrentSector);
     }
-
+    
+    if ( fPedestalROC&&fPadNoiseROC ){
+      fPadPedestal = fPedestalROC->GetValue(fCurrentChannel);
+      fPadNoise    = fPadNoiseROC->GetValue(fCurrentChannel);
+      noPedestal   = kFALSE;
+    }
+    
+  }
+  
     //if we are not running with pedestal database, or for the current sector there is no information
     //available, calculate the pedestal and noise on the fly
-    if ( noPedestal ) {
-       const Int_t kPedMax = 100;  //maximum pedestal value
-       Float_t  max    =  0;
-       Float_t  maxPos =  0;
-       Int_t    median =  -1;
-       Int_t    count0 =  0;
-       Int_t    count1 =  0;
-       //
-       Float_t padSignal=0;
+  if ( noPedestal ) {
+    const Int_t kPedMax = 100;  //maximum pedestal value
+    Float_t  max    =  0;
+    Float_t  maxPos =  0;
+    Int_t    median =  -1;
+    Int_t    count0 =  0;
+    Int_t    count1 =  0;
+  //
+    Float_t padSignal=0;
         //
-       UShort_t histo[kPedMax];
-       memset(histo,0,kPedMax*sizeof(UShort_t));
-
-       for (Int_t i=fFirstTimeBin; i<=fLastTimeBin; ++i){
-            padSignal = fPadSignal.GetMatrixArray()[i];
-           if (padSignal<=0) continue;
-           if (padSignal>max && i>10) {
-               max = padSignal;
-               maxPos = i;
-           }
-           if (padSignal>kPedMax-1) continue;
-           histo[Int_t(padSignal+0.5)]++;
-           count0++;
-       }
-           //
-       for (Int_t i=1; i<kPedMax; ++i){
-           if (count1<count0*0.5) median=i;
-           count1+=histo[i];
-       }
-       // truncated mean
-       //
+    UShort_t histo[kPedMax];
+    memset(histo,0,kPedMax*sizeof(UShort_t));
+    
+    for (Int_t i=fFirstTimeBin; i<=fLastTimeBin; ++i){
+      padSignal = fPadSignal.GetMatrixArray()[i];
+      if (padSignal<=0) continue;
+      if (padSignal>max && i>10) {
+        max = padSignal;
+        maxPos = i;
+      }
+      if (padSignal>kPedMax-1) continue;
+      histo[Int_t(padSignal+0.5)]++;
+      count0++;
+    }
+      //
+    for (Int_t i=1; i<kPedMax; ++i){
+      if (count1<count0*0.5) median=i;
+      count1+=histo[i];
+    }
+  // truncated mean
+  //
         // what if by chance histo[median] == 0 ?!?
-       Float_t count=histo[median] ,mean=histo[median]*median,  rms=histo[median]*median*median ;
-       //
-       for (Int_t idelta=1; idelta<10; ++idelta){
-           if (median-idelta<=0) continue;
-           if (median+idelta>kPedMax) continue;
-           if (count<part*count1){
-               count+=histo[median-idelta];
-               mean +=histo[median-idelta]*(median-idelta);
-               rms  +=histo[median-idelta]*(median-idelta)*(median-idelta);
-               count+=histo[median+idelta];
-               mean +=histo[median+idelta]*(median+idelta);
-               rms  +=histo[median+idelta]*(median+idelta)*(median+idelta);
-           }
-       }
-       fPadPedestal = 0;
-       fPadNoise    = 0;
-       if ( count > 0 ) {
-           mean/=count;
-           rms    = TMath::Sqrt(TMath::Abs(rms/count-mean*mean));
-           fPadPedestal = mean;
-           fPadNoise    = rms;
-       } 
+    Float_t count=histo[median] ,mean=histo[median]*median,  rms=histo[median]*median*median ;
+  //
+    for (Int_t idelta=1; idelta<10; ++idelta){
+      if (median-idelta<=0) continue;
+      if (median+idelta>kPedMax) continue;
+      if (count<part*count1){
+        count+=histo[median-idelta];
+        mean +=histo[median-idelta]*(median-idelta);
+        rms  +=histo[median-idelta]*(median-idelta)*(median-idelta);
+        count+=histo[median+idelta];
+        mean +=histo[median+idelta]*(median+idelta);
+        rms  +=histo[median+idelta]*(median+idelta)*(median+idelta);
+      }
     }
-    fPadPedestal*=(Float_t)(!fIsZeroSuppressed);
+    fPadPedestal = 0;
+    fPadNoise    = 0;
+    if ( count > 0 ) {
+      mean/=count;
+      rms    = TMath::Sqrt(TMath::Abs(rms/count-mean*mean));
+      fPadPedestal = mean;
+      fPadNoise    = rms;
+    }
+  }
+  fPadPedestal*=(Float_t)(!fIsZeroSuppressed);
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::FindPulserSignal(TVectorD &param, Float_t &qSum)
 {
-    //
+//
     //  Find position, signal width and height of the CE signal (last signal)
     //  param[0] = Qmax, param[1] = mean time, param[2] = rms;
     //  maxima: array of local maxima of the pad signal use the one closest to the mean CE position
     //
-
-    Float_t ceQmax  =0, ceQsum=0, ceTime=0, ceRMS=0;
-    Int_t   cemaxpos       = fMaxTimeBin;
-    Float_t ceSumThreshold = 10.*TMath::Max(fPadNoise,Float_t(1.));  // threshold for the signal sum
-    Float_t ceMaxThreshold = 5.*TMath::Max(fPadNoise,Float_t(1.));  // threshold for the signal max
-    const Int_t    kCemin  = fPeakIntMinus;             // range for the analysis of the ce signal +- channels from the peak
-    const Int_t    kCemax  = fPeakIntPlus;
-    param[0] = ceQmax;
-    param[1] = ceTime;
-    param[2] = ceRMS;
-    qSum     = ceQsum;
-
+  
+  Float_t ceQmax  =0, ceQsum=0, ceTime=0, ceRMS=0;
+  Int_t   cemaxpos       = fMaxTimeBin;
+  Float_t ceSumThreshold = 10.*TMath::Max(fPadNoise,Float_t(1.));  // threshold for the signal sum
+  Float_t ceMaxThreshold = 5.*TMath::Max(fPadNoise,Float_t(1.));  // threshold for the signal max
+  const Int_t    kCemin  = fPeakIntMinus;             // range for the analysis of the ce signal +- channels from the peak
+  const Int_t    kCemax  = fPeakIntPlus;
+  param[0] = ceQmax;
+  param[1] = ceTime;
+  param[2] = ceRMS;
+  qSum     = ceQsum;
+  
   if (cemaxpos>0){
     ceQmax = fPadSignal.GetMatrixArray()[cemaxpos]-fPadPedestal;
     if ( ceQmax<ceMaxThreshold ) return;
@@ -645,18 +645,18 @@ void AliTPCCalibPulser::FindPulserSignal(TVectorD &param, Float_t &qSum)
   //                                to the OROC signal (factor 2/3 for the IROCs).
     Float_t norm = fParam->GetPadPitchWidth(fCurrentSector)*fParam->GetPadPitchLength(fCurrentSector,fCurrentRow)*100;
     if ( fCurrentSector<fParam->GetNInnerSector() ) norm*=3./2.;
-
-       ceQsum/=norm;
-    } else {
-      ceQmax=0;
-      ceTime=0;
-      ceRMS =0;
-      ceQsum=0;
-    }
-    param[0] = ceQmax;
-    param[1] = ceTime;
-    param[2] = ceRMS;
-    qSum     = ceQsum;
+    
+    ceQsum/=norm;
+  } else {
+    ceQmax=0;
+    ceTime=0;
+    ceRMS =0;
+    ceQsum=0;
+  }
+  param[0] = ceQmax;
+  param[1] = ceTime;
+  param[2] = ceRMS;
+  qSum     = ceQsum;
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::ProcessPad()
@@ -664,7 +664,7 @@ void AliTPCCalibPulser::ProcessPad()
   //
   //  Process data of current pad
   //
-
+  
   FindPedestal();
   TVectorD param(3);
   Float_t  qSum;
@@ -692,6 +692,7 @@ void AliTPCCalibPulser::ProcessPad()
       if ( streamer ) {
         Int_t padc = fCurrentPad-(fROC->GetNPads(fCurrentSector,fCurrentRow)/2);
         (*streamer) << "PadSignals" <<
+          "Event="  <<fNevents <<
           "Sector=" <<fCurrentSector<<
           "Row="    <<fCurrentRow<<
           "Pad="    <<fCurrentPad<<
@@ -751,7 +752,7 @@ void AliTPCCalibPulser::EndEvent()
           padc = pad-(fROC->GetNPads(sector,row)/2);
           
           (*streamer) << "DataPad" <<
-//                 "Event=" << fEvent <<
+                   "Event=" << fNevents <<
             "Sector="<< sector <<
             "Row="   << row<<
             "Pad="   << pad <<
@@ -767,32 +768,33 @@ void AliTPCCalibPulser::EndEvent()
       //Debug end
     }
   }
+  ++fNevents;
 }
 //_____________________________________________________________________
 TH2S* AliTPCCalibPulser::GetHisto(Int_t sector, TObjArray *arr,
-                                 Int_t nbinsY, Float_t ymin, Float_t ymax,
-                                 const Char_t *type, Bool_t force)
+                                  Int_t nbinsY, Float_t ymin, Float_t ymax,
+                                  const Char_t *type, Bool_t force)
 {
     //
     // return pointer to Q histogram
     // if force is true create a new histogram if it doesn't exist allready
     //
-    if ( !force || arr->UncheckedAt(sector) )
-       return (TH2S*)arr->UncheckedAt(sector);
-
+  if ( !force || arr->UncheckedAt(sector) )
+    return (TH2S*)arr->UncheckedAt(sector);
+  
     // if we are forced and histogram doesn't yes exist create it
-    Char_t name[255], title[255];
-
-    sprintf(name,"hCalib%s%.2d",type,sector);
-    sprintf(title,"%s calibration histogram sector %.2d",type,sector);
-
+  Char_t name[255], title[255];
+  
+  sprintf(name,"hCalib%s%.2d",type,sector);
+  sprintf(title,"%s calibration histogram sector %.2d",type,sector);
+  
     // new histogram with Q calib information. One value for each pad!
-    TH2S* hist = new TH2S(name,title,
-                         nbinsY, ymin, ymax,
-                         fROC->GetNChannels(sector),0,fROC->GetNChannels(sector));
-    hist->SetDirectory(0);
-    arr->AddAt(hist,sector);
-    return hist;
+  TH2S* hist = new TH2S(name,title,
+                        nbinsY, ymin, ymax,
+                        fROC->GetNChannels(sector),0,fROC->GetNChannels(sector));
+  hist->SetDirectory(0);
+  arr->AddAt(hist,sector);
+  return hist;
 }
 //_____________________________________________________________________
 TH2S* AliTPCCalibPulser::GetHistoT0(Int_t sector, Bool_t force)
@@ -801,8 +803,8 @@ TH2S* AliTPCCalibPulser::GetHistoT0(Int_t sector, Bool_t force)
     // return pointer to T0 histogram
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fHistoT0Array;
-    return GetHisto(sector, arr, fNbinsT0, fXminT0, fXmaxT0, "T0", force);
+  TObjArray *arr = &fHistoT0Array;
+  return GetHisto(sector, arr, fNbinsT0, fXminT0, fXmaxT0, "T0", force);
 }
 //_____________________________________________________________________
 TH2S* AliTPCCalibPulser::GetHistoQ(Int_t sector, Bool_t force)
@@ -811,8 +813,8 @@ TH2S* AliTPCCalibPulser::GetHistoQ(Int_t sector, Bool_t force)
     // return pointer to Q histogram
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fHistoQArray;
-    return GetHisto(sector, arr, fNbinsQ, fXminQ, fXmaxQ, "Q", force);
+  TObjArray *arr = &fHistoQArray;
+  return GetHisto(sector, arr, fNbinsQ, fXminQ, fXmaxQ, "Q", force);
 }
 //_____________________________________________________________________
 TH2S* AliTPCCalibPulser::GetHistoRMS(Int_t sector, Bool_t force)
@@ -821,8 +823,8 @@ TH2S* AliTPCCalibPulser::GetHistoRMS(Int_t sector, Bool_t force)
     // return pointer to Q histogram
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fHistoRMSArray;
-    return GetHisto(sector, arr, fNbinsRMS, fXminRMS, fXmaxRMS, "RMS", force);
+  TObjArray *arr = &fHistoRMSArray;
+  return GetHisto(sector, arr, fNbinsRMS, fXminRMS, fXmaxRMS, "RMS", force);
 }
 //_____________________________________________________________________
 TH2F* AliTPCCalibPulser::GetHistoTSec()
@@ -831,11 +833,11 @@ TH2F* AliTPCCalibPulser::GetHistoTSec()
     // return the pointer to the abs time distribution per sector
     // create it if it does not exist
     //
-    if ( !fHMeanTimeSector )   //!!!if you change the binning here, you should also change it in the Analyse Function!!
-       fHMeanTimeSector = new TH2F("fHMeanTimeSector","Abs mean time per sector",
-                                   20*(fLastTimeBin-fFirstTimeBin), fFirstTimeBin, fLastTimeBin,
-                                   72,0,72);
-   return fHMeanTimeSector;
+  if ( !fHMeanTimeSector )   //!!!if you change the binning here, you should also change it in the Analyse Function!!
+    fHMeanTimeSector = new TH2F("fHMeanTimeSector","Abs mean time per sector",
+                                20*(fLastTimeBin-fFirstTimeBin), fFirstTimeBin, fLastTimeBin,
+                                72,0,72);
+  return fHMeanTimeSector;
 }
 //_____________________________________________________________________
 TVectorF* AliTPCCalibPulser::GetPadInfoEvent(Int_t sector, TObjArray *arr, Bool_t force)
@@ -844,12 +846,12 @@ TVectorF* AliTPCCalibPulser::GetPadInfoEvent(Int_t sector, TObjArray *arr, Bool_
     // return pointer to Pad Info from 'arr' for the current event and sector
     // if force is true create it if it doesn't exist allready
     //
-    if ( !force || arr->UncheckedAt(sector) )
-       return (TVectorF*)arr->UncheckedAt(sector);
-
-    TVectorF *vect = new TVectorF(fROC->GetNChannels(sector));
-    arr->AddAt(vect,sector);
-    return vect;
+  if ( !force || arr->UncheckedAt(sector) )
+    return (TVectorF*)arr->UncheckedAt(sector);
+  
+  TVectorF *vect = new TVectorF(fROC->GetNChannels(sector));
+  arr->AddAt(vect,sector);
+  return vect;
 }
 //_____________________________________________________________________
 TVectorF* AliTPCCalibPulser::GetPadTimesEvent(Int_t sector, Bool_t force)
@@ -858,8 +860,8 @@ TVectorF* AliTPCCalibPulser::GetPadTimesEvent(Int_t sector, Bool_t force)
     // return pointer to Pad Times Array for the current event and sector
     // if force is true create it if it doesn't exist allready
     //
-    TObjArray *arr = &fPadTimesArrayEvent;
-    return GetPadInfoEvent(sector,arr,force);
+  TObjArray *arr = &fPadTimesArrayEvent;
+  return GetPadInfoEvent(sector,arr,force);
 }
 //_____________________________________________________________________
 TVectorF* AliTPCCalibPulser::GetPadQEvent(Int_t sector, Bool_t force)
@@ -869,9 +871,9 @@ TVectorF* AliTPCCalibPulser::GetPadQEvent(Int_t sector, Bool_t force)
     // if force is true create it if it doesn't exist allready
     // for debugging purposes only
     //
-
-    TObjArray *arr = &fPadQArrayEvent;
-    return GetPadInfoEvent(sector,arr,force);
+  
+  TObjArray *arr = &fPadQArrayEvent;
+  return GetPadInfoEvent(sector,arr,force);
 }
 //_____________________________________________________________________
 TVectorF* AliTPCCalibPulser::GetPadRMSEvent(Int_t sector, Bool_t force)
@@ -881,8 +883,8 @@ TVectorF* AliTPCCalibPulser::GetPadRMSEvent(Int_t sector, Bool_t force)
     // if force is true create it if it doesn't exist allready
     // for debugging purposes only
     //
-    TObjArray *arr = &fPadRMSArrayEvent;
-    return GetPadInfoEvent(sector,arr,force);
+  TObjArray *arr = &fPadRMSArrayEvent;
+  return GetPadInfoEvent(sector,arr,force);
 }
 //_____________________________________________________________________
 TVectorF* AliTPCCalibPulser::GetPadPedestalEvent(Int_t sector, Bool_t force)
@@ -892,8 +894,8 @@ TVectorF* AliTPCCalibPulser::GetPadPedestalEvent(Int_t sector, Bool_t force)
     // if force is true create it if it doesn't exist allready
     // for debugging purposes only
     //
-    TObjArray *arr = &fPadPedestalArrayEvent;
-    return GetPadInfoEvent(sector,arr,force);
+  TObjArray *arr = &fPadPedestalArrayEvent;
+  return GetPadInfoEvent(sector,arr,force);
 }
 //_____________________________________________________________________
 AliTPCCalROC* AliTPCCalibPulser::GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force) const
@@ -902,15 +904,15 @@ AliTPCCalROC* AliTPCCalibPulser::GetCalRoc(Int_t sector, TObjArray* arr, Bool_t
     // return pointer to ROC Calibration
     // if force is true create a new histogram if it doesn't exist allready
     //
-    if ( !force || arr->UncheckedAt(sector) )
-       return (AliTPCCalROC*)arr->UncheckedAt(sector);
-
+  if ( !force || arr->UncheckedAt(sector) )
+    return (AliTPCCalROC*)arr->UncheckedAt(sector);
+  
     // if we are forced and histogram doesn't yes exist create it
-
+  
     // new AliTPCCalROC for T0 information. One value for each pad!
-    AliTPCCalROC *croc = new AliTPCCalROC(sector);
-    arr->AddAt(croc,sector);
-    return croc;
+  AliTPCCalROC *croc = new AliTPCCalROC(sector);
+  arr->AddAt(croc,sector);
+  return croc;
 }
 //_____________________________________________________________________
 AliTPCCalROC* AliTPCCalibPulser::GetCalRocT0(Int_t sector, Bool_t force)
@@ -919,8 +921,8 @@ AliTPCCalROC* AliTPCCalibPulser::GetCalRocT0(Int_t sector, Bool_t force)
     // return pointer to Carge ROC Calibration
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fCalRocArrayT0;
-    return GetCalRoc(sector, arr, force);
+  TObjArray *arr = &fCalRocArrayT0;
+  return GetCalRoc(sector, arr, force);
 }
 //_____________________________________________________________________
 AliTPCCalROC* AliTPCCalibPulser::GetCalRocQ(Int_t sector, Bool_t force)
@@ -929,8 +931,8 @@ AliTPCCalROC* AliTPCCalibPulser::GetCalRocQ(Int_t sector, Bool_t force)
     // return pointer to T0 ROC Calibration
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fCalRocArrayQ;
-    return GetCalRoc(sector, arr, force);
+  TObjArray *arr = &fCalRocArrayQ;
+  return GetCalRoc(sector, arr, force);
 }
 //_____________________________________________________________________
 AliTPCCalROC* AliTPCCalibPulser::GetCalRocRMS(Int_t sector, Bool_t force)
@@ -939,8 +941,8 @@ AliTPCCalROC* AliTPCCalibPulser::GetCalRocRMS(Int_t sector, Bool_t force)
     // return pointer to signal width ROC Calibration
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fCalRocArrayRMS;
-    return GetCalRoc(sector, arr, force);
+  TObjArray *arr = &fCalRocArrayRMS;
+  return GetCalRoc(sector, arr, force);
 }
 //_____________________________________________________________________
 AliTPCCalROC* AliTPCCalibPulser::GetCalRocOutliers(Int_t sector, Bool_t force)
@@ -949,8 +951,8 @@ AliTPCCalROC* AliTPCCalibPulser::GetCalRocOutliers(Int_t sector, Bool_t force)
     // return pointer to Outliers
     // if force is true create a new histogram if it doesn't exist allready
     //
-    TObjArray *arr = &fCalRocArrayOutliers;
-    return GetCalRoc(sector, arr, force);
+  TObjArray *arr = &fCalRocArrayOutliers;
+  return GetCalRoc(sector, arr, force);
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::ResetEvent()
@@ -958,24 +960,24 @@ void AliTPCCalibPulser::ResetEvent()
     //
     //  Reset global counters  -- Should be called before each event is processed
     //
-    fLastSector=-1;
-    fCurrentSector=-1;
-    fCurrentRow=-1;
-    fCurrentPad=-1;
-    fCurrentChannel=-1;
-
-    ResetPad();
-
-    fPadTimesArrayEvent.Delete();
-
-    fPadQArrayEvent.Delete();
-    fPadRMSArrayEvent.Delete();
-    fPadPedestalArrayEvent.Delete();
-
-    for ( Int_t i=0; i<72; ++i ){
-       fVTime0Offset[i]=0;
-       fVTime0OffsetCounter[i]=0;
-    }
+  fLastSector=-1;
+  fCurrentSector=-1;
+  fCurrentRow=-1;
+  fCurrentPad=-1;
+  fCurrentChannel=-1;
+  
+  ResetPad();
+  
+  fPadTimesArrayEvent.Delete();
+  
+  fPadQArrayEvent.Delete();
+  fPadRMSArrayEvent.Delete();
+  fPadPedestalArrayEvent.Delete();
+  
+  for ( Int_t i=0; i<72; ++i ){
+    fVTime0Offset[i]=0;
+    fVTime0OffsetCounter[i]=0;
+  }
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::ResetPad()
@@ -983,12 +985,12 @@ void AliTPCCalibPulser::ResetPad()
     //
     //  Reset pad infos -- Should be called after a pad has been processed
     //
-    for (Int_t i=fFirstTimeBin; i<fLastTimeBin+1; ++i)
-       fPadSignal[i] = 0;
-    fMaxTimeBin = -1;
-    fMaxPadSignal = -1;
-    fPadPedestal  = -1;
-    fPadNoise     = -1;
+  for (Int_t i=fFirstTimeBin; i<fLastTimeBin+1; ++i)
+    fPadSignal[i] = 0;
+  fMaxTimeBin = -1;
+  fMaxPadSignal = -1;
+  fPadPedestal  = -1;
+  fPadNoise     = -1;
 }
 //_____________________________________________________________________
 Bool_t AliTPCCalibPulser::IsEdgePad(Int_t sector, Int_t row, Int_t pad)
@@ -996,11 +998,11 @@ Bool_t AliTPCCalibPulser::IsEdgePad(Int_t sector, Int_t row, Int_t pad)
     //
     // return true if pad is on the edge of a row
     //
-    Int_t edge1   = 0;
-    Int_t edge2   = fROC->GetNPads(sector,row)-1;
-    if ( pad == edge1 || pad == edge2 ) return kTRUE;
-
-    return kFALSE;
+  Int_t edge1   = 0;
+  Int_t edge2   = fROC->GetNPads(sector,row)-1;
+  if ( pad == edge1 || pad == edge2 ) return kTRUE;
+  
+  return kFALSE;
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::Merge(AliTPCCalibPulser *sig)
@@ -1008,58 +1010,58 @@ void AliTPCCalibPulser::Merge(AliTPCCalibPulser *sig)
     //
     //  Merge reference histograms of sig to the current AliTPCCalibPulser
     //
-
+  
     //merge histograms
-    for (Int_t iSec=0; iSec<72; ++iSec){
-       TH2S *hRefQmerge   = sig->GetHistoQ(iSec);
-       TH2S *hRefT0merge  = sig->GetHistoT0(iSec);
-       TH2S *hRefRMSmerge = sig->GetHistoRMS(iSec);
-
-
-       if ( hRefQmerge ){
-           TDirectory *dir = hRefQmerge->GetDirectory(); hRefQmerge->SetDirectory(0);
-           TH2S *hRefQ   = GetHistoQ(iSec);
-           if ( hRefQ ) hRefQ->Add(hRefQmerge);
-           else {
-               TH2S *hist = new TH2S(*hRefQmerge);
-                hist->SetDirectory(0);
-               fHistoQArray.AddAt(hist, iSec);
-           }
-           hRefQmerge->SetDirectory(dir);
-       }
-       if ( hRefT0merge ){
-           TDirectory *dir = hRefT0merge->GetDirectory(); hRefT0merge->SetDirectory(0);
-           TH2S *hRefT0  = GetHistoT0(iSec);
-           if ( hRefT0 ) hRefT0->Add(hRefT0merge);
-           else {
-               TH2S *hist = new TH2S(*hRefT0merge);
-                hist->SetDirectory(0);
-               fHistoT0Array.AddAt(hist, iSec);
-           }
-           hRefT0merge->SetDirectory(dir);
-       }
-       if ( hRefRMSmerge ){
-           TDirectory *dir = hRefRMSmerge->GetDirectory(); hRefRMSmerge->SetDirectory(0);
-           TH2S *hRefRMS = GetHistoRMS(iSec);
-           if ( hRefRMS ) hRefRMS->Add(hRefRMSmerge);
-           else {
-               TH2S *hist = new TH2S(*hRefRMSmerge);
-                hist->SetDirectory(0);
-               fHistoRMSArray.AddAt(hist, iSec);
-           }
-           hRefRMSmerge->SetDirectory(dir);
-       }
-
+  for (Int_t iSec=0; iSec<72; ++iSec){
+    TH2S *hRefQmerge   = sig->GetHistoQ(iSec);
+    TH2S *hRefT0merge  = sig->GetHistoT0(iSec);
+    TH2S *hRefRMSmerge = sig->GetHistoRMS(iSec);
+    
+    
+    if ( hRefQmerge ){
+      TDirectory *dir = hRefQmerge->GetDirectory(); hRefQmerge->SetDirectory(0);
+      TH2S *hRefQ   = GetHistoQ(iSec);
+      if ( hRefQ ) hRefQ->Add(hRefQmerge);
+      else {
+        TH2S *hist = new TH2S(*hRefQmerge);
+        hist->SetDirectory(0);
+        fHistoQArray.AddAt(hist, iSec);
+      }
+      hRefQmerge->SetDirectory(dir);
     }
-    if ( sig->fHMeanTimeSector ){
-       TDirectory *dir = sig->fHMeanTimeSector->GetDirectory(); sig->fHMeanTimeSector->SetDirectory(0);
-       if ( fHMeanTimeSector ) fHMeanTimeSector->Add(sig->fHMeanTimeSector);
-       else {
-           fHMeanTimeSector = new TH2F(*sig->fHMeanTimeSector);
-           fHMeanTimeSector->SetDirectory(0);
-       }
-       sig->fHMeanTimeSector->SetDirectory(dir);
+    if ( hRefT0merge ){
+      TDirectory *dir = hRefT0merge->GetDirectory(); hRefT0merge->SetDirectory(0);
+      TH2S *hRefT0  = GetHistoT0(iSec);
+      if ( hRefT0 ) hRefT0->Add(hRefT0merge);
+      else {
+        TH2S *hist = new TH2S(*hRefT0merge);
+        hist->SetDirectory(0);
+        fHistoT0Array.AddAt(hist, iSec);
+      }
+      hRefT0merge->SetDirectory(dir);
     }
+    if ( hRefRMSmerge ){
+      TDirectory *dir = hRefRMSmerge->GetDirectory(); hRefRMSmerge->SetDirectory(0);
+      TH2S *hRefRMS = GetHistoRMS(iSec);
+      if ( hRefRMS ) hRefRMS->Add(hRefRMSmerge);
+      else {
+        TH2S *hist = new TH2S(*hRefRMSmerge);
+        hist->SetDirectory(0);
+        fHistoRMSArray.AddAt(hist, iSec);
+      }
+      hRefRMSmerge->SetDirectory(dir);
+    }
+    
+  }
+  if ( sig->fHMeanTimeSector ){
+    TDirectory *dir = sig->fHMeanTimeSector->GetDirectory(); sig->fHMeanTimeSector->SetDirectory(0);
+    if ( fHMeanTimeSector ) fHMeanTimeSector->Add(sig->fHMeanTimeSector);
+    else {
+      fHMeanTimeSector = new TH2F(*sig->fHMeanTimeSector);
+      fHMeanTimeSector->SetDirectory(0);
+    }
+    sig->fHMeanTimeSector->SetDirectory(dir);
+  }
 }
 //_____________________________________________________________________
 void AliTPCCalibPulser::Analyse()
@@ -1079,7 +1081,7 @@ void AliTPCCalibPulser::Analyse()
   for (Int_t iSec=0; iSec<72; ++iSec){
     TH2S *hT0 = GetHistoT0(iSec);
     if (!hT0 ) continue;
-    //calculate sector mean T 
+    //calculate sector mean T
     if ( fHMeanTimeSector ){
       Int_t nbinsT = fHMeanTimeSector->GetNbinsX();
       Int_t offset = (nbinsT+2)*(iSec+1);
@@ -1092,7 +1094,7 @@ void AliTPCCalibPulser::Analyse()
       // truncated mean: remove lower 5% and upper 5%
       if ( entries>0 ) AliMathBase::TruncatedMean(&hMeanTsec,&paramT0,0.05,.95);
       fVMeanTimeSector[iSec]=paramT0[1];
-    }    
+    }
     
     AliTPCCalROC *rocQ   = GetCalRocQ  (iSec,kTRUE);
     AliTPCCalROC *rocT0  = GetCalRocT0 (iSec,kTRUE);
@@ -1108,7 +1110,7 @@ void AliTPCCalibPulser::Analyse()
     
     UInt_t nChannels = fROC->GetNChannels(iSec);
     Float_t meanTsec = fVMeanTimeSector[iSec];
-
+    
   //debug
     Int_t row=0;
     Int_t pad=0;
index 67f7ee35da1be3116caa9b3644885c24216797cf..c2d508ee347940deaf4e1b105d10427db0aa54be 100644 (file)
@@ -160,8 +160,6 @@ private:
   
   Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad);
   
-  virtual void ResetEvent();
-  virtual void EndEvent();
   void ResetPad();
   void ProcessPad();
   
@@ -171,7 +169,10 @@ private:
   TVectorF* GetPadQEvent(Int_t sector, Bool_t force=kFALSE);
   TVectorF* GetPadRMSEvent(Int_t sector, Bool_t force=kFALSE);
   TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
-  
+
+protected:
+  virtual void ResetEvent();
+  virtual void EndEvent();
   
   
   ClassDef(AliTPCCalibPulser,5)           //Implementation of the TPC pulser calibration
index 954d67c9fafb7cdb636b5aaf4425df0d5fc64936..a28b1270be522d35290c4afd98fe46c3fabad82b 100644 (file)
@@ -35,7 +35,9 @@
 #include "AliAltroRawStream.h"
 #include "AliTPCROC.h"
 #include "AliTPCRawStreamFast.h"
+#include "AliTPCRawStreamV3.h"
 #include "AliTPCRawStream.h"
+#include "AliLog.h"
 #include "TTreeStream.h"
 #include "event.h"
 
@@ -50,11 +52,15 @@ AliTPCCalibRawBase::AliTPCCalibRawBase() :
   fNevents(0),
   fDebugLevel(0),
   fStreamLevel(0),
-  fTimeStamp(0),
   fRunNumber(0),
+  fTimeStamp(0),
   fEventType(0),
   fAltroL1Phase(0),
   fAltroL1PhaseTB(0),
+  fCurrRCUId(-1),
+  fPrevRCUId(-1),
+  fCurrDDLNum(-1),
+  fPrevDDLNum(-1),
   fUseL1Phase(kTRUE),
   fDebugStreamer(0x0),
   fAltroRawStream(0x0),
@@ -74,11 +80,15 @@ AliTPCCalibRawBase::AliTPCCalibRawBase(const AliTPCCalibRawBase &calib) :
   fNevents(calib.fNevents),
   fDebugLevel(calib.fDebugLevel),
   fStreamLevel(calib.fStreamLevel),
-  fTimeStamp(0),
   fRunNumber(0),
+  fTimeStamp(0),
   fEventType(0),
   fAltroL1Phase(0),
   fAltroL1PhaseTB(0),
+  fCurrRCUId(-1),
+  fPrevRCUId(-1),
+  fCurrDDLNum(-1),
+  fPrevDDLNum(-1),
   fUseL1Phase(kTRUE),
   fDebugStreamer(0x0),
   fAltroRawStream(0x0),
@@ -128,7 +138,7 @@ Bool_t AliTPCCalibRawBase::ProcessEventFast(AliTPCRawStreamFast *rawStreamFast)
         Int_t endTbin = (Int_t)rawStreamFast->GetEndTimeBin();
         for (Int_t iTimeBin = startTbin; iTimeBin < endTbin; iTimeBin++){
           Float_t signal=(Float_t)rawStreamFast->GetSignals()[iTimeBin-startTbin];
-          Update(isector,iRow,iPad,iTimeBin+1,signal);
+            Update(isector,iRow,iPad,iTimeBin+1,signal);
           withInput = kTRUE;
         }
       }
@@ -157,6 +167,69 @@ Bool_t AliTPCCalibRawBase::ProcessEventFast(AliRawReader *rawReader)
   return res;
 }
 //_____________________________________________________________________
+Bool_t AliTPCCalibRawBase::ProcessEvent(AliTPCRawStreamV3 *rawStreamV3)
+{
+  //
+  // Event Processing loop - AliTPCRawStreamV3
+  //
+  ResetEvent();
+  Bool_t withInput = kFALSE;
+  fAltroL1Phase=0;
+  fAltroL1PhaseTB=0;
+//   fAltroRawStream = static_cast<AliAltroRawStream*>(rawStreamV3);
+  while ( rawStreamV3->NextDDL() ){
+    if (AliLog::GetGlobalDebugLevel()>2) rawStreamV3->PrintRCUTrailer();
+    if (fUseL1Phase){
+//         fAltroL1Phase  = fAltroRawStream->GetL1Phase();
+      fAltroL1Phase  = rawStreamV3->GetL1Phase();
+      fAltroL1PhaseTB = (fAltroL1Phase*1e09/100.);
+      AliDebug(1, Form("L1Phase: %.2e\n",fAltroL1PhaseTB));
+    }
+    fCurrRCUId=rawStreamV3->GetRCUId();
+    fCurrDDLNum=rawStreamV3->GetDDLNumber();
+    while ( rawStreamV3->NextChannel() ){
+      Int_t isector  = rawStreamV3->GetSector();                       //  current sector
+      Int_t iRow     = rawStreamV3->GetRow();                          //  current row
+      Int_t iPad     = rawStreamV3->GetPad();                          //  current pad
+      while ( rawStreamV3->NextBunch() ){
+        Int_t  startTbin    = (Int_t)rawStreamV3->GetStartTimeBin();
+//         Int_t  endTbin      = (Int_t)rawStreamV3->GetEndTimeBin();
+        Int_t  bunchlength  = (Int_t)rawStreamV3->GetBunchLength();
+        const UShort_t *sig = rawStreamV3->GetSignals();
+        for (Int_t iTimeBin = 0; iTimeBin<bunchlength; iTimeBin++){
+          Float_t signal=(Float_t)sig[iTimeBin];
+//            printf("%02d - %03d - %03d - %04d: %.1f\n",isector,iRow,iPad,startTbin,signal);
+          Update(isector,iRow,iPad,startTbin--,signal);
+          fPrevRCUId=fCurrRCUId;
+          fPrevDDLNum=fCurrDDLNum;
+          withInput = kTRUE;
+        }
+      }
+    }
+  }
+  if (withInput){
+    EndEvent();
+  }
+  return withInput;
+}
+//_____________________________________________________________________
+Bool_t AliTPCCalibRawBase::ProcessEvent(AliRawReader *rawReader)
+{
+  //
+  //  Event processing loop - AliRawReader
+  //
+  AliRawEventHeaderBase* eventHeader = (AliRawEventHeaderBase*)rawReader->GetEventHeader();
+  if (eventHeader){
+    fTimeStamp   = eventHeader->Get("Timestamp");
+    fRunNumber = eventHeader->Get("RunNb");
+    fEventType = eventHeader->Get("Type");
+  }
+  AliTPCRawStreamV3 *rawStreamV3 = new AliTPCRawStreamV3(rawReader, (AliAltroMapping**)fMapping);
+  Bool_t res=ProcessEvent(rawStreamV3);
+  delete rawStreamV3;
+  return res;
+}
+//_____________________________________________________________________
 Bool_t AliTPCCalibRawBase::ProcessEvent(AliTPCRawStream *rawStream)
 {
   //
@@ -174,6 +247,10 @@ Bool_t AliTPCCalibRawBase::ProcessEvent(AliTPCRawStream *rawStream)
       fAltroL1Phase  = fAltroRawStream->GetL1Phase();
       fAltroL1PhaseTB = (fAltroL1Phase*1e09/100.);
     }
+    fPrevRCUId=fCurrRCUId;
+    fCurrRCUId=rawStream->GetRCUId();
+    fPrevDDLNum=fCurrDDLNum;
+    fCurrDDLNum=rawStream->GetDDLNumber();
     Int_t isector  = rawStream->GetSector();                       //  current sector
     Int_t iRow     = rawStream->GetRow();                          //  current row
     Int_t iPad     = rawStream->GetPad();                          //  current pad
@@ -190,7 +267,7 @@ Bool_t AliTPCCalibRawBase::ProcessEvent(AliTPCRawStream *rawStream)
   return withInput;
 }
 //_____________________________________________________________________
-Bool_t AliTPCCalibRawBase::ProcessEvent(AliRawReader *rawReader)
+Bool_t AliTPCCalibRawBase::ProcessEventOld(AliRawReader *rawReader)
 {
   //
   //  Event processing loop - AliRawReader
index 77551ff596442e53f7e0cd0fd141638fecdb5abf..d3d2807546e707e1e3c6a0e953ffd880a9b0764f 100644 (file)
@@ -16,6 +16,7 @@ class AliAltroRawStream;
 class AliRawReader;
 class AliTPCAltroMapping;
 class AliTPCRawStreamFast;
+class AliTPCRawStreamV3;
 class AliTPCRawStream;
 class AliTPCROC;
 class TTreeSRedirector;
@@ -35,10 +36,15 @@ public:
   
   Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
   Bool_t ProcessEventFast(AliRawReader        *rawReader);
-  
-  Bool_t ProcessEvent(AliTPCRawStream *rawStream);
-  Bool_t ProcessEvent(AliRawReader    *rawReader);
+
+  //uses the new decoder which is compatible with the new altro format
+  Bool_t ProcessEvent(AliTPCRawStreamV3   *rawStreamV3);
+  Bool_t ProcessEvent(AliRawReader        *rawReader);
   Bool_t ProcessEvent(eventHeaderStruct   *event);
+
+  //For using the old decoder use the following functions
+  Bool_t ProcessEvent(AliTPCRawStream *rawStream);
+  Bool_t ProcessEventOld(AliRawReader    *rawReader);
   
   virtual Int_t Update(const Int_t /*isector*/, const Int_t /*iRow*/, const Int_t /*iPad*/,
                        const Int_t /*iTimeBin*/, const Float_t /*signal*/) { return 0; }
@@ -49,6 +55,10 @@ public:
   void  SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; }
   //
   void SetUseL1Phase(Bool_t useL1Phase=kTRUE) {fUseL1Phase=useL1Phase;}
+  //
+  void  SetTimeStampEvent(UInt_t timestamp){ fTimeStamp = timestamp; }
+  void  SetRunNumber(UInt_t eventnumber){ fRunNumber = eventnumber; }
+
   //
   Int_t GetFirstTimeBin()   const { return fFirstTimeBin;  }
   Int_t GetLastTimeBin()    const { return fLastTimeBin;   }
@@ -58,8 +68,8 @@ public:
   Double_t GetL1PhaseTB() const {return fAltroL1PhaseTB;}
   Bool_t   GetUseL1Phase()const {return fUseL1Phase;}
 //
-  UInt_t GetTimeStamp() const {return fTimeStamp;}
   UInt_t GetRunNumber() const {return fRunNumber;}
+  UInt_t GetTimeStamp() const {return fTimeStamp;}
   UInt_t GetEventType() const {return fEventType;}
   //
   AliTPCAltroMapping **GetAltroMapping() { return fMapping; }
@@ -85,12 +95,16 @@ protected:
   Int_t fDebugLevel;                  //! debug level
   Int_t fStreamLevel;                 //! level of streamer output
   //
+  UInt_t fRunNumber;                  // current run number from event header
   UInt_t fTimeStamp;                  //! time stamp from event header
-  UInt_t fRunNumber;                  //! current run number from event header
   UInt_t fEventType;                  //! current event Type from event header
   //
   Double_t fAltroL1Phase;             //! L1 Phase
   Float_t  fAltroL1PhaseTB;           //! L1 Phase in time bins
+  Int_t    fCurrRCUId;                //! Current RCU Id
+  Int_t    fPrevRCUId;                //! Previous RCU Id
+  Int_t    fCurrDDLNum;               //! Current DDL number
+  Int_t    fPrevDDLNum;               //! Current DDL number
   Bool_t   fUseL1Phase;               //  use L1 Phase information?
   //
   TTreeSRedirector *fDebugStreamer;   //! debug streamer
@@ -104,7 +118,7 @@ protected:
   virtual void ResetEvent(){ return; }           //Reset Event counters
   
   
-  ClassDef(AliTPCCalibRawBase,1)      //  Calibration base class for raw data processing
+  ClassDef(AliTPCCalibRawBase,2)      //  Calibration base class for raw data processing
     
 };
 
diff --git a/TPC/AliTPCRawStreamV3.cxx b/TPC/AliTPCRawStreamV3.cxx
new file mode 100644 (file)
index 0000000..2181c6f
--- /dev/null
@@ -0,0 +1,167 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTPCRawStreamV3.cxx 22777 2007-12-05 17:37:33Z marian $ */
+
+///////////////////////////////////////////////////////////////////////////////
+///
+/// This class provides access to TPC digits in raw data.
+///
+/// It loops over all TPC digits in the raw data given by the AliRawReader.
+/// The NextChannel method loads the data for the next pad. If there is no pad left
+/// it returns kFALSE.
+///
+///////////////////////////////////////////////////////////////////////////////
+
+#include <TSystem.h>
+
+#include "AliTPCRawStreamV3.h"
+#include "AliRawReader.h"
+#include "AliLog.h"
+#include "AliTPCAltroMapping.h"
+
+ClassImp(AliTPCRawStreamV3)
+
+//_____________________________________________________________________________
+AliTPCRawStreamV3::AliTPCRawStreamV3(AliRawReader* rawReader, AliAltroMapping **mapping) :
+  AliAltroRawStreamV3(rawReader),
+  fSector(-1),
+  fPrevSector(-1),
+  fRow(-1),
+  fPrevRow(-1),
+  fPad(-1),
+  fPrevPad(-1),
+  fPatchIndex(-1),
+  fIsMapOwner(kFALSE)
+{
+  // create an object to read TPC raw digits
+
+  SelectRawData("TPC");
+
+  if (mapping == NULL) {
+    TString path = gSystem->Getenv("ALICE_ROOT");
+    path += "/TPC/mapping/Patch";
+    TString path2;
+    for(Int_t i = 0; i < 6; i++) {
+      path2 = path;
+      path2 += i;
+      path2 += ".data";
+      fMapping[i] = new AliTPCAltroMapping(path2.Data());
+    }
+    fIsMapOwner = kTRUE;
+  }
+  else {
+    for(Int_t i = 0; i < 6; i++)
+      fMapping[i] = mapping[i];
+  }
+
+
+  //fNoAltroMapping = kFALSE;
+}
+//_____________________________________________________________________________
+AliTPCRawStreamV3::~AliTPCRawStreamV3()
+{
+// destructor
+
+  if (fIsMapOwner)
+    for(Int_t i = 0; i < 6; i++) delete fMapping[i];
+}
+
+//_____________________________________________________________________________
+void AliTPCRawStreamV3::Reset()
+{
+  // reset tpc raw stream params
+  AliAltroRawStreamV3::Reset();
+  fSector = fPrevSector = fRow = fPrevRow = fPad = fPrevPad = fPatchIndex = -1;
+}
+
+//_____________________________________________________________________________
+Bool_t AliTPCRawStreamV3::NextChannel()
+{
+  // Read next TPC Channel
+  // Apply the TPC altro mapping to get
+  // the pad-row and pad indeces
+
+/*
+  fPrevSector = fSector;
+  fPrevRow = fRow;
+  fPrevPad = fPad;
+  if (AliAltroRawStreamV3::NextChannel()) {
+      //    if (IsNewHWAddress())
+    if ( GetHWAddress() > -1 )
+      ApplyAltroMapping();
+    return kTRUE;
+  }
+  else
+    return kFALSE;
+  */
+  
+  fPrevRow = fRow;
+  fPrevPad = fPad;
+  fRow = -1;
+  fPad = -1;
+  if (!AliAltroRawStreamV3::NextChannel()) return kFALSE;
+
+  Short_t hwAddress = GetHWAddress();
+  if (hwAddress>-1){
+    fRow = fMapping[fPatchIndex]->GetPadRow(hwAddress);
+    fPad = fMapping[fPatchIndex]->GetPad(hwAddress);
+  }
+  return kTRUE;
+}
+//_____________________________________________________________________________
+Bool_t AliTPCRawStreamV3::NextDDL()
+{
+  // Take the DDL index,
+  // calculate the patch number and
+  // set the sector number
+//   return AliAltroRawStreamV3::NextDDL();
+  fPrevSector = fSector;
+  fSector     = -1;
+  if (!AliAltroRawStreamV3::NextDDL()) return kFALSE;
+  
+  Int_t ddlNumber = GetDDLNumber();
+  if (ddlNumber < 72) {
+    fSector = ddlNumber / 2;
+    fPatchIndex = ddlNumber % 2;
+  }
+  else {
+    fSector = (ddlNumber - 72) / 4 + 36;
+    fPatchIndex = (ddlNumber - 72) % 4 + 2;
+  }
+  return kTRUE;
+}
+//_____________________________________________________________________________
+void AliTPCRawStreamV3::ApplyAltroMapping()
+{
+  Int_t ddlNumber = GetDDLNumber();
+  Int_t patchIndex;
+  if (ddlNumber < 72) {
+    fSector = ddlNumber / 2;
+    patchIndex = ddlNumber % 2;
+  }
+  else {
+    fSector = (ddlNumber - 72) / 4 + 36;
+    patchIndex = (ddlNumber - 72) % 4 + 2;
+  }
+  
+  Short_t hwAddress = GetHWAddress();
+  fRow = fMapping[patchIndex]->GetPadRow(hwAddress);
+  fPad = fMapping[patchIndex]->GetPad(hwAddress);
+  
+
+//  if ((fRow < 0) || (fPad < 0))
+//    AddMappingErrorLog(Form("hw=%d",hwAddress));
+}
diff --git a/TPC/AliTPCRawStreamV3.h b/TPC/AliTPCRawStreamV3.h
new file mode 100644 (file)
index 0000000..815dc37
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef ALITPCRAWSTREAMV3_H
+#define ALITPCRAWSTREAMV3_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+///////////////////////////////////////////////////////////////////////////////
+///
+/// This class provides access to TPC digits in raw data.
+///
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliAltroRawStreamV3.h"
+
+class AliRawReader;
+class AliAltroMapping;
+
+class AliTPCRawStreamV3: public AliAltroRawStreamV3 {
+  public :
+    AliTPCRawStreamV3(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
+    virtual ~AliTPCRawStreamV3();
+
+    virtual void             Reset();
+    virtual Bool_t           NextChannel();
+    virtual Bool_t           NextDDL();
+  
+    inline Int_t GetSector()     const { return fSector; }     // Provide index of current sector
+    inline Int_t GetPrevSector() const { return fPrevSector; } // Provide index of previous sector
+    inline Bool_t  IsNewSector() const {return fSector != fPrevSector;};
+    inline Int_t GetRow()        const { return fRow; }        // Provide index of current row
+    inline Int_t GetPrevRow()    const { return fPrevRow; }    // Provide index of previous row
+    inline Bool_t  IsNewRow()    const {return (fRow != fPrevRow) || IsNewSector();};
+    inline Int_t GetPad()        const { return fPad; }        // Provide index of current pad
+    inline Int_t GetPrevPad()    const { return fPrevPad; }    // Provide index of previous pad
+    inline Bool_t  IsNewPad()    const {return (fPad != fPrevPad) || IsNewRow();};
+
+
+  protected :
+    AliTPCRawStreamV3& operator = (const AliTPCRawStreamV3& stream);
+    AliTPCRawStreamV3(const AliTPCRawStreamV3& stream);
+
+    virtual void ApplyAltroMapping();
+
+    Int_t            fSector;       // index of current sector
+    Int_t            fPrevSector;   // index of previous sector
+    Int_t            fRow;          // index of current row
+    Int_t            fPrevRow;      // index of previous row
+    Int_t            fPad;          // index of current pad
+    Int_t            fPrevPad;      // index of previous pad
+    Int_t            fPatchIndex;   // current patch
+
+    AliAltroMapping *fMapping[6];   // Pointers to ALTRO mapping
+    Bool_t           fIsMapOwner;   // does object own its mappings?
+
+    ClassDef(AliTPCRawStreamV3, 0)    // base class for reading TPC raw digits using the fast algorithm
+};
+
+#endif
index 6688b1c3289dc822cd2a6a333fd1a79c017804c5..5e115c5f6c3eff04378d1b848061fd5aa23546b6 100644 (file)
@@ -45,6 +45,7 @@
 #pragma link C++ class AliTPCAltroMapping+;
 #pragma link C++ class AliTPCRawStream+;
 #pragma link C++ class AliTPCRawStreamFast+;
+#pragma link C++ class AliTPCRawStreamV3+;
 #pragma link C++ class AliTPCeventInfo+;
 
 #pragma link C++ class AliTPCCalibRawBase+;
index 7ac4641d6b9e9d5bf902f28607ed2d79c4dfc91f..215f0d72837bd810fe2c65777dcd673d2051cade 100644 (file)
@@ -9,7 +9,7 @@ SRCS:=  AliSegmentID.cxx  AliSegmentArray.cxx AliDigits.cxx AliH2F.cxx \
        AliTPCmapper.cxx \
        AliTPCROC.cxx AliTPCCalROC.cxx AliTPCCalPad.cxx AliTPCCalDet.cxx \
        AliTPCcalibDB.cxx \
-       AliTPCAltroMapping.cxx AliTPCRawStream.cxx AliTPCRawStreamFast.cxx \
+       AliTPCAltroMapping.cxx AliTPCRawStream.cxx AliTPCRawStreamFast.cxx AliTPCRawStreamV3.cxx  \
        AliTPCLaserTracks.cxx AliTPCSensorTemp.cxx  AliTPCSensorTempArray.cxx \
        AliTPCCalibRawBase.cxx AliTPCCalibPedestal.cxx AliTPCCalibPulser.cxx   AliTPCCalibCE.cxx \
         AliTPCPreprocessor.cxx   AliTPCPreprocessorOnline.cxx \
@@ -21,7 +21,7 @@ SRCS:=  AliSegmentID.cxx  AliSegmentArray.cxx AliDigits.cxx AliH2F.cxx \
         AliTransform.cxx AliTPCTransform.cxx AliTPCAlign.cxx AliTPCGoofieValues.cxx \
        AliTPCdataQA.cxx AliTPCQAChecker.cxx AliTPCConfigDA.cxx AliExternalComparison.cxx \
        AliTPCkalmanTime.cxx AliESDcosmic.cxx AliTPCPointCorrection.cxx AliTPCTransformation.cxx \
-        AliTPCkalmanFit.cxx
+        AliTPCkalmanFit.cxx 
 
 HDRS:= $(SRCS:.cxx=.h)