66 const std::string testAreaPath =
".";
67 std::string filename{testAreaPath+
"/cabling.txt"};
68 ATH_MSG_INFO(
"Filename: " << filename <<
" will be written to your $TestArea.");
69 std::ofstream opFile1{filename.c_str(), std::ios::out};
71 ATH_MSG_INFO(
"hash, offline Id, online Id(hex), serial number");
72 const unsigned int nHashesInCabling{2*
m_cablingTool->size(ctx)};
73 for (
unsigned int i{0}; i!=nHashesInCabling; ++i) {
78 ATH_MSG_INFO(i <<
" " << offlineId <<
" " << std::hex << onlineId << std::dec <<
" " << sn <<
" " <<
coordString(offlineId));
79 opFile1 << i <<
" " << offlineId <<
" " << std::hex << onlineId << std::dec <<
" " << sn <<
" " <<
coordString(offlineId) << std::endl;
80 if (
m_cablingTool->getHashFromOnlineId(onlineId, ctx) != hash){
86 std::vector<unsigned int> rods;
89 ATH_MSG_INFO(
"First rod id " << std::hex << rods[0] << std::dec);
90 std::string sn{
"20220130000299"};
94 unsigned long long snll{20220130000299LL};
100 std::vector<IdentifierHash> hashVec;
102 ATH_MSG_INFO(
"number of hashes for rod 0x220005: " << hashVec.size());
107 std::map<unsigned int, unsigned int> rodHashMap;
108 for (
unsigned int i{0}; i!=rods.size(); ++i) {
109 rodHashMap[rods[i]]=i;
112 const std::string fullFileName{testAreaPath +
"/SCT_Cabling_svc" + (
m_POSIXtime ? (
"_" +std::to_string(
m_POSIXtime)) :
"") +
".dat"};
114 std::ofstream opFile{fullFileName.c_str(), std::ios::out};
123 for (
unsigned int i{0}; i!=nHashesInCabling; ++i) {
129 const int bec{
m_idHelper->barrel_ec(offlineId)};
130 const int layer{
m_idHelper->layer_disk(offlineId)};
134 const unsigned int rodIndex{rodHashMap[onlineId.
rod()]};
140 return StatusCode::SUCCESS;
std::string formatModuleOutput(const unsigned int rod, const unsigned int fibre, const int bec, const int layerDisk, const int eta, const int phi, const int side, const int robId, const std::string &fullsn)