LCOV - code coverage report
Current view: top level - ZDC/ZDCbase - AliZDCPedestals.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 23 30.4 %
Date: 2016-06-14 17:26:59 Functions: 8 27 29.6 %

          Line data    Source code
       1             : #ifndef ALIZDCPEDESTALS_H
       2             : #define ALIZDCPEDESTALS_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : ////////////////////////////////////////////////
       8             : //  class for ZDC calibration -> PEDESTALS    //
       9             : ////////////////////////////////////////////////
      10             : 
      11             : #include "TNamed.h"
      12             : 
      13             : class AliZDC;
      14             : 
      15             : class AliZDCPedestals: public TNamed {
      16             : 
      17             :  public:
      18             :   AliZDCPedestals();
      19             :   AliZDCPedestals(const char* name);
      20             :   AliZDCPedestals(const AliZDCPedestals &calibda);
      21             :   AliZDCPedestals& operator= (const AliZDCPedestals &calibda);
      22             :   virtual ~AliZDCPedestals();
      23             :   void Reset();
      24             :   enum ESubPedModeBit{
      25             :      kPedSubModeFromOCDB = 14
      26             :   };
      27             : 
      28             :   virtual void  Print(Option_t *) const; 
      29             :   //
      30        1536 :   Float_t  GetMeanPed(Int_t channel)       const {return fMeanPedestal[channel];}
      31           0 :   Float_t* GetMeanPed()                    const {return (float*)fMeanPedestal;}
      32         768 :   Float_t  GetMeanPedWidth(Int_t channel)  const {return fMeanPedWidth[channel];}
      33           0 :   Float_t* GetMeanPedWidth()               const {return (float*)fMeanPedWidth;}
      34           0 :   Float_t  GetOOTPed(Int_t channel)        const {return fOOTPedestal[channel];}
      35           0 :   Float_t* GetOOTPed()                     const {return (float*)fOOTPedestal;}
      36           0 :   Float_t  GetOOTPedWidth(Int_t channel)   const {return fOOTPedWidth[channel];}
      37           0 :   Float_t* GetOOTPedWidth()                const {return (float*)fOOTPedWidth;}
      38         768 :   Float_t  GetPedCorrCoeff0(Int_t channel) const {return fPedCorrCoeff[0][channel];}
      39         768 :   Float_t  GetPedCorrCoeff1(Int_t channel) const {return fPedCorrCoeff[1][channel];}
      40           0 :   Float_t* GetPedCorrCoeff()               const {return (float*)fPedCorrCoeff;}
      41             :   
      42           0 :   UInt_t   GetPedSubModefromOCDB()         const {return fPedSubModefromOCDB;}
      43          16 :   Bool_t   TestPedModeBit()                const {return TESTBIT(fPedSubModefromOCDB, kPedSubModeFromOCDB);}
      44             :   Bool_t   GetUseCorrFit(int ich)          const 
      45           0 :            {if(AliZDCPedestals::TestPedModeBit()) return fUseCorrFit[ich]; else return kFALSE;}
      46             : 
      47           0 :   void  SetMeanPed(Int_t channel, Float_t val) {fMeanPedestal[channel]=val;}
      48             :   void  SetMeanPed(Float_t* MeanPed);
      49           0 :   void  SetMeanPedWidth(Int_t channel, Float_t val) {fMeanPedWidth[channel]=val;}
      50             :   void  SetMeanPedWidth(Float_t* MeanPedWidth);
      51           0 :   void  SetOOTPed(Int_t channel, Float_t val) {fOOTPedestal[channel]=val;}
      52             :   void  SetOOTPed(Float_t* OOTPed);
      53           0 :   void  SetOOTPedWidth(Int_t channel, Float_t val) {fOOTPedWidth[channel]=val;}
      54             :   void  SetOOTPedWidth(Float_t* OOTPedWidth);
      55             :   void  SetPedCorrCoeff(Int_t channel, Float_t valCoeff0, Float_t valCoeff1)
      56           0 :         {fPedCorrCoeff[0][channel]=valCoeff0; fPedCorrCoeff[1][channel]=valCoeff1;}
      57             :   void  SetPedCorrCoeff(Float_t* PedCorrCoeff);
      58             :   void  SetPedCorrCoeff(Float_t* PedCorrCoeff0, Float_t* PedCorrCoeff1);
      59             :   
      60             :   void  SetPedModeBit(Bool_t on=kTRUE) 
      61           9 :         {on ? SETBIT(fPedSubModefromOCDB, kPedSubModeFromOCDB) : CLRBIT(fPedSubModefromOCDB, kPedSubModeFromOCDB);}
      62           0 :   void  SetSubFromCorr(int ich) {fUseCorrFit[ich] = kTRUE;}
      63           0 :   void  UnsetSubFromCorr(int ich) {fUseCorrFit[ich] = kFALSE;}
      64             :   
      65             :  protected:
      66             :   // --- Pedestals
      67             :   Float_t  fMeanPedestal[48];    // Mean pedestal values 
      68             :   Float_t  fMeanPedWidth[48];    // Mean pedestal widths 
      69             :   Float_t  fOOTPedestal[48];     // "Out of Time" pedestal values
      70             :   Float_t  fOOTPedWidth[48];     // "Out of Time" pedestal widths
      71             :   Float_t  fPedCorrCoeff[2][48]; // Fit of correlation in-time vs. out-of-time
      72             :   UInt_t   fPedSubModefromOCDB;  // test whether the OCDB provides the ped sub mode ch.bych. (from RUN2)
      73             :   Bool_t   fUseCorrFit[24];      // if pedestal subtraction mode is from OCDB decide the mode!
      74             :   //
      75          36 :   ClassDef(AliZDCPedestals,4)    // ZDC pedestal calibration data
      76             : };
      77             : 
      78             : #endif

Generated by: LCOV version 1.11