79 string defaultPath =
"L1Trigger/";
80 string eau_dir =
"L1TMuon/data/bmtf_luts/LUTs_Ass/";
84 for (
int sp = 0; sp < 6; sp++) {
99 int skip2 = getIgnoredLines(file);
103 while (file.
good()) {
114 vector<short> patternlist;
115 patternlist.reserve(num);
117 for (
int i = 0;
i <
num;
i++) {
119 patternlist.push_back(pattern);
122 m_lut[make_pair(sp + 1,
id)] = make_pair(eta, patternlist);
141 cout <<
"L1 barrel Track Finder Qual Pattern look-up tables :" << endl;
142 cout <<
"====================================================" << endl;
147 LUT::const_iterator iter = m_lut.begin();
148 while (iter != m_lut.end()) {
149 int sp = (*iter).first.first;
152 cout <<
"Qualified Patterns for Sector Processor " << setw(1) << sp <<
" :" << endl;
153 cout <<
"===========================================" << endl;
157 cout << setw(2) << (*iter).first.second <<
" " << setw(3) << (*iter).second.first <<
" " << setw(5)
158 << (*iter).second.second.size() <<
" : ";
159 const vector<short>& patternlist = (*iter).second.second;
160 vector<short>::const_iterator it;
161 for (it = patternlist.begin(); it != patternlist.end(); it++) {
162 cout << setw(5) << (*it) <<
" ";
175 LUT::const_iterator it = m_lut.find(make_pair(sp, adr));
176 if (it == m_lut.end()) {
178 <<
"Error: L1MuBMTQualPatternLut: no coarse eta found for address " << adr << endl;
181 return (*it).second.first;
188 LUT::const_iterator it = m_lut.find(make_pair(sp, adr));
189 if (it == m_lut.end()) {
191 <<
"Error: L1MuBMTQualPatternLut: no pattern list found for address " << adr << endl;
193 return (*it).second.second;
197 if (file.
open() != 0)
200 while (file.
good()) {
202 if (str.find(
'#') == 0)
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] ...
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
int load()
load look-up tables
bool good()
return status of file stream
std::string to_string(const V &value)
Log< level::Error, false > LogError
virtual ~L1MuBMTQualPatternLut()
destructor
void print() const
print look-up tables
void ignoreLines(int n)
read and ignore n lines from file
int getIgnoredLines(L1TriggerLutFile file) const
void reset()
reset look-up tables
std::string readString()
read one string from file
int readInteger()
read one integer from file
L1MuBMTQualPatternLut()
constructor
std::string fullPath() const