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

#include <TransformCache.h>

Inheritance diagram for ActsTrk::TransformCacheBase:
Collaboration diagram for ActsTrk::TransformCacheBase:

Public Member Functions

 TransformCacheBase (const IdentifierHash &cacheHash, const DetectorType type)
 TransformCacheBase (const TransformCacheBase &other) noexcept=delete
 Delete the copy constructor.
TransformCacheBaseoperator= (const TransformCacheBase &other) noexcept=delete
 Delete the copy assignment operator.
 TransformCacheBase (TransformCacheBase &&other) noexcept=delete
 Delete the move constructor.
TransformCacheBaseoperator= (TransformCacheBase &other) noexcept=delete
 Delete the move assignment operator.
virtual ~TransformCacheBase ()
 Default destructors.
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.
bool storeTransform (DetectorAlignStore &store) const
 Store the final transform in the mutable alignment store.
const Amg::Transform3DgetTransform (const Acts::GeometryContext &gctx) const
 returns the cached transform from the Acts Geometry context
virtual 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 = 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

Definition at line 21 of file TransformCache.h.

Member Typedef Documentation

◆ TicketCounter

Constructor & Destructor Documentation

◆ TransformCacheBase() [1/3]

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

Definition at line 12 of file TransformCache.cxx.

13 :
const DetectorType m_type
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

Delete the copy constructor.

◆ TransformCacheBase() [3/3]

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

Delete the move constructor.

◆ ~TransformCacheBase()

ActsTrk::TransformCacheBase::~TransformCacheBase ( )
virtual

Default destructors.

Definition at line 9 of file TransformCache.cxx.

9 {
11 }
const unsigned int m_clientNo
static void giveBackTicket(const DetectorType detType, unsigned int ticketNo)
Return back a ticket for the specified detector type such that its slot can be used by another instan...

Member Function Documentation

◆ detectorType()

DetectorType ActsTrk::TransformCacheBase::detectorType ( ) const

returns the detector type of the cache

Definition at line 28 of file TransformCache.cxx.

28{ return m_type; }

◆ fetchTransform()

◆ getTransform() [1/2]

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

returns the cached transform from the Acts Geometry context

◆ getTransform() [2/2]

const Amg::Transform3D & ActsTrk::TransformCacheBase::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.

Parameters
storePointer to the detector aligment store

◆ hash()

IdentifierHash ActsTrk::TransformCacheBase::hash ( ) const

Returns the sensor hash of this transformation cache.

◆ operator=() [1/2]

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

Delete the copy assignment operator.

◆ operator=() [2/2]

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

Delete the move assignment operator.

◆ releaseNominalCache()

void ActsTrk::TransformCacheBase::releaseNominalCache ( ) const
virtual

resets the nominal cache associated with the detector element

Reimplemented in ActsTrk::TransformCache.

Definition at line 16 of file TransformCache.cxx.

16 {
17 m_nomCache.release();
18 }

◆ storeTransform()

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

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 }
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

Member Data Documentation

◆ ATLAS_THREAD_SAFE

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

Definition at line 63 of file TransformCache.h.

63{};

◆ m_clientNo

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

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}
private

Definition at line 59 of file TransformCache.h.

59{0};

◆ m_type

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

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: