8#include <unordered_map>
12struct hash<ROOT::Internal::RConcurrentHashColl::HashValue> {
13 std::size_t
operator()(
const ROOT::Internal::RConcurrentHashColl::HashValue &key)
const noexcept
15 return key.ShortHash();
24 auto digest =
h.Get();
25 os << digest[0] <<
"-" << digest[1] <<
"-" << digest[2] <<
"-" << digest[3];
32 Sha256(
reinterpret_cast<const unsigned char *
>(data), len,
fDigest);
36 std::unordered_map<ROOT::Internal::RConcurrentHashColl::HashValue, RUidColl>
fHashMap;
47 auto iter =
fHashMap->fHashMap.find(hash);
48 if (iter !=
fHashMap->fHashMap.end())
49 return &(iter->second);
62 auto ret =
fHashMap->fHashMap.insert({hash, std::move(values)});
TRObject operator()(const T1 &t1) const
bool Insert(const HashValue &hash, RUidColl &&coll) const
If the hash is there, return false.
static HashValue Hash(char *buf, int len)
Return the hash object corresponding to the buffer.
std::unique_ptr< ROOT::TRWSpinLock > fRWLock
std::unique_ptr< RHashMap > fHashMap
const RUidColl * Find(const HashValue &hash) const
Return the collection of UID corresponding to the hash if the hash has already been seen or nullptr o...
std::vector< Int_t > RUidColl
std::ostream & operator<<(std::ostream &os, const RConcurrentHashColl::HashValue &h)
void Sha256(const unsigned char *data, int len, ULong64_t *fDigest)
std::unordered_map< ROOT::Internal::RConcurrentHashColl::HashValue, RUidColl > fHashMap