14 #ifndef DD4HEP_ALIGNMENT_GLOBALALIGNMENTCACHE_H
15 #define DD4HEP_ALIGNMENT_GLOBALALIGNMENTCACHE_H
25 namespace Alignments {
28 class AlignmentOperator;
29 class GlobalAlignmentCache;
48 typedef std::map<unsigned int, TGeoPhysicalNode*>
Cache;
79 void apply(
const std::vector<Entry*> &changes);
101 std::vector<GlobalAlignment>
matches(
const std::string& path_match,
bool exclude_exact=
false)
const;
Cache m_cache
The subdetector specific map of alignments caches.
GlobalAlignmentCache(LCDD &lcdd, const std::string &sdPath, bool top)
Default constructor initializing variables.
std::map< std::string, GlobalAlignmentCache * > SubdetectorAlignments
bool m_top
Flag to indicate the top instance.
bool insert(GlobalAlignment alignment)
Add a new entry to the cache. The key is the placement path.
const std::string & name() const
Access the section name.
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
void commit(AlignmentStack &stack)
Close existing transaction stack and apply all alignments.
int m_refCount
Reference count.
std::vector< GlobalAlignment > matches(const std::string &path_match, bool exclude_exact=false) const
Return all entries matching a given path. Careful: Expensive operaton!
static void uninstall(LCDD &lcdd)
Unregister and delete a tree instance.
size_t m_sdPathLen
The length of the branch name to optimize lookups....
int addRef()
Add reference count.
int release()
Release object. If reference count goes to NULL, automatic deletion is triggered. ...
void apply(AlignmentStack &stack)
Population entry: Apply a complete stack of ordered alignments to the geometry structure.
virtual ~GlobalAlignmentCache()
Default destructor.
SubdetectorAlignments m_detectors
Cache of subdetectors.
Class caching all known alignment operations for one LCDD instance.
static GlobalAlignmentCache * install(LCDD &lcdd)
Create and install a new instance tree.
GlobalAlignmentCache * subdetectorAlignments(const std::string &name)
Retrieve branch cache by name. If not present it will be created.
GlobalAlignmentCache * section(const std::string &path_name) const
Retrieve the cache section corresponding to the path of an entry.
std::map< unsigned int, TGeoPhysicalNode * > Cache
Base class for alignment functors.
Alignment Stack object definition.
AlignmentStack::StackEntry Entry