CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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()),
14  second_(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 
32 int GEMCoPadDigi::pad(int l) const
33 {
34  if (l==1) return first_.pad();
35  else if (l==2) return second_.pad();
36  else return -99; // invalid
37 }
38 
39 
40 int GEMCoPadDigi::bx(int l) const
41 {
42  if (l==1) return first_.bx();
43  else if (l==2) return second_.bx();
44  else return -99; // invalid
45 }
46 
47 
48 void GEMCoPadDigi::print() const
49 {
50  std::cout << "Roll " << roll_ << ", pad1 " << first_.pad() << " bx1 " << first_.bx()
51  << ", Pad2 " << second_.pad() << " bx2 " << second_.bx() << std::endl;
52 }
53 
54 
55 std::ostream & operator<<(std::ostream & o, const GEMCoPadDigi& digi)
56 {
57  return o << "Roll: " << digi.roll() << " 1:" << digi.first() << ", 2:" << digi.second();
58 }
GEMPadDigi second_
Definition: GEMCoPadDigi.h:37
bool operator!=(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:26
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
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
bool operator==(const GEMCoPadDigi &digi) const
Definition: GEMCoPadDigi.cc:19
int pad(int l) const
Definition: GEMCoPadDigi.cc:32
void print() const
Definition: GEMCoPadDigi.cc:48
int bx(int l) const
Definition: GEMCoPadDigi.cc:40
int pad() const
Definition: GEMPadDigi.h:26
uint8_t roll_
Definition: GEMCoPadDigi.h:35
GEMPadDigi first() const
Definition: GEMCoPadDigi.h:29
double f[11][100]
int roll() const
Definition: GEMCoPadDigi.h:25
GEMPadDigi first_
Definition: GEMCoPadDigi.h:36
int bx() const
Definition: GEMPadDigi.h:27
GEMPadDigi second() const
Definition: GEMCoPadDigi.h:30
tuple cout
Definition: gather_cfg.py:145