12 : theGeometries(geos),
61 if (
theGeometries[idx]==0)
throw cms::Exception(
"NoGeometry") <<
"No Tracking Geometry is available for DetId " <<
id.rawId() << std::endl;
73 if( *
geom == 0 )
continue;
75 if(
detTypes.size() + ptr->size() < ptr->capacity()) ptr->resize(
detTypes.size() + ptr->size());
76 for(
auto detType =
detTypes.cbegin(), detTypeEnd =
detTypes.cend(); detType != detTypeEnd; ++detType )
77 ptr->push_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( *
geom == 0 )
continue;
96 if(
detUnits.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnits.size() + ptr->size());
97 for(
auto detUnit =
detUnits.cbegin(), detUnitEnd =
detUnits.cend(); detUnit != detUnitEnd; ++detUnit )
98 ptr->push_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( *
geom == 0 )
continue;
117 if(
dets.size() + ptr->size() < ptr->capacity()) ptr->resize(
dets.size() + ptr->size());
118 for(
auto det =
dets.cbegin(), detEnd =
dets.cend(); det != detEnd; ++det )
119 ptr->push_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( *
geom == 0 )
continue;
138 if(
detUnitIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detUnitIds.size() + ptr->size());
139 for(
auto detUnitId =
detUnitIds.cbegin(), detUnitIdEnd =
detUnitIds.cend(); detUnitId != detUnitIdEnd; ++detUnitId )
140 ptr->push_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( *
geom == 0 )
continue;
159 if(
detIds.size() + ptr->size() < ptr->capacity()) ptr->resize(
detIds.size() + ptr->size());
160 for(
auto detId =
detIds.cbegin(), detIdEnd =
detIds.cend(); detId != detIdEnd; ++detId )
161 ptr->push_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
virtual const GeomDet * idToDet(DetId) const =0
std::atomic< DetContainer * > theDets
virtual const GeomDetUnit * idToDetUnit(DetId) const =0
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual const GeomDet * idToDet(DetId) const
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::atomic< DetUnitContainer * > theDetUnits
std::atomic< DetIdContainer * > theDetIds
std::atomic< DetTypeContainer * > theDetTypes
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
virtual ~GlobalTrackingGeometry()
Destructor.
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
GlobalTrackingGeometry(std::vector< const TrackingGeometry * > &geos)
Constructor.
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
std::vector< DetId > DetIdContainer