test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCCluster.cc
Go to the documentation of this file.
1 #include "RPCCluster.h"
2 #include <iostream>
3 #include <fstream>
4 
5 using namespace std;
6 
7 RPCCluster::RPCCluster() : fstrip(0), lstrip(0), bunchx(0)
8 {
9 }
10 
11 RPCCluster::RPCCluster(int fs, int ls, int bx) :
12  fstrip(fs), lstrip(ls), bunchx(bx)
13 {
14 }
15 
17 {
18 }
19 
20 int
22 {
23  return fstrip;
24 }
25 
26 int
28 {
29  return lstrip;
30 }
31 
32 int
34 {
35  return -(fstrip-lstrip)+1;
36 }
37 
38 int
40 {
41  return bunchx;
42 }
43 
45 
46  return ((cl.firstStrip() == this->firstStrip()-1) &&
47  (cl.bx() == this->bx()));
48 }
49 
51 
52  if(this->isAdjacent(cl))
53  {
54  fstrip = cl.firstStrip();
55  }
56 }
57 
58 bool RPCCluster::operator<(const RPCCluster& cl) const{
59 
60 if(cl.bx() == this->bx())
61  return cl.firstStrip()<this->firstStrip();
62 else
63  return cl.bx()<this->bx();
64 }
65 
66 bool
68  return ( (this->clusterSize() == cl.clusterSize()) &&
69  (this->bx() == cl.bx()) &&
70  (this->firstStrip() == cl.firstStrip()) );
71 }
int16_t bunchx
Definition: RPCCluster.h:24
bool operator==(const RPCCluster &cl) const
Definition: RPCCluster.cc:67
def ls
Definition: eostools.py:348
void merge(const RPCCluster &cl)
Definition: RPCCluster.cc:50
int clusterSize() const
Definition: RPCCluster.cc:33
uint16_t lstrip
Definition: RPCCluster.h:23
bool operator<(const RPCCluster &cl) const
Definition: RPCCluster.cc:58
int bx() const
Definition: RPCCluster.cc:39
int lastStrip() const
Definition: RPCCluster.cc:27
uint16_t fstrip
Definition: RPCCluster.h:22
int firstStrip() const
Definition: RPCCluster.cc:21
bool isAdjacent(const RPCCluster &cl) const
Definition: RPCCluster.cc:44