X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmapping%2FAliMpSegmentation.h;h=914765f528bbe545f926049ff23d7a42423d27f3;hb=cddcc1f3b00cdcdac20666f644fb42998a250ff6;hp=5210ac977b3fa8613d3c4568ced70353ac683048;hpb=ae505e9f2688bd7731bd1493dac20b3abad10445;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mapping/AliMpSegmentation.h b/MUON/mapping/AliMpSegmentation.h index 5210ac977b3..914765f528b 100644 --- a/MUON/mapping/AliMpSegmentation.h +++ b/MUON/mapping/AliMpSegmentation.h @@ -12,7 +12,8 @@ /// \brief Singleton container class for mapping segmentations /// /// It provides access to mapping segmentations based on the -/// AliMpVSegmentation interface. \n +/// AliMpVSegmentation interface and to segmentations underlying +/// detectors (sector, slat, trigger). \n /// Mapping segmentations for all detection elements /// are created at the first call to AliMpSegmentation::Instance(). /// The class is a singleton, it has all constructors @@ -32,36 +33,79 @@ # include "AliMpExMap.h" #endif -class AliMpVSegmentation; -class AliMpSegmentation; +#ifndef ALI_MP_CATHOD_TYPE_H +# include "AliMpCathodType.h" +#endif +class AliMpDEStore; +class AliMpSegmentation; +class AliMpVSegmentation; +class AliMpSlatMotifMap; +class AliMpDataStreams; +class AliMpSector; +class AliMpSlat; +class AliMpTrigger; class TRootIOCtor; class AliMpSegmentation : public TObject { public: - AliMpSegmentation(TRootIOCtor* /*ioCtor*/); + AliMpSegmentation(TRootIOCtor* ioCtor); virtual ~AliMpSegmentation(); // static methods - static AliMpSegmentation* Instance(); + static AliMpSegmentation* Instance(Bool_t warn = true); + static AliMpSegmentation* ReadData(const AliMpDataStreams& dataStreams, + Bool_t warn = true); // methods + + // + // Access to segmentations + // + const AliMpVSegmentation* GetMpSegmentation( - Int_t detElemId, Int_t cath, + Int_t detElemId, AliMp::CathodType cath, Bool_t warn = true) const; const AliMpVSegmentation* GetMpSegmentationByElectronics( Int_t detElemId, Int_t elCardID, Bool_t warn = true) const; - + // + // Access to sectors, slats, triggers + // + + const AliMpSector* GetSector(const AliMpVSegmentation* kSegmentation, + Bool_t warn = true) const; + const AliMpSector* GetSector(Int_t detElemId, AliMp::CathodType cath, + Bool_t warn = true) const; + const AliMpSector* GetSectorByElectronics(Int_t detElemId, Int_t elCardID, + Bool_t warn = true) const; + + const AliMpSlat* GetSlat(const AliMpVSegmentation* kSegmentation, + Bool_t warn = true) const; + const AliMpSlat* GetSlat(Int_t detElemId, AliMp::CathodType cath, + Bool_t warn = true) const; + const AliMpSlat* GetSlatByElectronics(Int_t detElemId, Int_t elCardID, + Bool_t warn = true) const; + + const AliMpTrigger* GetTrigger(const AliMpVSegmentation* kSegmentation, + Bool_t warn = true) const; + const AliMpTrigger* GetTrigger(Int_t detElemId, AliMp::CathodType cath, + Bool_t warn = true) const; + const AliMpTrigger* GetTriggerByElectronics(Int_t detElemId, Int_t elCardID, + Bool_t warn = true) const; + private: - AliMpSegmentation(); + AliMpSegmentation(const AliMpDataStreams& dataStreams); + /// Not implemented AliMpSegmentation(const AliMpSegmentation& rhs); + /// Not implemented AliMpSegmentation& operator=(const AliMpSegmentation& rhs); AliMpVSegmentation* CreateMpSegmentation( - Int_t detElemId, Int_t cath); + Int_t detElemId, AliMp::CathodType cath); + AliMpExMap* FillElCardsMap(Int_t detElemId); @@ -69,11 +113,13 @@ class AliMpSegmentation : public TObject { static AliMpSegmentation* fgInstance; ///< Singleton instance // data members + const AliMpDataStreams& fkDataStreams; //!< Data streams + AliMpDEStore* fDetElements; ///< Detection element store AliMpStringObjMap fMpSegmentations;///< Map of mapping segmentations to DE seg names AliMpExMap fElCardsMap; ///< Map of el. cards IDs to segmentations - + AliMpSlatMotifMap* fSlatMotifMap; ///< Map of motif, motifTypes to avoid duplications and allow proper deletion - ClassDef(AliMpSegmentation,1) // The factory for building mapping segmentations + ClassDef(AliMpSegmentation,3) // The factory for building mapping segmentations }; #endif //ALI_MP_SEGMENTATION_H