14 : theGeometries(geos),
67 if (
theGeometries[idx]==
nullptr)
throw cms::Exception(
"NoGeometry") <<
"No Tracking Geometry is available for DetId " <<
id.rawId() << std::endl;
79 if( theGeometrie ==
nullptr )
continue;
81 if(
detTypes.size() + ptr->size() < ptr->capacity()) ptr->resize(
detTypes.size() + ptr->size());
83 ptr->emplace_back( detType );
86 if(
theDetTypes.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
90 return *
theDetTypes.load(std::memory_order_acquire);
100 if( theGeometrie ==
nullptr )
continue;
102 if(
detUnits.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnits.size() + ptr->size());
104 ptr->emplace_back( detUnit );
107 if(
theDetUnits.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
111 return *
theDetUnits.load(std::memory_order_acquire);
117 if (!
theDets.load(std::memory_order_acquire)) {
121 if( theGeometrie ==
nullptr )
continue;
123 if(
dets.size() + ptr->size() < ptr->capacity()) ptr->resize(
dets.size() + ptr->size());
125 ptr->emplace_back( det );
128 if(
theDets.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
132 return *
theDets.load(std::memory_order_acquire);
142 if( theGeometrie ==
nullptr )
continue;
144 if(
detUnitIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnitIds.size() + ptr->size());
146 ptr->emplace_back( detUnitId );
149 if(
theDetUnitIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
159 if (!
theDetIds.load(std::memory_order_acquire)) {
163 if( theGeometrie ==
nullptr )
continue;
165 if(
detIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detIds.size() + ptr->size());
167 ptr->emplace_back( detId );
170 if(
theDetIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
174 return *
theDetIds.load(std::memory_order_acquire);
std::vector< const TrackingGeometry * > theGeometries
std::atomic< DetIdContainer * > theDetUnitIds
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
~GlobalTrackingGeometry() override
virtual const GeomDet * idToDet(DetId) const =0
std::atomic< DetContainer * > theDets
std::atomic< DetIdContainer * > theDetIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
std::atomic< DetTypeContainer * > theDetTypes
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
std::atomic< DetContainer * > theDetUnits
GlobalTrackingGeometry(std::vector< const TrackingGeometry * > &geos)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< DetId > DetIdContainer
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
std::vector< const GeomDet * > DetContainer
const GeomDet * idToDet(DetId) const override
virtual const GeomDet * idToDetUnit(DetId) const =0
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< const GeomDetType * > DetTypeContainer