62 const std::string& payloadToken,
65 std::pair< KeyToToken::iterator, bool >
result =
68 if( !result.second && overwriteKey )
78 return result.second ;
83 const std::string&
key,
84 const std::string& payloadToken,
95 std::pair< KeyToToken::iterator, bool >
result =
96 it->second.insert( std::make_pair( key, payloadToken ) ) ;
98 if( !result.second && overwriteKey )
101 it->second.erase( result.first ) ;
104 result = it->second.insert( std::make_pair( key, payloadToken ) ) ;
107 return result.second ;
121 return std::string() ;
132 const std::string&
key )
const
134 std::string recordType = recordName +
"@" +
dataType ;
135 return token( recordType, key ) ;
140 const std::string&
key )
const
142 RecordToKeyToToken::const_iterator it =
m_recordKeyToken.find( recordType ) ;
146 return std::string() ;
150 KeyToToken::const_iterator it2 = it->second.find( key ) ;
152 if( it2 == it->second.end() )
154 return std::string() ;
198 const std::string& payloadToken )
const
204 std::string recordInMap( iRecordType->first, 0,
205 iRecordType->first.find_first_of(
"@") ) ;
206 if( recordInMap == recordName )
209 KeyToToken::const_iterator iKey = iRecordType->second.begin();
210 KeyToToken::const_iterator eKey = iRecordType->second.end() ;
211 for( ; iKey != eKey ; ++iKey )
213 if( iKey->second == payloadToken )
221 return std::string() ;
230 for( ; iKey != eKey ; ++iKey )
232 if( iKey->second == triggerKeyPayloadToken )
238 return std::string() ;
RecordToKeyToToken m_recordKeyToken
std::map< std::string, std::string > KeyToToken
KeyToToken m_tscKeyToToken
std::string tscKey(const std::string &triggerKeyPayloadToken) const
std::string objectKey(const std::string &recordName, const std::string &payloadToken) const
virtual ~L1TriggerKeyList()
std::string token(const std::string &tscKey) const
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)