CMS 3D CMS Logo

RPCFebConnector.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 #include <sstream>
5 
6 RPCFebConnector::RPCFebConnector(RPCDetId const& rpc_det_id, unsigned int first_strip, int slope, std::uint16_t channels)
7  : first_strip_(1), slope_(slope < 0 ? -1 : 1), channels_(channels), rpc_det_id_(rpc_det_id.rawId()) {
8  setFirstStrip(first_strip);
9 }
10 
12  std::ostringstream oss;
13  oss << rpc_det_id_ << '_' << (int)first_strip_ << (slope_ < 0 ? '-' : '+') << '_' << std::hex << std::showbase
14  << channels_;
15  return oss.str();
16 }
17 
18 std::ostream& operator<<(std::ostream& ostream, RPCFebConnector const& connector) {
19  return (ostream << connector.getString());
20 }
RPCFebConnector & setFirstStrip(unsigned int strip)
static const double slope[3]
std::string getString() const
::int8_t slope_
-1 or 1
std::ostream & operator<<(std::ostream &ostream, RPCFebConnector const &connector)
RPCFebConnector(RPCDetId const &rpc_det_id=RPCDetId(0, 0, 1, 1, 1, 1, 0), unsigned int first_strip=1, int slope=1, std::uint16_t channels=0x0)
std::uint16_t channels_
active channels in range [1-16]
std::uint32_t rpc_det_id_
std::uint8_t first_strip_
strip, allowing range [1-128]