CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes
edmNew::dstvdetails::DetSetVectorTrans Struct Reference

#include <DetSetVectorNew.h>

Inheritance diagram for edmNew::dstvdetails::DetSetVectorTrans:
edmNew::DetSetVector< T >

Classes

struct  Item
 

Public Types

typedef unsigned int id_type
 
typedef unsigned int size_type
 

Public Member Functions

 DetSetVectorTrans ()
 
 DetSetVectorTrans (const DetSetVectorTrans &rh)
 
 DetSetVectorTrans (DetSetVectorTrans &&rh)
 
DetSetVectorTransoperator= (const DetSetVectorTrans &)=delete
 
DetSetVectorTransoperator= (DetSetVectorTrans &&rh)
 
bool ready () const
 
void swap (DetSetVectorTrans &rh)
 

Public Attributes

std::atomic< size_typem_dataSize
 
std::atomic< bool > m_filling
 
boost::any m_getter
 

Detailed Description

Definition at line 54 of file DetSetVectorNew.h.

Member Typedef Documentation

Definition at line 56 of file DetSetVectorNew.h.

Definition at line 55 of file DetSetVectorNew.h.

Constructor & Destructor Documentation

edmNew::dstvdetails::DetSetVectorTrans::DetSetVectorTrans ( )
inline

Definition at line 58 of file DetSetVectorNew.h.

58 : m_filling(false), m_dataSize(0){}
std::atomic< size_type > m_dataSize
edmNew::dstvdetails::DetSetVectorTrans::DetSetVectorTrans ( const DetSetVectorTrans rh)
inline

Definition at line 61 of file DetSetVectorNew.h.

References m_dataSize, m_filling, and m_getter.

61  : // can't be default because of atomics
62  m_filling(false) {
63  // better no one is filling...
64  assert(rh.m_filling==false);
65  m_getter = rh.m_getter;
66 #ifdef DSVN_USE_ATOMIC
67  m_dataSize.store(rh.m_dataSize.load());
68 #else
69  m_dataSize = rh.m_dataSize;
70 #endif
71  }
std::atomic< size_type > m_dataSize
edmNew::dstvdetails::DetSetVectorTrans::DetSetVectorTrans ( DetSetVectorTrans &&  rh)
inline

Definition at line 73 of file DetSetVectorNew.h.

References eostools::move().

73  : // can't be default because of atomics
74  m_filling(false) {
75  // better no one is filling...
76  assert(rh.m_filling==false);
77  m_getter = std::move(rh.m_getter);
78 #ifdef DSVN_USE_ATOMIC
79  m_dataSize.store(rh.m_dataSize.exchange(m_dataSize.load()));
80 #else
81  m_dataSize = std::move(rh.m_dataSize);
82 #endif
83  }
std::atomic< size_type > m_dataSize
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

DetSetVectorTrans& edmNew::dstvdetails::DetSetVectorTrans::operator= ( const DetSetVectorTrans )
delete
DetSetVectorTrans& edmNew::dstvdetails::DetSetVectorTrans::operator= ( DetSetVectorTrans &&  rh)
inline

Definition at line 84 of file DetSetVectorNew.h.

References eostools::move().

84  { // can't be default because of atomics
85  // better no one is filling...
86  assert(m_filling==false); assert(rh.m_filling==false);
87  m_getter = std::move(rh.m_getter);
88 #ifdef DSVN_USE_ATOMIC
89  m_dataSize.store(rh.m_dataSize.exchange(m_dataSize.load()));
90 #else
91  m_dataSize = std::move(rh.m_dataSize);
92 #endif
93  return *this;
94  }
std::atomic< size_type > m_dataSize
def move(src, dest)
Definition: eostools.py:511
bool edmNew::dstvdetails::DetSetVectorTrans::ready ( ) const
inline

Definition at line 153 of file DetSetVectorNew.h.

References edmNew::dstvdetails::errorFilling().

153  {
154  bool expected=false;
155  if (!m_filling.compare_exchange_strong(expected,true)) errorFilling();
156  return true;
157  }
void edmNew::dstvdetails::DetSetVectorTrans::swap ( DetSetVectorTrans rh)
inline

Definition at line 103 of file DetSetVectorNew.h.

References m_dataSize, m_filling, m_getter, and std::swap().

103  {
104  // better no one is filling...
105  assert(m_filling==false); assert(rh.m_filling==false);
106  // std::swap(m_filling,rh.m_filling);
107  std::swap(m_getter,rh.m_getter);
108 #ifdef DSVN_USE_ATOMIC
109  m_dataSize.store(rh.m_dataSize.exchange(m_dataSize.load()));
110 #else
111  std::swap(m_dataSize,rh.m_dataSize);
112 #endif
113  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::atomic< size_type > m_dataSize

Member Data Documentation

std::atomic<size_type> edmNew::dstvdetails::DetSetVectorTrans::m_dataSize
mutable

Definition at line 98 of file DetSetVectorNew.h.

Referenced by DetSetVectorTrans(), and swap().

std::atomic<bool> edmNew::dstvdetails::DetSetVectorTrans::m_filling
mutable
boost::any edmNew::dstvdetails::DetSetVectorTrans::m_getter

Definition at line 96 of file DetSetVectorNew.h.

Referenced by DetSetVectorTrans(), and swap().