CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuBMTrackSegEta.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuBMTrackSegEta
4 //
5 // Description: ETA Track Segment
6 //
7 //
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 //
12 //--------------------------------------------------
13 
14 //-----------------------
15 // This Class's Header --
16 //-----------------------
17 
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <iostream>
25 #include <iomanip>
26 #include <algorithm>
27 #include <bitset>
28 
29 //-------------------------------
30 // Collaborating Class Headers --
31 //-------------------------------
32 
34 
35 using namespace std;
36 
37 // --------------------------------
38 // class L1MuBMTrackSegEta
39 //---------------------------------
40 
41 //----------------
42 // Constructors --
43 //----------------
44 
45 L1MuBMTrackSegEta::L1MuBMTrackSegEta() : m_location(), m_position(0), m_quality(0), m_bx(0) {}
46 
47 L1MuBMTrackSegEta::L1MuBMTrackSegEta(int wheel_id, int sector_id, int station_id, int pos, int quality, int bx)
48  : m_location(wheel_id, sector_id, station_id), m_position(pos), m_quality(quality), m_bx(bx) {}
49 
51  : m_location(id), m_position(pos), m_quality(quality), m_bx(bx) {}
52 
54  : m_location(id.m_location), m_position(id.m_position), m_quality(id.m_quality), m_bx(id.m_bx) {}
55 
56 //--------------
57 // Destructor --
58 //--------------
60 
61 //--------------
62 // Operations --
63 //--------------
64 
65 //
66 // reset ETA Track Segment
67 //
69  m_position = 0;
70  m_quality = 0;
71  m_bx = 0;
72 }
73 
74 //
75 // Assignment operator
76 //
78  if (this != &id) {
79  m_location = id.m_location;
80  m_position = id.m_position;
81  m_quality = id.m_quality;
82  m_bx = id.m_bx;
83  }
84  return *this;
85 }
86 
87 //
88 // Equal operator
89 //
91  if (m_location != id.m_location)
92  return false;
93  if (m_position != id.m_position)
94  return false;
95  if (m_quality != id.m_quality)
96  return false;
97  if (m_bx != id.m_bx)
98  return false;
99  return true;
100 }
101 
102 //
103 // Unequal operator
104 //
106  if (m_location != id.m_location)
107  return true;
108  if (m_position != id.m_position)
109  return true;
110  if (m_quality != id.m_quality)
111  return true;
112  if (m_bx != id.m_bx)
113  return true;
114  return false;
115 }
116 
117 //
118 // output stream operator
119 //
120 ostream& operator<<(ostream& s, const L1MuBMTrackSegEta& id) {
121  s.setf(ios::right, ios::adjustfield);
122  s << (id.m_location) << "\t"
123  << "position : " << bitset<7>(id.position()) << " "
124  << "quality : " << bitset<7>(id.quality());
125 
126  return s;
127 }
bool operator!=(const L1MuBMTrackSegEta &) const
unequal operator
L1MuBMTrackSegEta()
default constructor
string quality
unsigned int m_position
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
bool operator==(const L1MuBMTrackSegEta &) const
equal operator
L1MuBMTrackSegEta & operator=(const L1MuBMTrackSegEta &)
assignment operator
virtual ~L1MuBMTrackSegEta()
destructor
void reset()
reset eta track segment
unsigned int m_quality
static int position[264][3]
Definition: ReadPGInfo.cc:289
L1MuBMTrackSegLoc m_location