]>
Commit | Line | Data |
---|---|---|
1e738c3c | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | // $Id$ | |
13985652 | 5 | // $MpId: AliMpBusPatch.h,v 1.5 2006/05/24 13:58:16 ivana Exp $ |
1e738c3c | 6 | |
9b97f64e | 7 | /// \ingroup management |
1e738c3c | 8 | /// \class AliMpBusPatch |
9 | /// \brief Class that manages the maps buspatch<>DDL<>DE | |
10 | /// | |
11 | /// Calculates also the maximum DSP and buspatch numbers for a given DE | |
12 | /// | |
13985652 | 13 | /// \author Ch. Finck; Subatech Nantes |
1e738c3c | 14 | |
15 | #ifndef ALI_MP_BUSPATCH_H | |
16 | #define ALI_MP_BUSPATCH_H | |
17 | ||
1e738c3c | 18 | #include <TObject.h> |
19 | ||
2a7ea2e6 | 20 | #include <TExMap.h> |
5826f1df | 21 | #include <TArrayI.h> |
2a7ea2e6 | 22 | |
528df1a6 | 23 | class TExMapIter; |
24 | ||
1e738c3c | 25 | class AliMpBusPatch : public TObject |
26 | { | |
27 | ||
28 | public: | |
29 | ||
30 | AliMpBusPatch(); | |
1e738c3c | 31 | virtual ~AliMpBusPatch(); |
d2892ef5 | 32 | |
33 | // static methods | |
34 | static Int_t GetGlobalBusID(Int_t localID, Int_t ddlID); | |
35 | static Int_t GetLocalBusID(Int_t globalID, Int_t ddlID); | |
36 | ||
1e738c3c | 37 | |
1e738c3c | 38 | // methods |
39 | void ReadBusPatchFile(); | |
5826f1df | 40 | void GetDspInfo(Int_t iDDL, Int_t& iDspMax, Int_t* iBusPerDSP) const; |
1e738c3c | 41 | |
42 | Int_t GetDEfromBus(Int_t busPatchId); | |
43 | TArrayI* GetBusfromDE(Int_t idDE); | |
44 | Int_t GetDDLfromBus(Int_t busPatchId); | |
5826f1df | 45 | void AddBus(Int_t nDDL, Int_t busPatch); |
528df1a6 | 46 | void AddDetElem(Int_t nDDL, Int_t detElem); |
5826f1df | 47 | void Sort(); |
48 | TArrayI GetBusInDDL(Int_t nDDL) {return fBusInDDL[nDDL];} | |
528df1a6 | 49 | TArrayI GetDeInDDL(Int_t nDDL) {return fDeInDDL[nDDL];} |
5826f1df | 50 | Int_t NextBusInDDL(Int_t iDDL); |
51 | void ResetBusItr(Int_t iDDL); | |
528df1a6 | 52 | TExMapIter GetBusItr() {return TExMapIter(&fBusPatchToDDL);} |
1e738c3c | 53 | |
54 | private: | |
13e7956b | 55 | AliMpBusPatch(const AliMpBusPatch& src); |
56 | AliMpBusPatch& operator = (const AliMpBusPatch& src) ; | |
1e738c3c | 57 | |
d2892ef5 | 58 | static const Int_t fgkOffset; //< Offset for conversion global/local ID |
59 | ||
829425a5 | 60 | TExMap fDetElemIdToBusPatch; //!< Map from idDE to BusPatch |
61 | TExMap fBusPatchToDetElem; //!< Map from BusPatch to idDE | |
62 | TExMap fBusPatchToDDL; //!< Map from BusPatch to iDDL | |
1e738c3c | 63 | |
5826f1df | 64 | TArrayI fBusInDDL[20]; //!< buspatch array per DDL |
528df1a6 | 65 | Int_t fBusItr[20]; //!< buspatch in DDL iterator |
66 | TArrayI fDeInDDL[20]; //!< detElem array per DDL | |
5826f1df | 67 | |
5826f1df | 68 | |
528df1a6 | 69 | void Sort(TArrayI& arr, Int_t start, Int_t end); |
1e738c3c | 70 | |
71 | ClassDef(AliMpBusPatch,1) //utility class for the motif type | |
72 | }; | |
73 | ||
74 | ||
75 | #endif //ALI_MP_BUSPATCH_H |