63 LUT::iterator iter = m_lut.begin();
64 while (iter != m_lut.end()) {
65 (*iter).second.second.clear();
86 string defaultPath =
"L1TriggerConfig/DTTrackFinder/parameters/";
87 string eau_dir =
"L1TriggerData/DTTrackFinder/Eau/";
91 for (
int sp = 0; sp < 6; sp++) {
94 emu_str =
"QualPatternList_SP1";
98 emu_str =
"QualPatternList_SP2";
102 emu_str =
"QualPatternList_SP3";
106 emu_str =
"QualPatternList_SP4";
110 emu_str =
"QualPatternList_SP5";
114 emu_str =
"QualPatternList_SP6";
125 if (file.
open() != 0)
134 while (file.
good()) {
145 vector<short> patternlist;
146 for (
int i = 0;
i <
num;
i++) {
148 patternlist.push_back(pattern);
151 m_lut[make_pair(sp + 1,
id)] = make_pair(eta, patternlist);
170 cout <<
"L1 barrel Track Finder Qual Pattern look-up tables :" << endl;
171 cout <<
"====================================================" << endl;
176 LUT::const_iterator iter = m_lut.begin();
177 while (iter != m_lut.end()) {
178 int sp = (*iter).first.first;
181 cout <<
"Qualified Patterns for Sector Processor " << setw(1) << sp <<
" :" << endl;
182 cout <<
"===========================================" << endl;
186 cout << setw(2) << (*iter).first.second <<
" " << setw(3) << (*iter).second.first <<
" " << setw(5)
187 << (*iter).second.second.size() <<
" : ";
188 const vector<short>& patternlist = (*iter).second.second;
189 vector<short>::const_iterator it;
190 for (it = patternlist.begin(); it != patternlist.end(); it++) {
191 cout << setw(5) << (*it) <<
" ";
204 LUT::const_iterator it = m_lut.find(make_pair(sp, adr));
205 if (it == m_lut.end()) {
206 cerr <<
"Error: L1MuDTQualPatternLut: no coarse eta found for address " << adr << endl;
209 return (*it).second.first;
216 LUT::const_iterator it = m_lut.find(make_pair(sp, adr));
217 if (it == m_lut.end()) {
218 cerr <<
"Error: L1MuDTQualPatternLut: no pattern list found for address " << adr << endl;
220 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
std::string fullPath() const
L1MuDTQualPatternLut()
constructor
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] ...