CMS 3D CMS Logo

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