]>
Commit | Line | Data |
---|---|---|
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 callibration data | |
12 | /// used by DA. | |
13 | /// | |
14 | /////////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | #include "TObject.h" | |
17 | #include "TArrayF.h" | |
18 | #include "AliITSChannelDaSSD.h" | |
19 | ||
20 | class AliITSNoiseSSD; | |
21 | ||
22 | class AliITSModuleDaSSD : public TObject { | |
23 | public : | |
24 | AliITSModuleDaSSD(); | |
25 | AliITSModuleDaSSD(const Int_t numberofstrips); | |
26 | AliITSModuleDaSSD(const Int_t numberofstrips, const Long_t eventsnumber); | |
27 | AliITSModuleDaSSD(const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t moduleID); | |
28 | AliITSModuleDaSSD(const AliITSModuleDaSSD& module); | |
29 | AliITSModuleDaSSD& operator = (const AliITSModuleDaSSD& module); | |
30 | virtual ~AliITSModuleDaSSD(); | |
31 | ||
32 | UChar_t GetDdlId() const { return fDdlId; } | |
33 | UChar_t GetAD() const { return fAd; } | |
34 | UChar_t GetADC() const { return fAdc; } | |
35 | Short_t GetModuleId() const { return fModuleId; } | |
36 | Int_t GetModuleRorcEquipId() const { return fEquipId; } | |
37 | Int_t GetModuleRorcEquipType() const { return fEquipType; } | |
38 | Int_t GetNumberOfStrips() const { return fNumberOfStrips; } | |
39 | Long_t GetEventsNumber() const { return fEventsNumber; } | |
40 | Float_t* GetCM(const Int_t chipn) const { return chipn < fNumberOfChips ? fCm[chipn].GetArray() : NULL; } | |
41 | Float_t GetCM(const Int_t chipn, const Long_t evn) const; | |
42 | TArrayF* GetCm() const { return fCm; } | |
43 | Int_t GetNumberOfChips() const { return fNumberOfChips; } | |
44 | AliITSChannelDaSSD* GetStrip(const Int_t stripnumber) const | |
45 | { return (fStrips) ? fStrips[stripnumber] : NULL; } | |
46 | AliITSNoiseSSD* GetCalibrationSSDModule() const; | |
47 | Bool_t SetEventsNumber(const Long_t eventsnumber); | |
48 | Bool_t SetNumberOfStrips(const Int_t numberofstrips); | |
49 | Bool_t SetNumberOfChips(const Int_t nchips); | |
50 | Bool_t SetModuleIdData (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const Short_t moduleID); | |
51 | void SetModuleFEEId (const UChar_t ddlID, const UChar_t ad, const UChar_t adc); | |
52 | void SetModuleRorcId (const Int_t equipid, const Int_t equiptype); | |
53 | void SetModuleId (const Short_t moduleID) { fModuleId = moduleID; } | |
54 | void SetStrip(AliITSChannelDaSSD* strip, const Int_t strID) { if ((fStrips) && (strID <= fNumberOfStrips)) fStrips[strID] = strip; } | |
55 | void SetCM (Float_t* cm, const Int_t chipn) { if (chipn < fNumberOfChips) fCm[chipn].Set(fCm[chipn].GetSize(), cm); } | |
56 | Bool_t SetCM (const Float_t cm, const Int_t chipn, const Int_t evn); | |
57 | void DeleteCM () {if (fCm) delete [] fCm; fCm = NULL; } | |
58 | void DeleteSignal() {if (fStrips) for (Int_t i = 0; i < fNumberOfStrips; i++) | |
59 | if (fStrips[i]) fStrips[i]->DeleteSignal(); fEventsNumber = 0; } | |
60 | static Int_t GetStripsPerModuleConst() { return fgkStripsPerModule; } | |
61 | static Int_t GetPNStripsPerModule() { return fgkPNStripsPerModule;} | |
62 | static Int_t GetStripsPerChip() { return fgkStripsPerChip; } | |
63 | static Int_t GetChipsPerModuleConst() { return fgkChipsPerModule; } | |
64 | ||
65 | protected : | |
66 | static const Int_t fgkStripsPerModule; // Number of strips per SSD module | |
67 | static const Int_t fgkPNStripsPerModule; // Number of N/P strips per SSD module | |
68 | static const Int_t fgkStripsPerChip; // Number of strips per chip HAL25 | |
69 | static const UChar_t fgkMaxAdNumber; // MAx SSD FEROM AD number | |
70 | static const UChar_t fgkMaxAdcNumber; // MAx SSD FEROM ADC number | |
71 | static const Int_t fgkChipsPerModule; // Number of HAL25 chips per SSD module | |
72 | ||
73 | Int_t fEquipId; // required to access to rorc | |
74 | Int_t fEquipType; // fEquipType, required to access to rorc | |
75 | UChar_t fDdlId; // index of DDL, ITS SSD: 33-48 | |
76 | UChar_t fAd; // index of AD module 0-9 | |
77 | UChar_t fAdc; // index of ADC module 0-5, 8-13 | |
78 | Short_t fModuleId; // Module number 0-1697 | |
79 | ||
80 | Int_t fNumberOfStrips; // Number of AliITSChannelDaSSD* allocated | |
81 | AliITSChannelDaSSD **fStrips; //[fNumberOfStrips] Array of *AliITSChannelDaSSD | |
82 | ||
83 | Int_t fNumberOfChips; // Number of TArrayF objects allocated for CM | |
84 | TArrayF *fCm; //[fNumberOfChips] CM | |
85 | ||
86 | Long_t fEventsNumber; // number of events for fsignal memory allocation | |
87 | ||
88 | private: | |
89 | Bool_t ForbiddenAdcNumber (const UChar_t adcn) const { return ((adcn == 6) || (adcn == 7)); } | |
90 | ||
91 | ClassDef(AliITSModuleDaSSD, 2) | |
92 | ||
93 | }; | |
94 | ||
95 | #endif |