8 #ifndef DETECTORS_STT_PNDSTTTUBEIDMAP_H_ 9 #define DETECTORS_STT_PNDSTTTUBEIDMAP_H_ 24 vector<vector<int>>
GetSector(
int sector) {
return fTubeMap[sector]; }
25 vector<int>
GetRowInSector(
int sector,
int row) {
return fTubeMap[sector][row]; }
26 int GetNTubesInRow(
int sector,
int row) {
return fTubeMap[sector][row].size(); }
28 int GetTube(
int sector,
int row,
int posInRow) {
return fTubeMap[sector][row][posInRow]; }
29 bool IsSkewed(
int row) {
return std::find(fSkewedRows.begin(), fSkewedRows.end(), row) != fSkewedRows.end(); }
34 if (index < fFlatTubeMap.size())
35 return fFlatTubeMap[index];
42 if (fMapTubeIdSectorRow.count(tubeId) > 0)
43 return fMapTubeIdSectorRow[tubeId];
45 std::pair<int, int> noTubeId(-1, -1);
50 void AddTube(
int sector,
int row,
int tubeId);
55 vector<vector<vector<int>>> fTubeMap;
56 vector<int> fFlatTubeMap;
57 std::map<int, std::pair<int, int>> fMapTubeIdSectorRow;
58 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()