CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
bool isValid() const
Definition: GEMPadDigi.cc:26
GEMPadDigi second_
Definition: GEMCoPadDigi.h:37
bool operator!=(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:14
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
uint16_t pad() const
Definition: GEMPadDigi.h:38
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
bool operator==(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:9
int pad(int l) const
Definition: GEMCoPadDigi.cc:20
bool isValid() const
Definition: GEMCoPadDigi.cc:18
void print() const
Definition: GEMCoPadDigi.cc:38
int bx(int l) const
Definition: GEMCoPadDigi.cc:29
uint8_t roll_
Definition: GEMCoPadDigi.h:35
GEMPadDigi first() const
Definition: GEMCoPadDigi.h:29
int roll() const
Definition: GEMCoPadDigi.h:25
GEMPadDigi first_
Definition: GEMCoPadDigi.h:36
GEMPadDigi second() const
Definition: GEMCoPadDigi.h:30
int16_t bx() const
Definition: GEMPadDigi.h:39
tuple cout
Definition: gather_cfg.py:144