]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCCalibRaw.h
Fix for coverity 17562
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibRaw.h
index 353041b2ce00d00b37eb94d13b90c23e6982fd20..0d109f99879c4e2e604c72031e6f64480cb8ea2f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITPCCALIBALTROHEADERS_H
-#define ALITPCCALIBALTROHEADERS_H
+#ifndef ALITPCCALIBRAW_H
+#define ALITPCCALIBRAW_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -20,6 +20,8 @@
 class TH2C;
 class TH1F;
 class TMap;
+class TGraph;
+class TCanvas;
 
 class AliTPCCalibRaw : public AliTPCCalibRawBase {
 public:
@@ -47,24 +49,38 @@ public:
   const TVectorF *GetALTROL1PhaseEventsRCU(Int_t rcu) const {return (TVectorF*)fArrALTROL1PhaseEvent.At(rcu);}
   const TVectorF *GetALTROL1PhaseFailEventsRCU(Int_t rcu) const {return (TVectorF*)fArrALTROL1PhaseFailEvent.At(rcu);}
 
-  void  SetRangePeakDetection(Int_t minus, Int_t plus) { fPeakDetMinus=minus; fPeakDetPlus=plus;}
+  const TVectorF *GetOccupancyEvent()          const {return &fVOccupancyEvent;}
+  const TVectorF *GetOccupancyEventSensitive() const {return &fVOccupancySenEvent;}
+  const TVectorF *GetSignalSumEvent()          const {return &fVSignalSumEvent;}
+  const TVectorF *GetSignalSumEventSensitive() const {return &fVSignalSumSenEvent;}
+  const TVectorF *GetFiredPadsSensitive()      const {return &fVNfiredPadsSenEvent;}
+  const TVectorF *GetEventTimeStamps()         const {return &fVTimeStampEvent;}
+  UInt_t GetFirstTimeStamp() const {return fFirstTimeStamp;}
   
+  void  SetRangePeakDetection(Int_t minus, Int_t plus) { fPeakDetMinus=minus; fPeakDetPlus=plus;}
+  //Phase info
   TH2C *MakeHistL1RCUEvents(Int_t type=0);
   TH2C *MakeHistL1RCUEventsIROC(Int_t type=0);
   TH2C *MakeHistL1RCUEventsOROC(Int_t type=0);
   TH1F *MakeHistL1PhaseDist();
   TVectorF *MakeVectL1PhaseDist();
+  //Occupancy info
+  TGraph*  MakeGraphOccupancy(const Int_t type=0, const Int_t xType=0);
+//   TGraph*  MakeGraphNoiseEvents();
+  TCanvas* MakeCanvasOccupancy(const Int_t xType=1, Bool_t sen=kFALSE);
 
   const THnSparseI *GetHnDrift() const {return fHnDrift;}
 //   AliTPCCalPad *CreateCalPadL1Mean();
 //   AliTPCCalPad *CreateCalPadL1RMS();
   
+  void Merge(AliTPCCalibRaw * const sig);
+  virtual Long64_t Merge(TCollection * const list);
+  
 private:
   Int_t   fPeakDetMinus;             //  Consecutive timebins on rising edge to be regarded as a signal
   Int_t   fPeakDetPlus;              //  Consecutive timebins on falling edge to be regarded as a signal
   UInt_t  fNFailL1Phase;             //Number of failures in L1 phase
   UInt_t  fNFailL1PhaseEvent;        //Number of events with L1 phase failures
-  UInt_t  fFirstTimeStamp;           //Time Stamp from first event
   //binning dv hist
   UInt_t  fNSecTime;                 //Number of seconds per bin in time
   UInt_t  fNBinsTime;                //Number of bin in time
@@ -80,6 +96,7 @@ private:
   Int_t     fLastSignal;             //! last signal processed
   Int_t     fNOkPlus;                //! number of processed time bins fullfilling peak criteria
   Int_t     fNOkMinus;               //! number of processed time bins fullfilling peak criteria
+  Int_t     fNanoSec;                //! current nano seconds stamp
 //
   //L1 phase stuff
   TVectorF fArrCurrentPhaseDist;       //!Phase distribution of the current event
@@ -91,6 +108,13 @@ private:
   //drift velocity stuff
   enum {kHnBinsDV=3};
   THnSparseI *fHnDrift;                //Histogram last time bin vs. ROC, Time
+  //occupancy
+  TVectorF fVOccupancyEvent;           //occupancy per event (number of samples above threshold)
+  TVectorF fVSignalSumEvent;           //occupancy per event (sum of all adc values)
+  TVectorF fVOccupancySenEvent;        //occupancy per event (number of samples abouve threshold) in sensitive regions
+  TVectorF fVSignalSumSenEvent;        //occupancy per event (sum of all adc values) in sensitive regions
+  TVectorF fVNfiredPadsSenEvent;       //number of pads with a signal above threshold in sensitive regions
+  TVectorF fVTimeStampEvent;           //timestamp for all events
   
   TVectorF *MakeArrL1PhaseRCU(Int_t rcu, Bool_t force=kFALSE);
   TVectorF *MakeArrL1PhaseFailRCU(Int_t rcu, Bool_t force=kFALSE);
@@ -98,10 +122,10 @@ private:
   Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad) const;
   void CreateDVhist();
   
-  AliTPCCalibRaw(AliTPCCalibRaw &calib);
+  AliTPCCalibRaw(const AliTPCCalibRaw &calib);
   AliTPCCalibRaw& operator = (const  AliTPCCalibRaw &source);
 
-  ClassDef(AliTPCCalibRaw,2) //  Analysis of the Altro header information
+  ClassDef(AliTPCCalibRaw,4) //  Analysis of the Altro header information
 };
 
 //----------------------
@@ -121,7 +145,7 @@ inline TVectorF *AliTPCCalibRaw::MakeArrL1PhaseFailRCU(Int_t rcu, Bool_t force)
 {
   TVectorF *arr=(TVectorF*)fArrALTROL1PhaseFailEvent.UncheckedAt(rcu);
   if (!arr && force) {
-    arr=new TVectorF(1000);
+    arr=new TVectorF(100);
     fArrALTROL1PhaseFailEvent.AddAt(arr,rcu);
   }
   return arr;