ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::TransformCache Class Referenceabstract

Implementation used for the Detector elements. More...

#include <TransformCache.h>

Inheritance diagram for ActsTrk::TransformCache:
Collaboration diagram for ActsTrk::TransformCache:

Public Member Functions

virtual Identifier identify () const =0
 Returns the Identifier of the transform cache.
virtual const IDetectorElementparent () const =0
 Returns the parent IDetectorElement owning the cache.
virtual void releaseNominalCache () const final
 Release the nominal cache and release the transform from the.
 TransformCacheBase (const IdentifierHash &cacheHash, const DetectorType type)
 Copy the constructors from the base class.
 TransformCacheBase (const TransformCacheBase &other) noexcept=delete
 Copy the constructors from the base class.
 TransformCacheBase (TransformCacheBase &&other) noexcept=delete
 Copy the constructors from the base class.
IdentifierHash hash () const
 Returns the sensor hash of this transformation cache.
const Amg::Transform3DgetTransform (const DetectorAlignStore *store) const
 Returns the matching transformation from the alignment store.
const Amg::Transform3DgetTransform (const Acts::GeometryContext &gctx) const
 returns the cached transform from the Acts Geometry context
bool storeTransform (DetectorAlignStore &store) const
 Store the final transform in the mutable alignment store.
DetectorType detectorType () const
 returns the detector type of the cache

Protected Member Functions

virtual Amg::Transform3D fetchTransform (const DetectorAlignStore *store) const =0

Private Types

using TicketCounter = detail::TrfStoreTicketCounter

Private Attributes

const IdentifierHash m_hash {0}
const DetectorType m_type {DetectorType::UnDefined}
const unsigned int m_clientNo {TicketCounter::drawTicket(m_type)}
CxxUtils::CachedUniquePtrT< Amg::Transform3D > m_nomCache ATLAS_THREAD_SAFE {}

Detailed Description

Implementation used for the Detector elements.

Definition at line 68 of file TransformCache.h.

Member Typedef Documentation

◆ TicketCounter

Member Function Documentation

◆ detectorType()

DetectorType ActsTrk::TransformCacheBase::detectorType ( ) const
inherited

returns the detector type of the cache

Definition at line 28 of file TransformCache.cxx.

28{ return m_type; }
const DetectorType m_type

◆ fetchTransform()

◆ getTransform() [1/2]

const Amg::Transform3D & ActsTrk::TransformCacheBase::getTransform ( const Acts::GeometryContext & gctx) const
inherited

returns the cached transform from the Acts Geometry context

◆ getTransform() [2/2]

const Amg::Transform3D & ActsTrk::TransformCacheBase::getTransform ( const DetectorAlignStore * store) const
inherited

Returns the matching transformation from the alignment store.

If a nullptr is given, then it's equivalent to the case that the transformation is pointing to a perfectly aligned surface. In this case, the internal nominal transformation cache is invoked.

Parameters
storePointer to the detector aligment store

◆ hash()

IdentifierHash ActsTrk::TransformCacheBase::hash ( ) const
inherited

Returns the sensor hash of this transformation cache.

◆ identify()

◆ parent()

virtual const IDetectorElement * ActsTrk::TransformCache::parent ( ) const
pure virtual

◆ releaseNominalCache()

void ActsTrk::TransformCache::releaseNominalCache ( ) const
finalvirtual

Release the nominal cache and release the transform from the.

Reimplemented from ActsTrk::TransformCacheBase.

Definition at line 30 of file TransformCache.cxx.

30 {
32 const GeoVDetectorElement* vParent = dynamic_cast<const GeoVDetectorElement*>(parent());
33 if (vParent) {
34 vParent->getMaterialGeom()->clearPositionInfo();
35 }
36 }
virtual void releaseNominalCache() const
resets the nominal cache associated with the detector element
virtual const IDetectorElement * parent() const =0
Returns the parent IDetectorElement owning the cache.

◆ storeTransform()

bool ActsTrk::TransformCacheBase::storeTransform ( DetectorAlignStore & store) const
inherited

Store the final transform in the mutable alignment store.

Returns true whether a new transform was stored

Parameters
storeThe reference to the store where the cache stores its transform

Definition at line 20 of file TransformCache.cxx.

20 {
21 if (store.detType != detectorType() ||
22 store.trackingAlignment->getTransform(m_clientNo) != nullptr){
23 return false;
24 }
25 store.trackingAlignment->setTransform(m_clientNo, fetchTransform(&store));
26 return true;
27 }
const unsigned int m_clientNo
DetectorType detectorType() const
returns the detector type of the cache
virtual Amg::Transform3D fetchTransform(const DetectorAlignStore *store) const =0
TestStore store
Definition TestStore.cxx:23

◆ TransformCacheBase() [1/3]

Copy the constructors from the base class.

Definition at line 23 of file TransformCache.cxx.

13 :
IdentifierHash hash() const
Returns the sensor hash of this transformation cache.
const IdentifierHash m_hash

◆ TransformCacheBase() [2/3]

ActsTrk::TransformCacheBase::TransformCacheBase ( const TransformCacheBase & other)
deletenoexcept

Copy the constructors from the base class.

◆ TransformCacheBase() [3/3]

ActsTrk::TransformCacheBase::TransformCacheBase ( TransformCacheBase && other)
deletenoexcept

Copy the constructors from the base class.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

CxxUtils::CachedUniquePtrT<Amg::Transform3D> m_nomCache ActsTrk::TransformCacheBase::ATLAS_THREAD_SAFE {}
mutableprivateinherited

Definition at line 63 of file TransformCache.h.

63{};

◆ m_clientNo

const unsigned int ActsTrk::TransformCacheBase::m_clientNo {TicketCounter::drawTicket(m_type)}
privateinherited

Definition at line 62 of file TransformCache.h.

static unsigned int drawTicket(const DetectorType detType)
Returns a unique ID to the client under which the client can store its transfomrm inside the containe...

◆ m_hash

const IdentifierHash ActsTrk::TransformCacheBase::m_hash {0}
privateinherited

Definition at line 59 of file TransformCache.h.

59{0};

◆ m_type

const DetectorType ActsTrk::TransformCacheBase::m_type {DetectorType::UnDefined}
privateinherited

Definition at line 60 of file TransformCache.h.

@ UnDefined
Small Thing Gap chambers (NSW).

The documentation for this class was generated from the following files: