 |
DD4hep
1.38.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
22 #include <unordered_set>
41 SurfaceMapsMap::const_iterator it =
_map.find( name ) ;
43 if( it !=
_map.end() ){
56 std::map<std::string, std::unordered_set<const ISurface*>> entered;
57 auto enter = [&](
const std::string&
key,
ISurface* surf ) {
58 if( entered[
key ].insert( surf ).second )
59 _map[
key ].emplace( surf->id(), surf );
65 const std::vector<DetElement>& dets = description.
detectors( type ) ;
67 for(
const auto&
det : dets) {
69 const std::string& name =
det.name() ;
78 for(
auto* surf : detSL ) {
87 enter(
"world", surf );
99 std::stringstream sstr ;
101 sstr <<
"-------- SurfaceManager contains the following maps : --------- " << std::endl ;
103 for( SurfaceMapsMap::const_iterator mi =
_map.begin() ; mi !=
_map.end() ; ++mi ) {
105 sstr <<
" key: " << mi->first <<
" \t number of surfaces : " << mi->second.size() << std::endl ;
107 sstr <<
"---------------------------------------------------------------- " << std::endl ;
const SurfaceMap * map(const std::string &name) const
virtual const HandleMap & detectors() const =0
Accessor to the map of sub-detectors.
void initialize(const Detector &theDetector) const
initialize all known surface maps
std::string toString() const
create a string with all available maps and their size (number of surfaces)
std::multimap< unsigned long, ISurface * > SurfaceMap
typedef for surface maps, keyed by the cellID
Plugin that creates a SurfaceManager object and attaches it to description as a user extension object...
const Detector & _theDetector
std::once_flag _initializedFlag
const SurfaceList & surfaceList()
static VolumeManager getVolumeManager(const Detector &description)
static accessor calling DD4hepVolumeManagerPlugin if necessary
virtual std::vector< std::string > detectorTypes() const =0
Access the available detector types.
SurfaceManager()=delete
No default constructor.
IFACE * extension(bool alert=true) const
Access extension element by the type.
Namespace for the AIDA detector description toolkit.
The main interface to the dd4hep detector description package.