53 #include <Riostream.h>
55 #include <TObjString.h>
76 if ( ! fgInstance && warn ) {
77 AliWarningClass(
"Segmentation has not been loaded");
92 AliWarningClass(
"Segmentation has been already loaded");
97 AliInfoClass(
"Reading segmentation from ASCII files.");
111 fMpSegmentations(true),
198 TString deSegName = detElement->
GetSegName(cath);
203 <<
"Creating segmentation for detElemId=" << detElemId
204 <<
" cath=" << cath << endl;
210 TString deTypeName = detElement->
GetSegType();
231 AliErrorStream() <<
"Unknown station type" << endl;
237 return mpSegmentation;
247 AliDebugStream(2) <<
"detElemId=" << detElemId << endl;;
260 for ( Int_t i = 0; i < ecn[cathode].GetSize(); ++i )
262 mde->
Add(ecn[cathode][i],const_cast<AliMpVSegmentation*>(seg[cathode]));
288 <<
"Invalid detElemId " << detElemId << endl;
296 TString deSegName = detElement->
GetSegName(cath);
301 <<
"Segmentation for detElemId/cathod "
302 << detElemId <<
", " << cath <<
" not defined" << endl;
312 Int_t detElemId, Int_t ecId, Bool_t warn)
const
322 <<
"Cannot find the el cards map for detElemId " << detElemId << endl;
326 TObject*
object = m->
GetValue(ecId);
330 <<
"Segmentation for electronic card "
331 << ecId <<
" not found" << endl;
348 if ( ! kSegmentation )
return 0;
353 <<
"Segmentation is not of sector type" << endl;
383 AliErrorStream() <<
"Segemntation type not identified." << endl;
420 if ( ! kSegmentation )
return 0;
425 <<
"Segmentation is not of slat type" << endl;
456 AliErrorStream() <<
"Segemntation type not identified." << endl;
493 if ( ! kSegmentation )
return 0;
498 <<
"Segmentation is not of trigger type" << endl;
531 AliErrorStream() <<
"Segemntation type not identified." << endl;
Singleton container class for mapping segmentations.
const AliMpSlat * Slat() const
The iterator over detection elements.
const AliMpVSegmentation * GetMpSegmentation(Int_t detElemId, AliMp::CathodType cath, Bool_t warn=true) const
AliMpSlatMotifMap * fSlatMotifMap
Map of motif, motifTypes to avoid duplications and allow proper deletion.
Read trigger slat ASCII files.
AliMpVSegmentation * GetHelper() const
Return helper class.
static AliMpDEStore * Instance(Bool_t warn=true)
AliMpVSegmentation * CreateMpSegmentation(const AliMpDataStreams &dataStreams, Int_t detElemId, AliMp::CathodType cath)
const AliMpSector * GetSector() const
Return the sector.
AliMpSegmentation(TRootIOCtor *ioCtor)
const AliMpSlat * GetSlatByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
AliMq::Station12Type GetStation12Type() const
const AliMpSlat * GetSlat(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
AliMp::StationType GetStationType() const
Bool_t Add(const TString &first, TObject *second)
static AliMpSegmentation * ReadData(const AliMpDataStreams &dataStreams, Bool_t warn=true)
Class that takes care of reading the sector data.
const AliMpVSegmentation * GetMpSegmentationByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
AliMpSector * BuildSector(const AliMpDataStreams &dataStreams)
Int_t CurrentDEId() const
A slat (building block of stations 3, 4 and 5)
The class defines the electronics properties of detection element.
const AliMpTrigger * Slat() const
A container to keep track of allocated motifs and motifTypes for slats (both St345 and trigger ones)...
TString GetSegName(AliMp::CathodType cath) const
virtual AliMp::StationType StationType() const =0
Return the station type.
const AliMpSector * GetSector(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
AliMpSlat * ReadSlat(const AliMpDataStreams &dataStreams, const char *slatType, AliMp::PlaneType planeType)
virtual ~AliMpSegmentation()
Implementation of AliMpVSegmentation for trigger slats.
const AliMpSector * GetSectorByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
AliMpExMap * FillElCardsMap(Int_t detElemId)
static AliMpDEStore * ReadData(const AliMpDataStreams &dataStreams, Bool_t warn=true)
static AliMp::StationType GetStationType(Int_t detElemId)
AliMp::PlaneType GetPlaneType(AliMp::CathodType cath) const
AliMpExMap fElCardsMap
Map of el. cards IDs to segmentations.
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
Read slat and pcb ASCII files.
AliMp::CathodType GetCathodType(Int_t cathodNumber)
Convert integer number in enum;.
TObject * Get(const TString &first) const
A sector (quadrant) of the MUON chamber of stations 1 and 2.
void Add(Int_t keyFirst, Int_t keySecond, TObject *object)
Implementation of AliMpVSegmentation for St345 slats.
void SetOwner(Bool_t owner)
A segmentation of the sector.
The abstract base class for the segmentation.
AliMpTrigger * ReadSlat(const AliMpDataStreams &dataStreams, const char *slatType, AliMp::PlaneType planeType)
AliMpStringObjMap fMpSegmentations
Map of mapping segmentations to DE seg names.
static AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true)
Fast version of AliMpVSegmentation.
AliMpDEStore * fDetElements
Detection element store.
const AliMpTrigger * GetTrigger(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
static Bool_t IsValidDetElemId(Int_t detElemId, Bool_t warn=false)
const AliMpTrigger * GetTriggerByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
Bool_t GetReadFromFiles() const
TString GetSegType() const
Return segmentation type name.
static AliMpSegmentation * fgInstance
Singleton instance.
Helper class making Root persistent TExMap.
Mapping data streams provider.
virtual void GetAllElectronicCardIDs(TArrayI &ecn) const =0
Fill the given array with the electronic card IDs.