test
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 //
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 L1MuDTTrackSegEta
39 //---------------------------------
40 
41 //----------------
42 // Constructors --
43 //----------------
44 
46  m_location(), m_position(0), m_quality(0), m_bx(0) {}
47 
48 
49 L1MuDTTrackSegEta::L1MuDTTrackSegEta(int wheel_id, int sector_id, int station_id,
50  int pos, int quality, int bx) :
51  m_location(wheel_id, sector_id, station_id),
52  m_position(pos), m_quality(quality), m_bx(bx) {
53 
54 }
55 
56 
58  int pos, int quality, int bx) :
59  m_location(id), m_position(pos), m_quality(quality), m_bx(bx) {
60 
61 }
62 
63 
65  m_location(id.m_location),
66  m_position(id.m_position), m_quality(id.m_quality), m_bx(id.m_bx) {}
67 
68 
69 
70 //--------------
71 // Destructor --
72 //--------------
74 
75 
76 //--------------
77 // Operations --
78 //--------------
79 
80 //
81 // reset ETA Track Segment
82 //
84 
85  m_position = 0;
86  m_quality = 0;
87  m_bx = 0;
88 
89 }
90 
91 
92 //
93 // Assignment operator
94 //
96 
97  if ( this != &id ) {
98  m_location = id.m_location;
99  m_position = id.m_position;
100  m_quality = id.m_quality;
101  m_bx = id.m_bx;
102  }
103  return *this;
104 
105 }
106 
107 
108 //
109 // Equal operator
110 //
112 
113  if ( m_location != id.m_location ) return false;
114  if ( m_position != id.m_position ) return false;
115  if ( m_quality != id.m_quality ) return false;
116  if ( m_bx != id.m_bx ) return false;
117  return true;
118 
119 }
120 
121 
122 //
123 // Unequal operator
124 //
126 
127  if ( m_location != id.m_location ) return true;
128  if ( m_position != id.m_position ) return true;
129  if ( m_quality != id.m_quality ) return true;
130  if ( m_bx != id.m_bx ) return true;
131  return false;
132 
133 }
134 
135 
136 //
137 // output stream operator
138 //
139 ostream& operator<<(ostream& s, const L1MuDTTrackSegEta& id) {
140 
141  s.setf(ios::right,ios::adjustfield);
142  s << (id.m_location) << "\t"
143  << "position : " << bitset<7>(id.position()) << " "
144  << "quality : " << bitset<7>(id.quality());
145 
146  return s;
147 
148 }
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