CMS 3D CMS Logo

GEMCoPadDigi.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 GEMCoPadDigi::GEMCoPadDigi(uint8_t roll, GEMPadDigi f, GEMPadDigi s) : roll_(roll), first_(f), second_(s) {}
5 
6 GEMCoPadDigi::GEMCoPadDigi() : roll_(0), first_(GEMPadDigi()), second_(GEMPadDigi()) {}
7 
8 // Comparison
9 bool GEMCoPadDigi::operator==(const GEMCoPadDigi& digi) const {
10  return digi.first() == first_ and digi.second() == second_ and digi.roll() == roll_;
11 }
12 
13 // Comparison
14 bool GEMCoPadDigi::operator!=(const GEMCoPadDigi& digi) const {
15  return digi.first() != first_ or digi.second() != second_ or digi.roll() != roll_;
16 }
17 
18 bool GEMCoPadDigi::isValid() const { return first_.isValid() and second_.isValid(); }
19 
20 int GEMCoPadDigi::pad(int l) const {
21  if (l == 1)
22  return first_.pad();
23  else if (l == 2)
24  return second_.pad();
25  else
26  return -99; // invalid
27 }
28 
29 int GEMCoPadDigi::bx(int l) const {
30  if (l == 1)
31  return first_.bx();
32  else if (l == 2)
33  return second_.bx();
34  else
35  return -99; // invalid
36 }
37 
38 void GEMCoPadDigi::print() const {
39  std::cout << "Roll " << roll_ << ", pad1 " << first_.pad() << " bx1 " << first_.bx() << ", Pad2 " << second_.pad()
40  << " bx2 " << second_.bx() << std::endl;
41 }
42 
43 std::ostream& operator<<(std::ostream& o, const GEMCoPadDigi& digi) {
44  return o << "Roll: " << digi.roll() << " layer1:" << digi.first() << ", layer2:" << digi.second();
45 }
int roll() const
Definition: GEMCoPadDigi.h:25
int16_t bx() const
Definition: GEMPadDigi.h:39
GEMPadDigi second_
Definition: GEMCoPadDigi.h:37
bool isValid() const
Definition: GEMCoPadDigi.cc:18
int bx(int l) const
Definition: GEMCoPadDigi.cc:29
bool isValid() const
Definition: GEMPadDigi.cc:26
void print() const
Definition: GEMCoPadDigi.cc:38
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
uint8_t roll_
Definition: GEMCoPadDigi.h:35
double f[11][100]
GEMPadDigi first_
Definition: GEMCoPadDigi.h:36
uint16_t pad() const
Definition: GEMPadDigi.h:38
GEMPadDigi first() const
Definition: GEMCoPadDigi.h:29
bool operator!=(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:14
std::ostream & operator<<(std::ostream &o, const GEMCoPadDigi &digi)
Definition: GEMCoPadDigi.cc:43
int pad(int l) const
Definition: GEMCoPadDigi.cc:20
bool operator==(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:9
GEMPadDigi second() const
Definition: GEMCoPadDigi.h:30