15 std::string GTranslationTable::formTTKey(
const std::vector<int> &identity)
const {
17 if (identity.empty()) {
18 log->warning(
"Empty identity vector provided to formTTKey");
22 std::ostringstream oss;
23 for (
size_t i = 0; i < identity.size(); ++i) {
25 if (i != identity.size() - 1)
41 std::string ttKey = formTTKey(identity);
42 auto search = tt.find(ttKey);
44 if (search == tt.end()) {
48 log->warning(
"Key <" + ttKey +
"> already present in TT map");
51 log->info(1,
"Added GElectronic with identity <", ttKey,
"> to TT map");
53 log->debug(NORMAL,
"Translation Table:");
54 for (
auto &thisItem: tt) {
55 log->debug(NORMAL, GTAB,
"<", thisItem.first,
"> ⇢ ", thisItem.second);
69 std::string ttKey = formTTKey(identity);
70 auto search = tt.find(ttKey);
72 if (search != tt.end()) {
73 log->debug(NORMAL,
"Found key <", ttKey,
"> in TT map");
74 return search->second;
GElectronic getElectronics(const std::vector< int > &identity) const
Retrieves the GElectronic configuration for the provided identity.
void addGElectronicWithIdentity(const std::vector< int > &identity, const GElectronic >ron)
Adds a GElectronic configuration with the provided identity.
#define EC__TTNOTFOUNDINTT