12 : theGeometries(geos),
61 if (
theGeometries[idx]==
nullptr)
throw cms::Exception(
"NoGeometry") <<
"No Tracking Geometry is available for DetId " <<
id.rawId() << std::endl;
73 if( theGeometrie ==
nullptr )
continue;
75 if(
detTypes.size() + ptr->size() < ptr->capacity()) ptr->resize(
detTypes.size() + ptr->size());
77 ptr->emplace_back( detType );
80 if(
theDetTypes.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
84 return *
theDetTypes.load(std::memory_order_acquire);
94 if( theGeometrie ==
nullptr )
continue;
96 if(
detUnits.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnits.size() + ptr->size());
98 ptr->emplace_back( detUnit );
101 if(
theDetUnits.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
105 return *
theDetUnits.load(std::memory_order_acquire);
111 if (!
theDets.load(std::memory_order_acquire)) {
115 if( theGeometrie ==
nullptr )
continue;
117 if(
dets.size() + ptr->size() < ptr->capacity()) ptr->resize(
dets.size() + ptr->size());
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);
136 if( theGeometrie ==
nullptr )
continue;
138 if(
detUnitIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnitIds.size() + ptr->size());
140 ptr->emplace_back( detUnitId );
143 if(
theDetUnitIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
153 if (!
theDetIds.load(std::memory_order_acquire)) {
157 if( theGeometrie ==
nullptr )
continue;
159 if(
detIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detIds.size() + ptr->size());
161 ptr->emplace_back( detId );
164 if(
theDetIds.compare_exchange_strong(expect, ptr.get(), std::memory_order_acq_rel)) {
168 return *
theDetIds.load(std::memory_order_acquire);
std::vector< GeomDetType const * > DetTypeContainer
std::vector< const TrackingGeometry * > theGeometries
std::atomic< DetIdContainer * > theDetUnitIds
~GlobalTrackingGeometry() override
Destructor.
virtual const GeomDet * idToDet(DetId) const =0
const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::atomic< DetContainer * > theDets
virtual const GeomDetUnit * idToDetUnit(DetId) const =0
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::atomic< DetUnitContainer * > theDetUnits
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.
const DetUnitContainer & detUnits() const override
Returm a vector of all GeomDetUnit.
GlobalTrackingGeometry(std::vector< const TrackingGeometry * > &geos)
Constructor.
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
const GeomDet * idToDet(DetId) const override
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
std::vector< DetId > DetIdContainer