CMS 3D CMS Logo

GEMCoPadDigi.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5  roll_(roll),
6  first_(f),
7  second_(s)
8 {}
9 
10 
12  roll_(0),
13  first_(GEMPadDigi()),
15 {}
16 
17 
18 // Comparison
20 {
21  return digi.first() == first_ and digi.second() == second_ and digi.roll() == roll_;
22 }
23 
24 
25 // Comparison
27 {
28  return digi.first() != first_ or digi.second() != second_ or digi.roll() != roll_;
29 }
30 
31 
33 {
34  return first_.isValid() and second_.isValid();
35 }
36 
37 
38 int GEMCoPadDigi::pad(int l) const
39 {
40  if (l==1) return first_.pad();
41  else if (l==2) return second_.pad();
42  else return -99; // invalid
43 }
44 
45 
46 int GEMCoPadDigi::bx(int l) const
47 {
48  if (l==1) return first_.bx();
49  else if (l==2) return second_.bx();
50  else return -99; // invalid
51 }
52 
53 
54 void GEMCoPadDigi::print() const
55 {
56  std::cout << "Roll " << roll_ << ", pad1 " << first_.pad() << " bx1 " << first_.bx()
57  << ", Pad2 " << second_.pad() << " bx2 " << second_.bx() << std::endl;
58 }
59 
60 
61 std::ostream & operator<<(std::ostream & o, const GEMCoPadDigi& digi)
62 {
63  return o << "Roll: " << digi.roll() << " layer1:" << digi.first() << ", layer2:" << digi.second();
64 }
bool isValid() const
Definition: GEMPadDigi.cc:48
GEMPadDigi second_
Definition: GEMCoPadDigi.h:38
bool operator!=(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:26
bool operator==(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:19
int pad(int l) const
Definition: GEMCoPadDigi.cc:38
bool isValid() const
Definition: GEMCoPadDigi.cc:32
void print() const
Definition: GEMCoPadDigi.cc:54
int bx(int l) const
Definition: GEMCoPadDigi.cc:46
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
int pad() const
Definition: GEMPadDigi.h:27
uint8_t roll_
Definition: GEMCoPadDigi.h:36
GEMPadDigi first() const
Definition: GEMCoPadDigi.h:30
double f[11][100]
int roll() const
Definition: GEMCoPadDigi.h:26
GEMPadDigi first_
Definition: GEMCoPadDigi.h:37
int bx() const
Definition: GEMPadDigi.h:28
std::ostream & operator<<(std::ostream &o, const GEMCoPadDigi &digi)
Definition: GEMCoPadDigi.cc:61
GEMPadDigi second() const
Definition: GEMCoPadDigi.h:31