LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSModuleDaSSD.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 27 3.7 %
Date: 2016-06-14 17:26:59 Functions: 1 30 3.3 %

          Line data    Source code
       1             : #ifndef ALIITSMODULEDASSD_H
       2             : #define ALIITSMODULEDASSD_H
       3             : 
       4             : 
       5             : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       6             :  * See cxx source for full Copyright notice                               */
       7             : /*                                                                        */
       8             : /* $Id$ */
       9             : ///////////////////////////////////////////////////////////////////////////////
      10             : ///
      11             : /// This class provides storage container ITS SSD module calibration data
      12             : /// used by DA. 
      13             : /// Date: 18/07/2008
      14             : ///////////////////////////////////////////////////////////////////////////////
      15             : 
      16             : #include "TObject.h"
      17             : #include "TArrayF.h"
      18             : #include "TArrayS.h"
      19             : #include "AliITSChannelDaSSD.h"
      20             : 
      21             : class AliITSNoiseSSD;
      22             : class AliITSPedestalSSD;
      23             : class AliITSBadChannelsSSD;
      24             : 
      25             : class AliITSModuleDaSSD : public TObject {
      26             :   public :
      27             :     AliITSModuleDaSSD();
      28             :     AliITSModuleDaSSD(const Int_t numberofstrips);
      29             :     AliITSModuleDaSSD(const Int_t numberofstrips, const Long_t eventsnumber);
      30             :     AliITSModuleDaSSD(const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t moduleID);
      31             :     AliITSModuleDaSSD(const AliITSModuleDaSSD& module);
      32             :     AliITSModuleDaSSD& operator = (const AliITSModuleDaSSD& module);
      33             :     virtual ~AliITSModuleDaSSD();
      34             :     
      35           0 :     UChar_t      GetDdlId()    const { return fDdlId; }
      36           0 :     UChar_t      GetAD()       const { return fAd; }
      37           0 :     UChar_t      GetADC()      const { return fAdc; }
      38           0 :     Short_t      GetModuleId() const { return fModuleId; }
      39           0 :     Int_t        GetModuleRorcEquipId()   const { return fEquipId; }
      40           0 :     Int_t        GetModuleRorcEquipType() const { return fEquipType; }
      41           0 :     Int_t        GetNumberOfStrips() const { return fNumberOfStrips; }
      42           0 :     Long_t       GetEventsNumber()   const { return fEventsNumber; }
      43           0 :     Float_t*     GetCM(const Int_t chipn)   const { return chipn < fNumberOfChips ? fCm[chipn].GetArray() : NULL; }
      44             :     Float_t      GetCM(const Int_t chipn, const Long_t evn)   const;
      45           0 :     TArrayF*     GetCM() const { return fCm; }
      46           0 :     Short_t*     GetCMFerom(const Int_t chipn)   const { return (fCmFerom && (chipn < fgkChipsPerModule)) ? fCmFerom[chipn].GetArray() : NULL; }
      47             :     Short_t      GetCMFerom(const Int_t chipn, const Long_t evn)   const;
      48           0 :     TArrayS*     GetCMFerom() const { return fCmFerom; }
      49           0 :     Int_t        GetNumberOfChips() const  { return fNumberOfChips; }
      50             :     AliITSChannelDaSSD*  GetStrip(const Int_t stripnumber)  const 
      51           0 :                                 { return (fStrips) ? fStrips[stripnumber] : NULL; }
      52             :     Bool_t  SetEventsNumber(const Long_t eventsnumber);
      53             :     Bool_t  SetNumberOfStrips(const Int_t numberofstrips);
      54             :     Bool_t  SetNumberOfChips(const Int_t nchips);
      55             :     Bool_t  SetModuleIdData (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const Short_t moduleID);
      56             :     void    SetModuleFEEId (const UChar_t ddlID, const UChar_t ad, const UChar_t adc);
      57             :     void    SetModuleRorcId (const Int_t equipid, const Int_t equiptype);
      58           0 :     void    SetModuleId (const Short_t moduleID) { fModuleId = moduleID; }
      59           0 :     void    SetStrip(AliITSChannelDaSSD* strip, const Int_t strID) { if ((fStrips) && (strID <= fNumberOfStrips)) fStrips[strID] = strip; }
      60           0 :     void    SetCM (Float_t* cm, const Int_t chipn)  { if (chipn < fNumberOfChips) fCm[chipn].Set(fCm[chipn].GetSize(), cm); }
      61             :     Bool_t  SetCM (const Float_t cm, const Int_t chipn, const Int_t evn);
      62           0 :     void    DeleteCM () {if (fCm) { delete [] fCm; fNumberOfChips = 0; fCm = NULL; } }
      63           0 :     void    DeleteSignal() {if (fStrips) for (Int_t i = 0; i < fNumberOfStrips; i++) 
      64           0 :                                             if (fStrips[i]) fStrips[i]->DeleteSignal(); fEventsNumber = 0; }
      65             :         Bool_t  AllocateCMFeromArray(void);
      66             :     void    SetCMFerom (Short_t* cm, const Int_t chipn);
      67             :     Bool_t  SetCMFerom (const Short_t cm, const Int_t chipn, const Int_t evn);
      68             :     Bool_t  SetCMFeromEventsNumber(const Long_t eventsnumber); 
      69           0 :     void    DeleteCMFerom () {if (fCmFerom) { delete [] fCmFerom; fCmFerom = NULL; } }
      70             : 
      71           0 :     static Int_t GetStripsPerModuleConst() { return  fgkStripsPerModule;  }
      72           0 :     static Int_t GetPNStripsPerModule()    { return  fgkPNStripsPerModule;}
      73           0 :     static Int_t GetStripsPerChip()        { return  fgkStripsPerChip;    }
      74           0 :     static Int_t GetChipsPerModuleConst()  { return  fgkChipsPerModule;   }
      75             : 
      76             :   protected :
      77             :     static const Int_t   fgkStripsPerModule;    // Number of strips per SSD module
      78             :     static const Int_t   fgkPNStripsPerModule;  // Number of N/P strips per SSD module
      79             :     static const Int_t   fgkStripsPerChip;      // Number of strips per chip HAL25
      80             :     static const UChar_t fgkMaxAdNumber;        // MAx SSD FEROM AD number
      81             :     static const UChar_t fgkMaxAdcNumber;       // MAx SSD FEROM ADC number
      82             :     static const Int_t   fgkChipsPerModule;     // Number of HAL25 chips per SSD module
      83             : 
      84             :     Int_t          fEquipId;        // required to access to rorc
      85             :     Int_t          fEquipType;      // fEquipType, required to access to rorc
      86             :     UChar_t        fDdlId;          // index of DDL, ITS SSD: 33-48
      87             :     UChar_t        fAd;             // index of AD module     0-9
      88             :     UChar_t        fAdc;            // index of ADC module    0-5, 8-13
      89             :     Short_t        fModuleId;       // Module number          500-2197
      90             :     
      91             :     Int_t                 fNumberOfStrips;     // Number of AliITSChannelDaSSD* allocated
      92             :     AliITSChannelDaSSD  **fStrips;             //[fNumberOfStrips]  Array of *AliITSChannelDaSSD
      93             :     
      94             :     Int_t                 fNumberOfChips;      // Number of TArrayF objects allocated for CM   
      95             :     TArrayF              *fCm;                 //[fNumberOfChips]    CM
      96             :     TArrayS              *fCmFerom;            //                       CM calculated in FEROM
      97             : 
      98             :     Long_t            fEventsNumber;           // number of events for fsignal memory allocation
      99             : 
     100             :   private:
     101           0 :     Bool_t ForbiddenAdcNumber (const UChar_t adcn) const { return ((adcn == 6) || (adcn == 7)); }
     102             :  
     103         118 :     ClassDef(AliITSModuleDaSSD, 6) 
     104             :  
     105             : };
     106             : 
     107             : #endif
     108             : 

Generated by: LCOV version 1.11