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 77 of file TileBchStatus.h.

Member Function Documentation

◆ operator TileBchStatus()

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

Definition at line 94 of file TileBchStatus.h.

95  {
96  std::lock_guard lock (m_mutex);
97  return TileBchStatus (m_set, true);
98  }

◆ set() [1/2]

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

Definition at line 84 of file TileBchStatus.h.

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

◆ set() [2/2]

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

Definition at line 89 of file TileBchStatus.h.

90  {
91  std::lock_guard lock (m_mutex);
92  m_set = std::move(s);
93  }

◆ size()

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

Definition at line 79 of file TileBchStatus.h.

80  {
81  std::lock_guard lock (m_mutex);
82  return m_set.size();
83  }

◆ 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 103 of file TileBchStatus.h.

◆ m_set

PrbSet TileBchStatus::LockedPrbSet::m_set
private

Definition at line 102 of file TileBchStatus.h.


The documentation for this struct was generated from the following files:
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
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:102
TileBchStatus::LockedPrbSet::m_mutex
std::mutex m_mutex
Definition: TileBchStatus.h:103
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.