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);
100 file.ignoreLines(skip2);
103 while (
file.good()) {
104 int id =
file.readInteger();
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()) {
201 string str =
file.readString();
202 if (
str.find(
'#') == 0)
std::string fullPath() const
int load()
load look-up tables
int getCoarseEta(int sp, int adr) const
get coarse eta value for a given sector processor [1-6] and address [1-22]
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] ...
Log< level::Error, false > LogError
virtual ~L1MuBMTQualPatternLut()
destructor
void print() const
print look-up tables
static std::string to_string(const XMLCh *ch)
int getIgnoredLines(L1TriggerLutFile file) const
void reset()
reset look-up tables
L1MuBMTQualPatternLut()
constructor