File indexing completed on 2024-04-06 12:04:09
0001 #include "DataFormats/ForwardDetId/interface/MTDDetId.h"
0002 #include <iomanip>
0003 #include <bitset>
0004
0005 std::ostream& operator<<(std::ostream& os, const MTDDetId& id) {
0006 return os << "[MTDDetId::print] "
0007 << " " << std::bitset<4>((id.rawId() >> 28) & 0xF).to_string() << " "
0008 << std::bitset<4>((id.rawId() >> 24) & 0xF).to_string() << " "
0009 << std::bitset<4>((id.rawId() >> 20) & 0xF).to_string() << " "
0010 << std::bitset<4>((id.rawId() >> 16) & 0xF).to_string() << " "
0011 << std::bitset<4>((id.rawId() >> 12) & 0xF).to_string() << " "
0012 << std::bitset<4>((id.rawId() >> 8) & 0xF).to_string() << " "
0013 << std::bitset<4>((id.rawId() >> 4) & 0xF).to_string() << " "
0014 << std::bitset<4>(id.rawId() & 0xF).to_string() << std::endl
0015 << " rawId : 0x" << std::hex << std::setfill('0') << std::setw(8) << id.rawId() << std::dec << " / "
0016 << id.rawId() << std::endl
0017 << " bits[0:24] : " << std::hex << std::setfill('0') << std::setw(8) << (0x01FFFFFF & id.rawId())
0018 << std::dec << std::endl
0019 << " Detector : " << id.det() << std::endl
0020 << " SubDetector : " << id.subdetId() << std::endl
0021 << " MTD subdetector : " << id.mtdSubDetector() << std::endl;
0022 }