![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Class caching all known alignment operations for one Detector instance. More...
#include <GlobalAlignmentCache.h>
Public Types | |
| typedef GlobalAlignmentStack | Stack |
| typedef Stack::StackEntry | Entry |
| typedef std::map< unsigned int, TGeoPhysicalNode * > | Cache |
| typedef std::map< std::string, GlobalAlignmentCache * > | SubdetectorAlignments |
Public Member Functions | |
| int | addRef () |
| Add reference count. More... | |
| int | release () |
| Release object. If reference count goes to NULL, automatic deletion is triggered. More... | |
| const std::string & | name () const |
| Access the section name. More... | |
| void | commit (GlobalAlignmentStack &stack) |
| Close existing transaction stack and apply all alignments. More... | |
| GlobalAlignmentCache * | section (const std::string &path_name) const |
| Retrieve the cache section corresponding to the path of an entry. More... | |
| GlobalAlignment | get (const std::string &path) const |
| Retrieve an alignment entry by its placement path. More... | |
| std::vector< GlobalAlignment > | matches (const std::string &path_match, bool exclude_exact=false) const |
| Return all entries matching a given path. Careful: Expensive operaton! More... | |
Static Public Member Functions | |
| static GlobalAlignmentCache * | install (Detector &description) |
| Create and install a new instance tree. More... | |
| static void | uninstall (Detector &description) |
| Unregister and delete a tree instance. More... | |
Protected Member Functions | |
| GlobalAlignmentCache (Detector &description, const std::string &sdPath, bool top) | |
| Default constructor initializing variables. More... | |
| virtual | ~GlobalAlignmentCache () |
| Default destructor. More... | |
| GlobalAlignmentCache * | subdetectorAlignments (const std::string &name) |
| Retrieve branch cache by name. If not present it will be created. More... | |
| void | apply (GlobalAlignmentStack &stack) |
| Population entry: Apply a complete stack of ordered alignments to the geometry structure. More... | |
| void | apply (const std::vector< Entry * > &changes) |
| Apply a vector of SD entries of ordered alignments to the geometry structure. More... | |
| bool | insert (GlobalAlignment alignment) |
| Add a new entry to the cache. The key is the placement path. More... | |
Protected Attributes | |
| Detector & | m_detDesc |
| SubdetectorAlignments | m_detectors |
| Cache of subdetectors. More... | |
| Cache | m_cache |
| The subdetector specific map of alignments caches. More... | |
| std::string | m_sdPath |
| size_t | m_sdPathLen |
| The length of the branch name to optimize lookups.... More... | |
| int | m_refCount |
| Reference count. More... | |
| bool | m_top |
| Flag to indicate the top instance. More... | |
Friends | |
| class | dd4hep::Detector |
| class | GlobalAlignmentOperator |
| class | dd4hep::detail::DeleteExtension< GlobalAlignmentCache, GlobalAlignmentCache > |
Class caching all known alignment operations for one Detector instance.
Internaly the instances are fragmented to subdetectors defined by the next-to-top level detector elements.
Definition at line 41 of file GlobalAlignmentCache.h.
| typedef std::map<unsigned int, TGeoPhysicalNode*> dd4hep::align::GlobalAlignmentCache::Cache |
Definition at line 49 of file GlobalAlignmentCache.h.
Definition at line 48 of file GlobalAlignmentCache.h.
Definition at line 47 of file GlobalAlignmentCache.h.
| typedef std::map<std::string,GlobalAlignmentCache*> dd4hep::align::GlobalAlignmentCache::SubdetectorAlignments |
Definition at line 50 of file GlobalAlignmentCache.h.
|
protected |
Default constructor initializing variables.
Default constructor.
Definition at line 41 of file GlobalAlignmentCache.cpp.
|
protectedvirtual |
Default destructor.
Definition at line 47 of file GlobalAlignmentCache.cpp.
| int GlobalAlignmentCache::addRef | ( | ) |
Add reference count.
Definition at line 58 of file GlobalAlignmentCache.cpp.
|
protected |
Apply a vector of SD entries of ordered alignments to the geometry structure.
Definition at line 239 of file GlobalAlignmentCache.cpp.
|
protected |
Population entry: Apply a complete stack of ordered alignments to the geometry structure.
Apply a complete stack of ordered alignments to the geometry structure.
Definition at line 186 of file GlobalAlignmentCache.cpp.
| void GlobalAlignmentCache::commit | ( | GlobalAlignmentStack & | stack | ) |
Close existing transaction stack and apply all alignments.
Definition at line 167 of file GlobalAlignmentCache.cpp.
| GlobalAlignment GlobalAlignmentCache::get | ( | const std::string & | path | ) | const |
Retrieve an alignment entry by its placement path.
Definition at line 122 of file GlobalAlignmentCache.cpp.
|
protected |
Add a new entry to the cache. The key is the placement path.
Definition at line 90 of file GlobalAlignmentCache.cpp.
|
static |
Create and install a new instance tree.
Definition at line 72 of file GlobalAlignmentCache.cpp.
| std::vector< GlobalAlignment > GlobalAlignmentCache::matches | ( | const std::string & | path_match, |
| bool | exclude_exact = false |
||
| ) | const |
Return all entries matching a given path. Careful: Expensive operaton!
Return all entries matching a given path.
Definition at line 148 of file GlobalAlignmentCache.cpp.
|
inline |
Access the section name.
Definition at line 94 of file GlobalAlignmentCache.h.
| int GlobalAlignmentCache::release | ( | ) |
Release object. If reference count goes to NULL, automatic deletion is triggered.
Definition at line 63 of file GlobalAlignmentCache.cpp.
| GlobalAlignmentCache * GlobalAlignmentCache::section | ( | const std::string & | path_name | ) | const |
Retrieve the cache section corresponding to the path of an entry.
Definition at line 104 of file GlobalAlignmentCache.cpp.
|
protected |
Retrieve branch cache by name. If not present it will be created.
Definition at line 175 of file GlobalAlignmentCache.cpp.
|
static |
Unregister and delete a tree instance.
Definition at line 83 of file GlobalAlignmentCache.cpp.
|
friend |
Definition at line 43 of file GlobalAlignmentCache.h.
|
friend |
Definition at line 42 of file GlobalAlignmentCache.h.
|
friend |
Definition at line 43 of file GlobalAlignmentCache.h.
|
protected |
The subdetector specific map of alignments caches.
Definition at line 57 of file GlobalAlignmentCache.h.
|
protected |
Definition at line 53 of file GlobalAlignmentCache.h.
|
protected |
Cache of subdetectors.
Definition at line 55 of file GlobalAlignmentCache.h.
|
protected |
Reference count.
Definition at line 64 of file GlobalAlignmentCache.h.
|
protected |
Branchg name: If it is not the main tree instance, the name of the subdetector
Definition at line 60 of file GlobalAlignmentCache.h.
|
protected |
The length of the branch name to optimize lookups....
Definition at line 62 of file GlobalAlignmentCache.h.
|
protected |
Flag to indicate the top instance.
Definition at line 66 of file GlobalAlignmentCache.h.
1.8.18