1 #ifndef ALIITSMODULEDASSD_H
2 #define ALIITSMODULEDASSD_H
5 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 /// This class provides storage container ITS SSD module calibration data
14 ///////////////////////////////////////////////////////////////////////////////
19 #include "AliITSChannelDaSSD.h"
22 class AliITSPedestalSSD;
23 class AliITSBadChannelsSSD;
25 class AliITSModuleDaSSD : public TObject {
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();
35 UChar_t GetDdlId() const { return fDdlId; }
36 UChar_t GetAD() const { return fAd; }
37 UChar_t GetADC() const { return fAdc; }
38 Short_t GetModuleId() const { return fModuleId; }
39 Int_t GetModuleRorcEquipId() const { return fEquipId; }
40 Int_t GetModuleRorcEquipType() const { return fEquipType; }
41 Int_t GetNumberOfStrips() const { return fNumberOfStrips; }
42 Long_t GetEventsNumber() const { return fEventsNumber; }
43 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 TArrayF* GetCM() const { return fCm; }
46 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 TArrayS* GetCMFerom() const { return fCmFerom; }
49 Int_t GetNumberOfChips() const { return fNumberOfChips; }
50 AliITSChannelDaSSD* GetStrip(const Int_t stripnumber) const
51 { 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 void SetModuleId (const Short_t moduleID) { fModuleId = moduleID; }
59 void SetStrip(AliITSChannelDaSSD* strip, const Int_t strID) { if ((fStrips) && (strID <= fNumberOfStrips)) fStrips[strID] = strip; }
60 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 void DeleteCM () {if (fCm) { delete [] fCm; fNumberOfChips = 0; fCm = NULL; } }
63 void DeleteSignal() {if (fStrips) for (Int_t i = 0; i < fNumberOfStrips; i++)
64 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 void DeleteCMFerom () {if (fCmFerom) { delete [] fCmFerom; fCmFerom = NULL; } }
71 static Int_t GetStripsPerModuleConst() { return fgkStripsPerModule; }
72 static Int_t GetPNStripsPerModule() { return fgkPNStripsPerModule;}
73 static Int_t GetStripsPerChip() { return fgkStripsPerChip; }
74 static Int_t GetChipsPerModuleConst() { return fgkChipsPerModule; }
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
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
91 Int_t fNumberOfStrips; // Number of AliITSChannelDaSSD* allocated
92 AliITSChannelDaSSD **fStrips; //[fNumberOfStrips] Array of *AliITSChannelDaSSD
94 Int_t fNumberOfChips; // Number of TArrayF objects allocated for CM
95 TArrayF *fCm; //[fNumberOfChips] CM
96 TArrayS *fCmFerom; // CM calculated in FEROM
98 Long_t fEventsNumber; // number of events for fsignal memory allocation
101 Bool_t ForbiddenAdcNumber (const UChar_t adcn) const { return ((adcn == 6) || (adcn == 7)); }
103 ClassDef(AliITSModuleDaSSD, 6)