//
//_____________________________________________________________________________
-AliMpSectorReader::AliMpSectorReader(const AliMpDataStreams& dataStreams,
- AliMq::Station12Type station,
+AliMpSectorReader::AliMpSectorReader(AliMq::Station12Type station,
AliMp::PlaneType plane)
: TObject(),
- fkDataStreams(dataStreams),
fStationType(station),
fPlaneType(plane),
fSector(0),
- fMotifReader(new AliMpMotifReader(dataStreams, AliMp::kStation12, station, plane))
+ fMotifReader(new AliMpMotifReader(AliMp::kStation12, station, plane))
{
/// Standard constructor
//
//_____________________________________________________________________________
-void AliMpSectorReader::ReadSectorData(istream& in)
+void AliMpSectorReader::ReadSectorData(const AliMpDataStreams& dataStreams,
+ istream& in)
{
/// Read sector input data;
/// prepare zones and rows vectors to be filled in.
return;
}
- ReadZoneData(in);
+ ReadZoneData(dataStreams, in);
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadZoneData(istream& in)
+void AliMpSectorReader::ReadZoneData(const AliMpDataStreams& dataStreams,
+ istream& in)
{
/// Read zone input data;
/// create zone and adds it to zones vector.
return;
}
- ReadSubZoneData(in, zone);
+ ReadSubZoneData(dataStreams, in, zone);
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadSubZoneData(istream& in, AliMpZone* zone)
+void AliMpSectorReader::ReadSubZoneData(const AliMpDataStreams& dataStreams,
+ istream& in, AliMpZone* zone)
{
/// Read subzone input data;
/// create subzone and its to the specified zone.
AliDebugStream(2) << GetSubZoneKeyword() << endl;
- AliMpVMotif* motif = ReadMotifData(in, zone);
+ AliMpVMotif* motif = ReadMotifData(dataStreams, in, zone);
AliMpSubZone* subZone = new AliMpSubZone(motif);
zone->AddSubZone(subZone);
return;
}
- ReadRowSegmentsData(in, zone, subZone);
+ ReadRowSegmentsData(dataStreams, in, zone, subZone);
}
//_____________________________________________________________________________
-AliMpVMotif* AliMpSectorReader::ReadMotifData(istream& in, AliMpZone* zone)
+AliMpVMotif* AliMpSectorReader::ReadMotifData(
+ const AliMpDataStreams& dataStreams,
+ istream& in, AliMpZone* zone)
{
/// Read the motif input data.
if (!motif) {
motifType = motifMap->FindMotifType(motifTypeID);
if (!motifType) {
- motifType = fMotifReader->BuildMotifType(motifTypeID);
+ motifType = fMotifReader->BuildMotifType(dataStreams, motifTypeID);
motifMap->AddMotifType(motifType);
}
motif = new AliMpMotif(motifID, motifType,
zone->GetPadDimensionX(), zone->GetPadDimensionY());
else
- motif = fMotifReader->BuildMotifSpecial(motifID, motifType);
+ motif = fMotifReader->BuildMotifSpecial(dataStreams, motifID, motifType);
if (motif)
motifMap->AddMotif(motif);
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadRowSegmentsData(istream& in,
+void AliMpSectorReader::ReadRowSegmentsData(const AliMpDataStreams& dataStreams,
+ istream& in,
AliMpZone* zone, AliMpSubZone* subZone)
{
/// Read row segments input data of a specified zone and subzone;
if (in.eof()) return;
if (nextKeyword == GetZoneKeyword()) {
- ReadZoneData(in);
+ ReadZoneData(dataStreams, in);
}
else if (nextKeyword == GetSubZoneKeyword()) {
- ReadSubZoneData(in, zone);
+ ReadSubZoneData(dataStreams, in, zone);
}
else {
AliErrorStream() << "Wrong file format." << endl;
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadSectorSpecialData(istream& in, AliMp::XDirection direction)
+void AliMpSectorReader::ReadSectorSpecialData(
+ const AliMpDataStreams& dataStreams,
+ istream& in, AliMp::XDirection direction)
{
/// Read sector input data
/// with a special (irregular) motifs.
return;
}
- ReadMotifsSpecialData(in);
- ReadRowSpecialData(in, direction);
+ ReadMotifsSpecialData(dataStreams, in);
+ ReadRowSpecialData(dataStreams, in, direction);
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadMotifsSpecialData(istream& in)
+void AliMpSectorReader::ReadMotifsSpecialData(
+ const AliMpDataStreams& dataStreams,
+ istream& in)
{
/// Read the special (irregular) motifs input data.
do {
Int_t zone;
in >> zone;
- AliMpVMotif* motif = ReadMotifData(in, fSector->GetZone(zone));
+ AliMpVMotif* motif = ReadMotifData(dataStreams, in, fSector->GetZone(zone));
AliMpSubZone* subZone = new AliMpSubZone(motif);
fSector->GetZone(zone)->AddSubZone(subZone);
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadRowSpecialData(istream& in, AliMp::XDirection direction)
+void AliMpSectorReader::ReadRowSpecialData(
+ const AliMpDataStreams& dataStreams,
+ istream& in, AliMp::XDirection direction)
{
/// Read row input data
/// with a special (irregular) motifs.
return;
}
- ReadRowSegmentSpecialData(in, segment, direction);
+ ReadRowSegmentSpecialData(dataStreams, in, segment, direction);
// Update row segment and set it to all subzones associated with
// contained motifs
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadRowSegmentSpecialData(istream& in,
- AliMpVRowSegmentSpecial* segment,
- AliMp::XDirection direction)
+void AliMpSectorReader::ReadRowSegmentSpecialData(
+ const AliMpDataStreams& dataStreams,
+ istream& in,
+ AliMpVRowSegmentSpecial* segment,
+ AliMp::XDirection direction)
{
/// Read row segment input data
/// with a special (irregular) motifs.
if (in.eof()) return;
if (nextKeyword == GetPadRowsKeyword()) {
- ReadRowSegmentSpecialData(in, segment, direction);
+ ReadRowSegmentSpecialData(dataStreams, in, segment, direction);
}
else if (nextKeyword == GetRowSpecialKeyword()) {
- ReadRowSpecialData(in, direction);
+ ReadRowSpecialData(dataStreams, in, direction);
}
else {
AliErrorStream() << "Wrong file format." << endl;
//
//_____________________________________________________________________________
-AliMpSector* AliMpSectorReader::BuildSector()
+AliMpSector* AliMpSectorReader::BuildSector(const AliMpDataStreams& dataStreams)
{
/// Read the mapping data from stream and create the basic objects: \n
/// zones, subzones, rows, row segments, motifs.
// Open input stream
//
istream& in
- = fkDataStreams.
+ = dataStreams.
CreateDataStream(AliMpFiles::SectorFilePath(fStationType,fPlaneType));
- ReadSectorData(in);
+ ReadSectorData(dataStreams, in);
delete ∈
fSector->SetRowSegmentOffsets();
TString sectorSpecialFileName
= AliMpFiles::SectorSpecialFilePath(fStationType, fPlaneType);
- if ( fkDataStreams.IsDataStream(sectorSpecialFileName) ) {
+ if ( dataStreams.IsDataStream(sectorSpecialFileName) ) {
istream& in2
- = fkDataStreams.
+ = dataStreams.
CreateDataStream(sectorSpecialFileName);
- ReadSectorSpecialData(in2, AliMp::kLeft);
+ ReadSectorSpecialData(dataStreams, in2, AliMp::kLeft);
delete &in2;
}
// Open input file for special outer zone
TString sectorSpecialFileName2
= AliMpFiles::SectorSpecialFilePath2(fStationType, fPlaneType);
- if ( fkDataStreams.IsDataStream(sectorSpecialFileName2) ) {
+ if ( dataStreams.IsDataStream(sectorSpecialFileName2) ) {
istream& in3
- = fkDataStreams.
+ = dataStreams.
CreateDataStream(sectorSpecialFileName2);
- ReadSectorSpecialData(in3, AliMp::kRight);
+ ReadSectorSpecialData(dataStreams, in3, AliMp::kRight);
delete &in3;
}