CMS 3D CMS Logo

RPCFebConnector.cc
Go to the documentation of this file.
2 
3 #include <ostream>
4 #include <sstream>
5 
7  , unsigned int first_strip
8  , int slope
9  , std::uint16_t channels)
10  : first_strip_(1)
11  , slope_(slope < 0 ? -1 : 1)
12  , channels_(channels)
13  , rpc_det_id_(rpc_det_id.rawId())
14 {
15  setFirstStrip(first_strip);
16 }
17 
19 {
20  std::ostringstream oss;
21  oss << rpc_det_id_ << '_'
22  << (int)first_strip_ << (slope_ < 0 ? '-' : '+') << '_'
23  << std::hex << std::showbase << channels_;
24  return oss.str();
25 }
26 
27 std::ostream & operator<<(std::ostream & ostream, RPCFebConnector const & connector)
28 {
29  return (ostream << connector.getString());
30 }
RPCFebConnector & setFirstStrip(unsigned int strip)
static const double slope[3]
::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::string getString() const
std::uint8_t first_strip_
strip, allowing range [1-128]