CMS 3D CMS Logo

Functions
L1MuDTEtaPattern.cc File Reference
#include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h"
#include <iostream>
#include <iomanip>
#include <bitset>
#include <cstdlib>

Go to the source code of this file.

Functions

ostream & operator<< (ostream &s, const L1MuDTEtaPattern &p)
 
istream & operator>> (istream &s, L1MuDTEtaPattern &p)
 

Function Documentation

◆ operator<<()

ostream& operator<< ( ostream &  s,
const L1MuDTEtaPattern p 
)

Definition at line 154 of file L1MuDTEtaPattern.cc.

154  {
155  s.setf(ios::right, ios::adjustfield);
156  s << "ID = " << setw(8) << p.id() << " "
157  << "quality = " << setw(2) << p.quality() << " "
158  << "eta = " << setw(1) << p.eta() << endl;
159  for (int i = 0; i < 3; i++) {
160  s << "station = " << i + 1 << " : ";
161  for (int j = 0; j < 5; j++) {
162  bitset<7> pos;
163  if (p.m_position[i] && (p.m_wheel[i] == j - 2))
164  pos.set(p.m_position[i] - 1);
165  s << pos << " ";
166  }
167  s << endl;
168  }
169 
170  return s;
171 }

References mps_fire::i, dqmiolumiharvest::j, AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::s.

◆ operator>>()

istream& operator>> ( istream &  s,
L1MuDTEtaPattern p 
)

Definition at line 176 of file L1MuDTEtaPattern.cc.

176  {
177  string pat;
178 
179  s >> p.m_id >> pat >> p.m_qual >> p.m_eta;
180 
181  for (int i = 0; i < 3; i++) {
182  string sub = pat.substr(3 * i, 3);
183  if (sub == "___") {
184  p.m_wheel[i] = 0;
185  p.m_position[i] = 0;
186  } else {
187  p.m_wheel[i] = atoi(sub.substr(0, 2).c_str());
188  p.m_position[i] = atoi(sub.substr(2, 1).c_str());
189  }
190  }
191 
192  return s;
193 }

References mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::s.

mps_fire.i
i
Definition: mps_fire.py:428
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pos
Definition: PixelAliasList.h:18
alignCSCRings.s
s
Definition: alignCSCRings.py:92
pat
Definition: HeavyIon.h:7
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66