CMS 3D CMS Logo

RPCAMCLink.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 #include <sstream>
5 
7  : id_(0x0)
8 {}
9 
10 RPCAMCLink::RPCAMCLink(std::uint32_t const & id)
11  : id_(id)
12 {}
13 
15  , int amcnumber
16  , int amcinput)
17  : id_(0x0)
18 {
19  setFED(fed);
20  setAMCNumber(amcnumber);
21  setAMCInput(amcinput);
22 }
23 
24 std::uint32_t RPCAMCLink::getMask() const
25 {
26  std::uint32_t mask(0x0);
27  if (id_ & mask_fed_)
28  mask |= mask_fed_;
29  if (id_ & mask_amcnumber_)
30  mask |= mask_amcnumber_;
31  if (id_ & mask_amcinput_)
32  mask |= mask_amcinput_;
33  return mask;
34 }
35 
37 {
38  std::ostringstream oss;
39  oss << "RPCAMCLink_";
43  if (id_ & mask_amcinput_) {
44  bf_stream(oss << '_', min_amcinput_, mask_amcinput_, pos_amcinput_);
45  }
46  }
47  return oss.str();
48 }
49 
50 std::ostream & operator<<(std::ostream & ostream, RPCAMCLink const & link)
51 {
52  return (ostream << link.getName());
53 }