QA classes splitted for the 3 subdetectors (P. Cerello and W. Ferrarese)
[u/mrichter/AliRoot.git] / ITS / AliITSModuleDaSSD.h
CommitLineData
f67db810 1#ifndef ALIITSMODULEDASSD_H
2#define ALIITSMODULEDASSD_H
3
4
223dda26 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///////////////////////////////////////////////////////////////////////////////
f67db810 15
223dda26 16#include "TObject.h"
c4d90345 17#include "TArrayF.h"
f67db810 18#include "AliITSChannelDaSSD.h"
19
223dda26 20class AliITSNoiseSSD;
21
f67db810 22class 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; }
c4d90345 35 Short_t GetModuleId() const { return fModuleId; }
f67db810 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; }
c4d90345 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; }
f67db810 44 AliITSChannelDaSSD* GetStrip(const Int_t stripnumber) const
45 { return (fStrips) ? fStrips[stripnumber] : NULL; }
f67db810 46 AliITSNoiseSSD* GetCalibrationSSDModule() const;
f67db810 47 Bool_t SetEventsNumber(const Long_t eventsnumber);
c4d90345 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);
f67db810 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);
c4d90345 53 void SetModuleId (const Short_t moduleID) { fModuleId = moduleID; }
f67db810 54 void SetStrip(AliITSChannelDaSSD* strip, const Int_t strID) { if ((fStrips) && (strID <= fNumberOfStrips)) fStrips[strID] = strip; }
c4d90345 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);
a69c8ba0 57 void DeleteCM () {if (fCm) { delete [] fCm; fNumberOfChips = 0; fCm = NULL; } }
f67db810 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; }
c4d90345 63 static Int_t GetChipsPerModuleConst() { return fgkChipsPerModule; }
f67db810 64
65 protected :
c4d90345 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
f67db810 72
73 Int_t fEquipId; // required to access to rorc
223dda26 74 Int_t fEquipType; // fEquipType, required to access to rorc
f67db810 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
c4d90345 78 Short_t fModuleId; // Module number 0-1697
79
80 Int_t fNumberOfStrips; // Number of AliITSChannelDaSSD* allocated
81 AliITSChannelDaSSD **fStrips; //[fNumberOfStrips] Array of *AliITSChannelDaSSD
f67db810 82
c4d90345 83 Int_t fNumberOfChips; // Number of TArrayF objects allocated for CM
84 TArrayF *fCm; //[fNumberOfChips] CM
f67db810 85
c4d90345 86 Long_t fEventsNumber; // number of events for fsignal memory allocation
f67db810 87
88 private:
89 Bool_t ForbiddenAdcNumber (const UChar_t adcn) const { return ((adcn == 6) || (adcn == 7)); }
90
c4d90345 91 ClassDef(AliITSModuleDaSSD, 2)
f67db810 92
93};
94
95#endif