90{
92
93 uint32_t nRELayerPos, nRECellPos, nREEaWePos;
94 uint32_t nRELayerMask, nRECellMask, nREEaWeMask;
95
96
97
98 f.open( initFile.c_str());
99
100 if( f.bad() ) {
101 cerr << "Error: could not open file " << initFile << endl;
102 return false;
103 }
104
106 cerr << "Error: could not find '##TofDigiConf' in file " << initFile << endl;
107 return StatusCode::FAILURE;
108 }
109
118 return false;
119
120
121 f.close();
122
123
124
127 {
128 uint32_t TELayerMax, TEphiMax, TEBaEaWe;
129 uint32_t eawe = 0, layer = 0, cell = 0;
130
131 if(barrel_ec_eawe == 1) {
132
135 } else {
136
138
139 TEphiMax = 48;
140 }
141
142 for(TEBaEaWe = 0; TEBaEaWe < 2; TEBaEaWe++) {
143 if (barrel_ec_eawe != 1 && TEBaEaWe > 0) break;
144 eawe = TEBaEaWe + (barrel_ec_eawe/2);
145 for(uint32_t TELayer = 0; TELayer <= TELayerMax; TELayer++) {
146 if (barrel_ec_eawe == 1) {
147 layer = TELayer + 1;
148 } else {
149
150
151 layer = 3;
152 }
153 if (layer <= 3) {
154 for (uint32_t TEphi = 0; TEphi <= TEphiMax; TEphi++) {
155 cell = TEphi + 1;
156 uint32_t reid = (((eawe<<nREEaWePos)&nREEaWeMask)|
157 ((layer<<nRELayerPos)&nRELayerMask)|
158 ((cell<<nRECellPos)&nRECellMask));
159 uint32_t teid =
TofID::getIntID(barrel_ec_eawe, TELayer, TEphi, TEBaEaWe);
160
161
162
163 m_re2te[reid] = teid;
164 m_te2reMap.insert(TE2REMAP::value_type(teid, reid)) ;
165 }
166 }
167 }
168 }
169 }
170
171
172 return StatusCode::SUCCESS;
173}
static bool expect(ifstream &f, string msg, string fname)
static bool expectInt(ifstream &f, string msg, string fname, uint32_t &val1, uint32_t &val2)
static bool find(ifstream &f, string msg, string fname)
static value_type getPHI_BARREL_MAX()
static value_type getBARREL_EC_MIN()
static value_type getBARREL_EC_MAX()
static value_type getLAYER_ENDCAP_MAX()
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
static value_type getLAYER_BARREL_MAX()