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

#include <TransformCache.h>

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

Public Member Functions

 TransformCache (const IdentifierHash &cacheHash, const DetectorType type)
 TransformCache (const TransformCache &other)=delete
TransformCacheoperator= (const TransformCache &other)=delete
virtual ~TransformCache ()
virtual Identifier identify () const =0
 Returns the Identifier of the transform cache.
IdentifierHash hash () const
 Returns the sensor hash of this transformation cache.
virtual const IDetectorElementparent () const =0
 Returns the parent IDetectorElement owning the cache.
const Amg::Transform3DgetTransform (const DetectorAlignStore *store) const
 Returns the matching transformation from the alignment store.
const Amg::Transform3Dtransform (const Acts::GeometryContext &gctx) const
 returns the cached transform from the Acts Geometry context
void releaseNominalCache () const
 resets the nominal cache associated with the detector element
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 = DetectorAlignStore::TrackingAlignStore

Private Attributes

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

Detailed Description

Definition at line 21 of file TransformCache.h.

Member Typedef Documentation

◆ TicketCounter

Constructor & Destructor Documentation

◆ TransformCache() [1/2]

ActsTrk::TransformCache::TransformCache ( const IdentifierHash & cacheHash,
const DetectorType type )

Definition at line 12 of file TransformCache.cxx.

13 :
14 m_hash{hash},
15 m_type{type} {}
IdentifierHash hash() const
Returns the sensor hash of this transformation cache.
const DetectorType m_type
const IdentifierHash m_hash

◆ TransformCache() [2/2]

ActsTrk::TransformCache::TransformCache ( const TransformCache & other)
delete

◆ ~TransformCache()

ActsTrk::TransformCache::~TransformCache ( )
virtual

Definition at line 9 of file TransformCache.cxx.

9 {
11 }
static void giveBackTicket(const DetectorType detType, unsigned int ticketNo)
const unsigned int m_clientNo

Member Function Documentation

◆ detectorType()

DetectorType ActsTrk::TransformCache::detectorType ( ) const

returns the detector type of the cache

Definition at line 23 of file TransformCache.cxx.

23{ return m_type; }

◆ fetchTransform()

◆ getTransform()

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

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.

◆ hash()

IdentifierHash ActsTrk::TransformCache::hash ( ) const

Returns the sensor hash of this transformation cache.

◆ identify()

◆ operator=()

TransformCache & ActsTrk::TransformCache::operator= ( const TransformCache & other)
delete

◆ parent()

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

◆ releaseNominalCache()

void ActsTrk::TransformCache::releaseNominalCache ( ) const

resets the nominal cache associated with the detector element

Definition at line 17 of file TransformCache.cxx.

17 {
18 std::unique_lock guard{m_mutex};
19 m_nomCache.release();
20 const GeoVDetectorElement* vParent = dynamic_cast<const GeoVDetectorElement*>(parent());
21 if (vParent) vParent->getMaterialGeom()->clearPositionInfo();
22 }
virtual const IDetectorElement * parent() const =0
Returns the parent IDetectorElement owning the cache.

◆ transform()

const Amg::Transform3D & ActsTrk::TransformCache::transform ( const Acts::GeometryContext & gctx) const

returns the cached transform from the Acts Geometry context

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::shared_mutex m_mutex ActsTrk::TransformCache::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 61 of file TransformCache.h.

61{};

◆ ATLAS_THREAD_SAFE [2/2]

CxxUtils::CachedUniquePtrT<Amg::Transform3D> m_nomCache ActsTrk::TransformCache::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 62 of file TransformCache.h.

62{};

◆ m_clientNo

const unsigned int ActsTrk::TransformCache::m_clientNo {TicketCounter::drawTicket(m_type)}
private

Definition at line 60 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 transformation inside the cont...

◆ m_hash

const IdentifierHash ActsTrk::TransformCache::m_hash {0}
private

Definition at line 57 of file TransformCache.h.

57{0};

◆ m_type

const DetectorType ActsTrk::TransformCache::m_type {DetectorType::UnDefined}
private

Definition at line 58 of file TransformCache.h.

@ UnDefined
Small Thing Gap chambers (NSW)

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