CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
edmNew::DetSetVector< T >::FindForDetSetVector Class Reference

#include <DetSetVectorNew.h>

Public Types

using first_argument_type = const edmNew::DetSetVector< T > &
 
using result_type = const T *
 
using second_argument_type = unsigned int
 

Public Member Functions

result_type operator() (first_argument_type iContainer, second_argument_type iIndex)
 

Detailed Description

template<typename T>
class edmNew::DetSetVector< T >::FindForDetSetVector

Definition at line 413 of file DetSetVectorNew.h.

Member Typedef Documentation

Definition at line 415 of file DetSetVectorNew.h.

template<typename T>
using edmNew::DetSetVector< T >::FindForDetSetVector::result_type = const T*

Definition at line 417 of file DetSetVectorNew.h.

template<typename T>
using edmNew::DetSetVector< T >::FindForDetSetVector::second_argument_type = unsigned int

Definition at line 416 of file DetSetVectorNew.h.

Member Function Documentation

template<typename T>
result_type edmNew::DetSetVector< T >::FindForDetSetVector::operator() ( first_argument_type  iContainer,
second_argument_type  iIndex 
)
inline

Definition at line 419 of file DetSetVectorNew.h.

References edmNew::DetSetVector< T >::m_data, and edmNew::dstvdetails::DetSetVectorTrans::m_filling.

421  {
422  bool expected=false;
423  while (!iContainer.m_filling.compare_exchange_weak(expected,true,std::memory_order_acq_rel)) { expected=false; nanosleep(nullptr,nullptr);}
424  result_type item = &(iContainer.m_data[iIndex]);
425  assert(iContainer.m_filling==true);
426  iContainer.m_filling = false;
427  return item;
428  }
Item const & item(size_t cell) const