67 typedef vector<LUT>::iterator LI;
68 for (LI iter = ext_lut.begin(); iter != ext_lut.end(); iter++) {
90 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
91 string ext_dir =
"L1TriggerData/DTTrackFinder/Ext/";
98 int sh_phi = 12 - nbit_phi;
99 int sh_phib = 10 - nbit_phib;
148 if (
file.open() != 0)
156 int adr_old = -512 >> sh_phib;
161 while (
file.good()) {
162 int adr = (
file.readInteger()) >> sh_phib;
163 int low = (
file.readInteger());
168 if (adr != adr_old) {
169 tmplut.
low[adr_old] = sum_low >> sh_phi;
170 tmplut.
high[adr_old] = sum_high >> sh_phi;
188 ext_lut.push_back(tmplut);
198 cout <<
"L1 barrel Track Finder Extrapolation look-up tables :" << endl;
199 cout <<
"=====================================================" << endl;
201 cout <<
"Precision : " << endl;
202 cout <<
'\t' << setw(2) << nbit_phi <<
" bits are used for phi " << endl;
203 cout <<
'\t' << setw(2) << nbit_phib <<
" bits are used for phib " << endl;
208 cout <<
"Extrapolation : " << static_cast<Extrapolation>(
ext) << endl;
209 cout <<
"====================" << endl;
213 for (
int i = 0;
i < nbit_phib;
i++)
215 cout <<
" low-value";
216 for (
int i = 0;
i < nbit_phi;
i++)
218 cout <<
" high-value " << endl;
219 for (
int i = 0;
i < 2 * nbit_phi + nbit_phib;
i++)
221 cout <<
"---------------------------------" << endl;
223 LUT::LUTmap::const_iterator iter = ext_lut[
ext].low.begin();
224 LUT::LUTmap::const_iterator iter1;
225 while (iter != ext_lut[
ext].
low.end()) {
226 int address = (*iter).first;
227 int low = (*iter).second;
228 iter1 = ext_lut[
ext].high.find(address);
229 int high = (*iter1).second;
242 cout.setf(ios::right, ios::adjustfield);
243 cout <<
" " << setbase(10) << setw(5) << address <<
" (";
244 for (
int i = nbit_phib - 1;
i >= 0;
i--)
245 cout << b_address[
i];
246 cout <<
") " << setw(5) <<
low <<
" (";
247 for (
int i = nbit_phi - 1;
i >= 0;
i--)
249 cout <<
") " << setw(5) <<
high <<
" (";
250 for (
int i = nbit_phi - 1;
i >= 0;
i--)
252 cout <<
") " << endl;
265 LUT::LUTmap::const_iterator iter = ext_lut[ext_ind].low.find(address);
266 if (iter != ext_lut[ext_ind].
low.end()) {
267 return (*iter).second;
269 cerr <<
"ExtLut::getLow : can not find address " << address << endl;
278 LUT::LUTmap::const_iterator iter = ext_lut[ext_ind].high.find(address);
279 if (iter != ext_lut[ext_ind].
high.end()) {
280 return (*iter).second;
282 cerr <<
"ExtLut::getHigh : can not find address " << address << endl;