CMS 3D CMS Logo

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