20 #ifndef DETECTORS_STT_PNDSTTTUBEIDMAP_H_ 21 #define DETECTORS_STT_PNDSTTTUBEIDMAP_H_ 36 vector<vector<int>>
GetSector(
int sector) {
return fTubeMap[sector]; }
37 vector<int>
GetRowInSector(
int sector,
int row) {
return fTubeMap[sector][row]; }
38 int GetNTubesInRow(
int sector,
int row) {
return fTubeMap[sector][row].size(); }
40 int GetTube(
int sector,
int row,
int posInRow) {
return fTubeMap[sector][row][posInRow]; }
41 bool IsSkewed(
int row) {
return std::find(fSkewedRows.begin(), fSkewedRows.end(), row) != fSkewedRows.end(); }
46 if (index < fFlatTubeMap.size())
47 return fFlatTubeMap[index];
54 if (fMapTubeIdSectorRow.count(tubeId) > 0)
55 return fMapTubeIdSectorRow[tubeId];
57 std::pair<int, int> noTubeId(-1, -1);
62 void AddTube(
int sector,
int row,
int tubeId);
67 vector<vector<vector<int>>> fTubeMap;
68 vector<int> fFlatTubeMap;
69 std::map<int, std::pair<int, int>> fMapTubeIdSectorRow;
70 std::vector<int> fSkewedRows;
vector< int > GetRowInSector(int sector, int row)
vector< vector< int > > GetSector(int sector)
void AddTube(int sector, int row, int tubeId)
std::pair< int, int > GetSectorRowFromTubeId(int tubeId)
virtual ~PndSttTubeIdMap()
int GetTubeIdFlat(int index)
void SetSkewedRows(std::vector< int > &values)
int GetNTubesInRow(int sector, int row)
int GetTube(int sector, int row, int posInRow)
static PndSttTubeIdMap * Instance()