FairRoot/PandaRoot
PndSttTubeIdMap.cxx
Go to the documentation of this file.
1 /*
2  * PndSttTubeIdMap.cxx
3  *
4  * Created on: 02.08.2018
5  * Author: tstockmanns
6  */
7 
8 #include <PndSttTubeIdMap.h>
9 #include <utility>
10 #include <iostream>
11 
13 
15 
17  fSkewedRows.push_back(10);
18  fSkewedRows.push_back(11);
19  fSkewedRows.push_back(12);
20  fSkewedRows.push_back(13);
21  fSkewedRows.push_back(14);
22  fSkewedRows.push_back(15);
23  fSkewedRows.push_back(16);
24  fSkewedRows.push_back(17);
25 }
26 
28  // TODO Auto-generated destructor stub
29 }
30 
32  if ( !fInstance){
33  fInstance = new PndSttTubeIdMap();
34  }
35  return fInstance;
36 }
37 
38 void PndSttTubeIdMap::AddTube(int sector, int row, int tubeId)
39 {
40  if (!(sector < fTubeMap.size())){
41  fTubeMap.resize(sector + 1);
42  }
43  if (!(row < fTubeMap[sector].size())){
44  fTubeMap[sector].resize(row + 1);
45  }
46  fTubeMap[sector][row].push_back(tubeId);
47  fMapTubeIdSectorRow[tubeId] = std::make_pair(sector, row);
48  fFlatTubeMap.push_back(tubeId);
49 }
int row
Definition: anaLmdDigi.C:67
virtual ~PndSttTubeIdMap()
void AddTube(int sector, int row, int tubeId)
std::map< int, std::pair< int, int > > fMapTubeIdSectorRow
ClassImp(PndSttTubeIdMap)
static PndSttTubeIdMap * fInstance
static PndSttTubeIdMap * Instance()
vector< vector< vector< int > > > fTubeMap
std::vector< int > fSkewedRows
vector< int > fFlatTubeMap