CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GEMDigi.cc
Go to the documentation of this file.
1 
9 #include <iostream>
10 
11 GEMDigi::GEMDigi (int strip, int bx) :
12  strip_(strip),
13  bx_(bx)
14 {}
15 
17  strip_(0),
18  bx_(0)
19 {}
20 
21 
22 // Comparison
23 bool GEMDigi::operator == (const GEMDigi& digi) const
24 {
25  if ( strip_ != digi.strip() ||
26  bx_ != digi.bx() ) return false;
27  return true;
28 }
29 
30 
32 bool GEMDigi::operator<(const GEMDigi& digi) const
33 {
34  if(digi.bx() == bx_)
35  return digi.strip() < strip_;
36  else
37  return digi.bx() < bx_;
38 }
39 
40 
41 std::ostream & operator<<(std::ostream & o, const GEMDigi& digi)
42 {
43  return o << " " << digi.strip() << " " << digi.bx();
44 }
45 
46 
47 void GEMDigi::print() const
48 {
49  std::cout << "Strip " << strip() << " bx " << bx() <<std::endl;
50 }
51 
void print() const
Definition: GEMDigi.cc:47
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool operator<(const GEMDigi &digi) const
Precedence operator.
Definition: GEMDigi.cc:32
bool operator==(const GEMDigi &digi) const
Definition: GEMDigi.cc:23
int bx() const
Definition: GEMDigi.h:26
uint16_t strip_
Definition: GEMDigi.h:31
tuple cout
Definition: gather_cfg.py:121
GEMDigi()
Definition: GEMDigi.cc:16
int strip() const
Definition: GEMDigi.h:25
int32_t bx_
Definition: GEMDigi.h:32