CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPCAMCLink.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 #include <sstream>
5 
6 RPCAMCLink::RPCAMCLink() : id_(0x0) {}
7 
8 RPCAMCLink::RPCAMCLink(std::uint32_t const& id) : id_(id) {}
9 
10 RPCAMCLink::RPCAMCLink(int fed, int amcnumber, int amcinput) : id_(0x0) {
11  setFED(fed);
12  setAMCNumber(amcnumber);
13  setAMCInput(amcinput);
14 }
15 
16 std::uint32_t RPCAMCLink::getMask() const {
17  std::uint32_t mask(0x0);
18  if (id_ & mask_fed_)
19  mask |= mask_fed_;
20  if (id_ & mask_amcnumber_)
21  mask |= mask_amcnumber_;
22  if (id_ & mask_amcinput_)
23  mask |= mask_amcinput_;
24  return mask;
25 }
26 
28  std::ostringstream oss;
29  oss << "RPCAMCLink_";
33  if (id_ & mask_amcinput_) {
34  bf_stream(oss << '_', min_amcinput_, mask_amcinput_, pos_amcinput_);
35  }
36  }
37  return oss.str();
38 }
39 
40 std::ostream& operator<<(std::ostream& ostream, RPCAMCLink const& link) { return (ostream << link.getName()); }
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167