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 
11 #include <iostream>
12 
13 GEMDigi::GEMDigi (int strip, int bx) :
14  strip_(strip),
15  bx_(bx)
16 {}
17 
19  strip_(0),
20  bx_(0)
21 {}
22 
23 
24 // Comparison
25 bool GEMDigi::operator == (const GEMDigi& digi) const
26 {
27  if ( strip_ != digi.strip() ||
28  bx_ != digi.bx() ) return false;
29  return true;
30 }
31 
32 
34 bool GEMDigi::operator<(const GEMDigi& digi) const
35 {
36  if(digi.bx() == bx_)
37  return digi.strip() < strip_;
38  else
39  return digi.bx() < bx_;
40 }
41 
42 
43 std::ostream & operator<<(std::ostream & o, const GEMDigi& digi)
44 {
45  return o << " " << digi.strip() << " " << digi.bx();
46 }
47 
48 
49 void GEMDigi::print() const
50 {
51  std::cout << "Strip " << strip() << " bx " << bx() <<std::endl;
52 }
53 
void print() const
Definition: GEMDigi.cc:49
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
bool operator<(const GEMDigi &digi) const
Precedence operator.
Definition: GEMDigi.cc:34
bool operator==(const GEMDigi &digi) const
Definition: GEMDigi.cc:25
int bx() const
Definition: GEMDigi.h:28
uint16_t strip_
Definition: GEMDigi.h:33
tuple cout
Definition: gather_cfg.py:121
GEMDigi()
Definition: GEMDigi.cc:18
int strip() const
Definition: GEMDigi.h:27
int32_t bx_
Definition: GEMDigi.h:34