CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPCDigi.cc
Go to the documentation of this file.
1 
13 #include <iostream>
14 
16  : strip_(strip),
17  bx_(bx),
18  time_(0),
19  coordinateX_(0),
20  coordinateY_(0),
21  deltaTime_(0),
22  deltaX_(0),
23  deltaY_(0),
24  hasTime_(false),
25  hasX_(false),
26  hasY_(false) {}
27 
29  : strip_(0),
30  bx_(0),
31  time_(0),
32  coordinateX_(0),
33  coordinateY_(0),
34  deltaTime_(0),
35  deltaX_(0),
36  deltaY_(0),
37  hasTime_(false),
38  hasX_(false),
39  hasY_(false) {}
40 
41 // Comparison
42 bool RPCDigi::operator==(const RPCDigi& digi) const {
43  if (strip_ != digi.strip() || bx_ != digi.bx())
44  return false;
45  return true;
46 }
47 
49 bool RPCDigi::operator<(const RPCDigi& digi) const {
50  if (digi.bx() == this->bx())
51  return digi.strip() < this->strip();
52  else
53  return digi.bx() < this->bx();
54 }
55 
56 std::ostream& operator<<(std::ostream& o, const RPCDigi& digi) { return o << " " << digi.strip() << " " << digi.bx(); }
57 
58 void RPCDigi::print() const { std::cout << "Strip " << strip() << " bx " << bx() << std::endl; }
uint16_t strip_
Definition: RPCDigi.h:50
int bx() const
Definition: RPCDigi.h:28
RPCDigi()
Definition: RPCDigi.cc:28
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
int strip() const
Definition: RPCDigi.h:27
int32_t bx_
Definition: RPCDigi.h:51
bool operator==(const RPCDigi &digi) const
Definition: RPCDigi.cc:42
void print() const
Definition: RPCDigi.cc:58
tuple cout
Definition: gather_cfg.py:144
bool operator<(const RPCDigi &digi) const
Precedence operator.
Definition: RPCDigi.cc:49