Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RConcurrentHashColl Class Reference

This class is a thread-safe associative collection connecting a 256 bits digest/hash to a collection of uid (integer) This is used in the handling of the StreamerInfo record in TFile.

Definition at line 30 of file RConcurrentHashColl.hxx.

Classes

class  HashValue
 

Public Member Functions

 RConcurrentHashColl ()
 
 ~RConcurrentHashColl ()
 
const RUidCollFind (const HashValue &hash) const
 Return the collection of UID corresponding to the hash if the hash has already been seen or nullptr otherwise.
 
bool Insert (const HashValue &hash, RUidColl &&coll) const
 If the hash is there, return false.
 

Static Public Member Functions

static HashValue Hash (char *buf, int len)
 Return the hash object corresponding to the buffer.
 

Private Attributes

std::unique_ptr< RHashMapfHashMap
 
std::unique_ptr< ROOT::TRWSpinLockfRWLock
 

#include <ROOT/RConcurrentHashColl.hxx>

Constructor & Destructor Documentation

◆ RConcurrentHashColl()

ROOT::Internal::RConcurrentHashColl::RConcurrentHashColl ( )

Definition at line 41 of file RConcurrentHashColl.cxx.

◆ ~RConcurrentHashColl()

ROOT::Internal::RConcurrentHashColl::~RConcurrentHashColl ( )
default

Member Function Documentation

◆ Find()

const RUidColl * ROOT::Internal::RConcurrentHashColl::Find ( const HashValue hash) const

Return the collection of UID corresponding to the hash if the hash has already been seen or nullptr otherwise.

Definition at line 46 of file RConcurrentHashColl.cxx.

◆ Hash()

RConcurrentHashColl::HashValue ROOT::Internal::RConcurrentHashColl::Hash ( char *  buf,
int  len 
)
static

Return the hash object corresponding to the buffer.

Definition at line 56 of file RConcurrentHashColl.cxx.

◆ Insert()

bool ROOT::Internal::RConcurrentHashColl::Insert ( const HashValue hash,
RUidColl &&  coll 
) const

If the hash is there, return false.

Otherwise, insert the hash and UID collection and return true.

Definition at line 61 of file RConcurrentHashColl.cxx.

Member Data Documentation

◆ fHashMap

std::unique_ptr<RHashMap> ROOT::Internal::RConcurrentHashColl::fHashMap
mutableprivate

Definition at line 32 of file RConcurrentHashColl.hxx.

◆ fRWLock

std::unique_ptr<ROOT::TRWSpinLock> ROOT::Internal::RConcurrentHashColl::fRWLock
mutableprivate

Definition at line 33 of file RConcurrentHashColl.hxx.

Libraries for ROOT::Internal::RConcurrentHashColl:

The documentation for this class was generated from the following files: