67 LUT::iterator iter = m_lut.begin();
68 while ( iter != m_lut.end() ) {
69 (*iter).second.second.clear();
98 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
99 string eau_dir =
"L1TriggerData/DTTrackFinder/Eau/";
103 for (
int sp = 0;
sp < 6;
sp++ ) {
105 case 0 : { emu_str =
"QualPatternList_SP1";
break; }
106 case 1 : { emu_str =
"QualPatternList_SP2";
break; }
107 case 2 : { emu_str =
"QualPatternList_SP3";
break; }
108 case 3 : { emu_str =
"QualPatternList_SP4";
break; }
109 case 4 : { emu_str =
"QualPatternList_SP5";
break; }
110 case 5 : { emu_str =
"QualPatternList_SP6";
break; }
119 if ( file.
open() != 0 )
return -1;
127 while ( file.
good() ) {
130 if ( !file.
good() )
break;
132 if ( !file.
good() )
break;
134 if ( !file.
good() )
break;
136 vector<short> patternlist;
137 for (
int i = 0;
i <
num;
i++ ) {
139 patternlist.push_back(pattern);
142 m_lut[make_pair(
sp+1,
id)] = make_pair(eta,patternlist);
144 if ( !file.
good() ) { file.
close();
break; }
162 cout <<
"L1 barrel Track Finder Qual Pattern look-up tables :" << endl;
163 cout <<
"====================================================" << endl;
168 LUT::const_iterator iter = m_lut.begin();
169 while ( iter != m_lut.end() ) {
170 int sp = (*iter).first.first;
173 cout <<
"Qualified Patterns for Sector Processor " << setw(1) << sp <<
" :" << endl;
174 cout <<
"===========================================" << endl;
178 cout << setw(2) << (*iter).first.second <<
" "
179 << setw(3) << (*iter).second.first <<
" "
180 << setw(5) << (*iter).second.second.size() <<
" : ";
181 const vector<short>& patternlist = (*iter).second.second;
182 vector<short>::const_iterator it;
183 for ( it = patternlist.begin(); it != patternlist.end(); it++ ) {
184 cout << setw(5) << (*it) <<
" ";
200 LUT::const_iterator it = m_lut.find(make_pair(sp,adr));
201 if ( it == m_lut.end() ) {
202 cerr <<
"Error: L1MuDTQualPatternLut: no coarse eta found for address " << adr << endl;
205 return (*it).second.first;
215 LUT::const_iterator it = m_lut.find(make_pair(sp,adr));
216 if ( it == m_lut.end() ) {
217 cerr <<
"Error: L1MuDTQualPatternLut: no pattern list found for address " << adr << endl;
219 return (*it).second.second;
void reset()
reset look-up tables
bool good()
return status of file stream
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
void ignoreLines(int n)
read and ignore n lines from file
int load()
load look-up tables
virtual ~L1MuDTQualPatternLut()
destructor
int readInteger()
read one integer from file
void print() const
print look-up tables
L1MuDTQualPatternLut()
constructor
std::string fullPath() const
const std::vector< short > & getQualifiedPatterns(int sp, int adr) const
get list of qualified patterns for a given sector processor [1-6] and address [1-22] ...