14 : theGeometries(geos),
18 theDetUnitIds(nullptr),
55 int idx =
id.det() - 1;
64 throw cms::Exception(
"NoGeometry") <<
"No Tracking Geometry is available for DetId " <<
id.rawId() << std::endl;
73 if (theGeometrie ==
nullptr)
76 if (
detTypes.size() + ptr->size() < ptr->capacity())
77 ptr->resize(
detTypes.size() + ptr->size());
79 ptr->emplace_back(detType);
82 if (
theDetTypes.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
86 return *
theDetTypes.load(std::memory_order_acquire);
93 if (theGeometrie ==
nullptr)
96 if (
detUnits.size() + ptr->size() < ptr->capacity())
97 ptr->resize(
detUnits.size() + ptr->size());
99 ptr->emplace_back(detUnit);
102 if (
theDetUnits.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
106 return *
theDetUnits.load(std::memory_order_acquire);
110 if (!
theDets.load(std::memory_order_acquire)) {
113 if (theGeometrie ==
nullptr)
116 if (
dets.size() + ptr->size() < ptr->capacity())
117 ptr->resize(
dets.size() + ptr->size());
118 for (
auto det :
dets)
119 ptr->emplace_back(det);
122 if (
theDets.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
126 return *
theDets.load(std::memory_order_acquire);
133 if (theGeometrie ==
nullptr)
136 if (
detUnitIds.size() + ptr->size() < ptr->capacity())
139 ptr->emplace_back(detUnitId);
142 if (
theDetUnitIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
150 if (!
theDetIds.load(std::memory_order_acquire)) {
153 if (theGeometrie ==
nullptr)
156 if (
detIds.size() + ptr->size() < ptr->capacity())
157 ptr->resize(
detIds.size() + ptr->size());
159 ptr->emplace_back(detId);
162 if (
theDetIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
166 return *
theDetIds.load(std::memory_order_acquire);