#ifndef ALI_MP_SEGMENTATION_H
#define ALI_MP_SEGMENTATION_H
#ifndef ROOT_TObject
# include <TObject.h>
#endif
#ifndef ALI_MP_STRING_OBJ_MAP_H
# include "AliMpStringObjMap.h"
#endif
#ifndef ALI_MP_EX_MAP_H
# include "AliMpExMap.h"
#endif
#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;
using std::ofstream;
class AliMpSegmentation : public TObject {
public:
AliMpSegmentation(TRootIOCtor* ioCtor);
virtual ~AliMpSegmentation();
static AliMpSegmentation* Instance(Bool_t warn = true);
static AliMpSegmentation* ReadData(const AliMpDataStreams& dataStreams,
Bool_t warn = true);
const AliMpVSegmentation* GetMpSegmentation(
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;
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(const AliMpDataStreams& dataStreams);
AliMpSegmentation(const AliMpSegmentation& rhs);
AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
AliMpVSegmentation* CreateMpSegmentation(
const AliMpDataStreams& dataStreams,
Int_t detElemId, AliMp::CathodType cath);
AliMpExMap* FillElCardsMap(Int_t detElemId);
static AliMpSegmentation* fgInstance;
AliMpDEStore* fDetElements;
AliMpStringObjMap fMpSegmentations;
AliMpExMap fElCardsMap;
AliMpSlatMotifMap* fSlatMotifMap;
ClassDef(AliMpSegmentation,3)
};
#endif //ALI_MP_SEGMENTATION_H