51 #include <Riostream.h> 52 #include <Rstrstream.h> 58 #if !defined(__HP_aCC) && !defined(__alpha) 74 static const TString kSectorKeyword =
"SECTOR_DATA";
75 return kSectorKeyword;
82 static const TString kZoneKeyword =
"ZONE";
90 static const TString kSubZoneKeyword =
"SUBZONE";
91 return kSubZoneKeyword;
98 static const TString kRowKeyword =
"ROW_SEGMENT";
106 static const TString kSectorSpecialKeyword =
"SECTOR_SPECIAL_DATA";
107 return kSectorSpecialKeyword;
114 static const TString kMotifKeyword =
"MOTIF";
115 return kMotifKeyword;
122 static const TString kRowSpecialKeyword =
"ROW";
123 return kRowSpecialKeyword;
130 static const TString kPadRowsKeyword =
"PAD_ROWS";
131 return kPadRowsKeyword;
138 static const TString kPadRowSegmentKeyword =
"PAD_ROW_SEGMENT";
139 return kPadRowSegmentKeyword;
188 Int_t nofZones, nofRows;
189 TString directionStr;
190 Double_t offsetX, offsetY;
202 if ( nofZones < 0 || nofZones >= std::numeric_limits<Int_t>::max() ||
203 nofRows < 0 || nofRows >= std::numeric_limits<Int_t>::max() ) {
230 Double_t sizex, sizey;
236 << sizex <<
" " << sizey << endl;
294 = motifMap->
FindMotif(motifID, motifTypeID,
331 Int_t offX, offY, inRow, nofMotifs, firstMotifPositionId, firstMotifPositionDId;
336 in >> firstMotifPositionId;
337 in >> firstMotifPositionDId;
343 << offX <<
" " << offY <<
" " << inRow <<
" " << nofMotifs <<
" " 344 << firstMotifPositionId <<
" " << firstMotifPositionDId
358 firstMotifPositionId, firstMotifPositionDId);
365 if (in.eof())
return;
495 while (!subZone && j<fSector->GetNofZones())
517 if ( nofPadRows < 0 || nofPadRows >= std::numeric_limits<Int_t>::max()) {
537 for (Int_t i=0; i<nofPadRows; i++) {
544 newPadRows.Add(padRow);
552 Int_t nofPadsInRow, motifPositionId;
553 TString motifId, motifTypeId;
556 in >> motifPositionId;
561 << nofPadsInRow <<
" " << motifId <<
" " << motifPositionId << endl;
571 for (Int_t i=0; i<nofPadRows; i++) {
586 motifPositionId, nofPadsInRow);
591 if (in.eof())
return;
629 TString sectorSpecialFileName
631 if ( dataStreams.
IsDataStream(sectorSpecialFileName) ) {
634 CreateDataStream(sectorSpecialFileName);
642 TString sectorSpecialFileName2
644 if ( dataStreams.
IsDataStream(sectorSpecialFileName2) ) {
647 CreateDataStream(sectorSpecialFileName2);
static const TString & GetSectorSpecialKeyword()
void AddSubZone(AliMpSubZone *subZone)
AliMq::Station12Type fStationType
station type
A pad row composed of the pad row segments.
AliMpMotifReader * fMotifReader
motif reader
static TString SectorSpecialFilePath2(AliMq::Station12Type station, AliMp::PlaneType plane)
void AddPadRow(AliMpPadRow *padRow)
void ReadRowSegmentSpecialData(const AliMpDataStreams &dataStreams, istream &in, AliMpVRowSegmentSpecial *segment, AliMp::XDirection direction)
AliMpVMotif * GetMotif() const
AliMpMotifSpecial * BuildMotifSpecial(const AliMpDataStreams &dataStreams, const TString &motifID, AliMpMotifType *motifType, Double_t scale=1.0)
static TString SectorFilePath(AliMq::Station12Type station, AliMp::PlaneType plane)
AliMp::PlaneType fPlaneType
plane type
static const TString & GetZoneKeyword()
static const TString & GetPadRowSegmentKeyword()
virtual ~AliMpSectorReader()
Class that takes care of reading the sector data.
void ReadMotifsSpecialData(const AliMpDataStreams &dataStreams, istream &in)
AliMpVMotif * ReadMotifData(const AliMpDataStreams &dataStreams, istream &in, AliMpZone *zone)
AliMpSector * BuildSector(const AliMpDataStreams &dataStreams)
Bool_t IsDataStream(const TString &path) const
AliMpMotifType * BuildMotifType(const AliMpDataStreams &dataStreams, const TString &motifTypeId)
void ReadSectorSpecialData(const AliMpDataStreams &dataStreams, istream &in, AliMp::XDirection direction)
virtual void UpdatePadsOffset()=0
Update pads offset.
void SetPadDimensions(Double_t dx, Double_t dy)
void ReadRowSegmentsData(const AliMpDataStreams &dataStreams, istream &in, AliMpZone *zone, AliMpSubZone *subZone)
void ReadZoneData(const AliMpDataStreams &dataStreams, istream &in)
AliMpVMotif * FindMotif(const TString &motifID) const
AliMpSector * fSector
sector
A region of pads of the same dimensions composed of subzones.
An interface for a row segment.
static const TString & GetPadRowsKeyword()
static const TString & GetSubZoneKeyword()
AliMpVRowSegment * GetRowSegment(Int_t i) const
A special inner row segment composed of the pad rows.
void ReadSubZoneData(const AliMpDataStreams &dataStreams, istream &in, AliMpZone *zone)
static const TString & GetSectorKeyword()
Bool_t AddMotif(AliMpVMotif *motif, Bool_t warn=true)
A row segment composed of the the identic motifs.
void SetRowSegmentOffsets()
A special outer row segment composed of the pad rows.
Double_t GetPadDimensionY() const
Return pad y dimensions.
void AddRowSegment(AliMpVRowSegment *rowSegment)
A row composed of the row segments.
AliMpMotifType * FindMotifType(const TString &motifTypeID) const
A sector (quadrant) of the MUON chamber of stations 1 and 2.
static TString SectorSpecialFilePath(AliMq::Station12Type station, AliMp::PlaneType plane)
static const TString & GetMotifKeyword()
virtual AliMpVMotif * GetMotif(Int_t i) const
Return the i-th motif of this row segment.
Abstract base class for a special row segment composed of the pad rows.
AliMpMotifMap * GetMotifMap() const
Return the motif map.
AliMpSectorReader()
Not implemented.
Abstract base class for a motif with its unique ID and the motif type.
void AddRowSegment(AliMpVRowSegment *rowSegment)
#define AliDebugStream(level)
Bool_t AddMotifType(AliMpMotifType *motifType, Bool_t warn=true)
Class that takes care of reading the motifs data.
virtual Int_t GetNofMotifs() const
Return the number of motifs in this this row segment.
AliMpSubZone * FindSubZone(const AliMpVMotif *motif) const
void AddRowSegmentInFront(AliMpVRowSegment *rowSegment)
void ReadSectorData(const AliMpDataStreams &dataStreams, istream &in)
virtual Double_t LeftBorderX() const =0
Return the x coordinate of the left border in the global coordinate system.
static const TString & GetRowKeyword()
Double_t GetPadDimensionX() const
Return pad x dimensions.
static const TString & GetRowSpecialKeyword()
Int_t GetNofRowSegments() const
special row segments built from left to right
A motif with its unique ID and the motif type.
AliMpRow * GetRow(Int_t i) const
AliMpVPadRowSegment * AddPadRowSegment(AliMpMotif *motif, Int_t motifPositionId, Int_t nofPads)
virtual Double_t RightBorderX() const =0
Return the x coordinate of the right border in the global coordinate system.
void ReadRowSpecialData(const AliMpDataStreams &dataStreams, istream &in, AliMp::XDirection direction)
AliMpZone * GetZone(Int_t i) const
The namespace for mapping enums and related functions.
static Int_t ManuMask(AliMp::PlaneType planeType)
Class that defines the motif properties.
Mapping data streams provider.
A region in zone composed of the row segments with the same motif type.
special row segments built from right to left