#include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h"
#include <iostream>
#include <iomanip>
#include <bitset>
Go to the source code of this file.
Functions | |
ostream & | operator<< (ostream &s, const L1MuDTEtaPattern &p) |
istream & | operator>> (istream &s, L1MuDTEtaPattern &p) |
ostream& operator<< | ( | ostream & | s, | |
const L1MuDTEtaPattern & | p | |||
) |
Definition at line 168 of file L1MuDTEtaPattern.cc.
References lat::endl(), L1MuDTEtaPattern::eta(), i, L1MuDTEtaPattern::id(), j, L1MuDTEtaPattern::m_position, L1MuDTEtaPattern::m_wheel, and L1MuDTEtaPattern::quality().
00168 { 00169 00170 s.setf(ios::right,ios::adjustfield); 00171 s << "ID = " << setw(8) << p.id() << " " 00172 << "quality = " << setw(2) << p.quality() << " " 00173 << "eta = " << setw(1) << p.eta() << endl; 00174 for (int i = 0; i < 3; i++) { 00175 s << "station = " << i+1 << " : "; 00176 for (int j = 0; j < 5; j++) { 00177 bitset<7> pos; 00178 if ( p.m_position[i] && (p.m_wheel[i] == j-2) ) pos.set(p.m_position[i]-1); 00179 s << pos << " "; 00180 } 00181 s << endl; 00182 } 00183 00184 return s; 00185 00186 }
istream& operator>> | ( | istream & | s, | |
L1MuDTEtaPattern & | p | |||
) |
Definition at line 192 of file L1MuDTEtaPattern.cc.
References i, L1MuDTEtaPattern::m_eta, L1MuDTEtaPattern::m_id, L1MuDTEtaPattern::m_position, L1MuDTEtaPattern::m_qual, and L1MuDTEtaPattern::m_wheel.
00192 { 00193 00194 string pat; 00195 00196 s >> p.m_id >> pat >> p.m_qual >> p.m_eta; 00197 00198 for ( int i = 0; i < 3; i++ ) { 00199 string sub = pat.substr(3*i,3); 00200 if ( sub == "___" ) { 00201 p.m_wheel[i] = 0; 00202 p.m_position[i] = 0; 00203 } 00204 else { 00205 p.m_wheel[i] = atoi(sub.substr(0,2).c_str()); 00206 p.m_position[i] = atoi(sub.substr(2,1).c_str()); 00207 } 00208 } 00209 00210 return s; 00211 00212 }