ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TileBchStatus::LockedPrbSet Struct Reference
Collaboration diagram for TileBchStatus::LockedPrbSet:

Public Member Functions

size_t size () const
 
void set (const PrbSet &s)
 
void set (PrbSet &&s)
 
 operator TileBchStatus () const
 
bool test (const PrbSet &s) const
 

Private Attributes

PrbSet m_set
 
std::mutex m_mutex
 

Detailed Description

Definition at line 71 of file TileBchStatus.h.

Member Function Documentation

◆ operator TileBchStatus()

TileBchStatus::LockedPrbSet::operator TileBchStatus ( ) const
inline

Definition at line 88 of file TileBchStatus.h.

89  {
90  std::lock_guard lock (m_mutex);
91  return TileBchStatus (m_set, true);
92  }

◆ set() [1/2]

void TileBchStatus::LockedPrbSet::set ( const PrbSet s)
inline

Definition at line 78 of file TileBchStatus.h.

79  {
80  std::lock_guard lock (m_mutex);
81  m_set = s;
82  }

◆ set() [2/2]

void TileBchStatus::LockedPrbSet::set ( PrbSet &&  s)
inline

Definition at line 83 of file TileBchStatus.h.

84  {
85  std::lock_guard lock (m_mutex);
86  m_set = std::move(s);
87  }

◆ size()

size_t TileBchStatus::LockedPrbSet::size ( ) const
inline

Definition at line 73 of file TileBchStatus.h.

74  {
75  std::lock_guard lock (m_mutex);
76  return m_set.size();
77  }

◆ test()

bool TileBchStatus::LockedPrbSet::test ( const PrbSet s) const

Definition at line 275 of file TileBchStatus.cxx.

276 {
277  std::lock_guard lock (m_mutex);
278  PrbSet overlapp;
279  std::insert_iterator<PrbSet> insItr(overlapp, overlapp.begin());
280  std::set_intersection(m_set.begin(),m_set.end(), s.begin(), s.end(), insItr);
281  return !overlapp.empty();
282 }

Member Data Documentation

◆ m_mutex

std::mutex TileBchStatus::LockedPrbSet::m_mutex
mutableprivate

Definition at line 97 of file TileBchStatus.h.

◆ m_set

PrbSet TileBchStatus::LockedPrbSet::m_set
private

Definition at line 96 of file TileBchStatus.h.


The documentation for this struct was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TileBchStatus::PrbSet
std::set< Prb > PrbSet
Definition: TileBchStatus.h:23
TileBchStatus::TileBchStatus
TileBchStatus()
Definition: TileBchStatus.cxx:18
TileBchStatus::LockedPrbSet::m_set
PrbSet m_set
Definition: TileBchStatus.h:96
TileBchStatus::LockedPrbSet::m_mutex
std::mutex m_mutex
Definition: TileBchStatus.h:97
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.