File indexing completed on 2024-04-06 12:02:31
0001 #include "CondFormats/RPCObjects/interface/RPCFebConnector.h"
0002
0003 #include <ostream>
0004 #include <sstream>
0005
0006 RPCFebConnector::RPCFebConnector(RPCDetId const& rpc_det_id, unsigned int first_strip, int slope, std::uint16_t channels)
0007 : first_strip_(1), slope_(slope < 0 ? -1 : 1), channels_(channels), rpc_det_id_(rpc_det_id.rawId()) {
0008 setFirstStrip(first_strip);
0009 }
0010
0011 std::string RPCFebConnector::getString() const {
0012 std::ostringstream oss;
0013 oss << rpc_det_id_ << '_' << (int)first_strip_ << (slope_ < 0 ? '-' : '+') << '_' << std::hex << std::showbase
0014 << channels_;
0015 return oss.str();
0016 }
0017
0018 std::ostream& operator<<(std::ostream& ostream, RPCFebConnector const& connector) {
0019 return (ostream << connector.getString());
0020 }