CMS 3D CMS Logo

RPCDigi.cc
Go to the documentation of this file.
1 
14 #include <iostream>
15 
16 RPCDigi::RPCDigi (int strip, int bx) :
17  strip_(strip),
18  bx_(bx),
19  time_(0),
20  coordinateX_(0),
21  coordinateY_(0),
22  deltaTime_(0),
23  deltaX_(0),
24  deltaY_(0),
25  hasTime_(false),
26  hasX_(false),
27  hasY_(false)
28 {}
29 
31  strip_(0),
32  bx_(0),
33  time_(0),
34  coordinateX_(0),
35  coordinateY_(0),
36  deltaTime_(0),
37  deltaX_(0),
38  deltaY_(0),
39  hasTime_(false),
40  hasX_(false),
41  hasY_(false)
42 {}
43 
44 
45 // Comparison
46 bool RPCDigi::operator == (const RPCDigi& digi) const {
47  if ( strip_ != digi.strip() ||
48  bx_ != digi.bx() ) return false;
49  return true;
50 }
51 
53 bool RPCDigi::operator<(const RPCDigi& digi) const{
54  if(digi.bx() == this->bx())
55  return digi.strip()<this->strip();
56  else
57  return digi.bx()<this->bx();
58 }
59 
60 std::ostream & operator<<(std::ostream & o, const RPCDigi& digi) {
61  return o << " " << digi.strip()
62  << " " << digi.bx();
63 }
64 
65 void RPCDigi::print() const {
66  std::cout << "Strip " << strip()
67  << " bx " << bx() <<std::endl;
68 }
bool hasY_
Definition: RPCDigi.h:63
double deltaY_
Definition: RPCDigi.h:60
uint16_t strip_
Definition: RPCDigi.h:53
bool hasX_
Definition: RPCDigi.h:62
double time_
Definition: RPCDigi.h:55
int bx() const
Definition: RPCDigi.h:29
RPCDigi()
Definition: RPCDigi.cc:30
double coordinateY_
Definition: RPCDigi.h:57
int strip() const
Definition: RPCDigi.h:28
double coordinateX_
Definition: RPCDigi.h:56
int32_t bx_
Definition: RPCDigi.h:54
bool operator==(const RPCDigi &digi) const
Definition: RPCDigi.cc:46
double deltaX_
Definition: RPCDigi.h:59
void print() const
Definition: RPCDigi.cc:65
std::ostream & operator<<(std::ostream &o, const RPCDigi &digi)
Definition: RPCDigi.cc:60
bool hasTime_
Definition: RPCDigi.h:61
double deltaTime_
Definition: RPCDigi.h:58
bool operator<(const RPCDigi &digi) const
Precedence operator.
Definition: RPCDigi.cc:53