ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
ActsTrk::TransformCache Class Referenceabstract

#include <TransformCache.h>

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

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

Definition at line 59 of file TransformCache.h.

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

◆ TransformCache() [2/2]

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

◆ ~TransformCache()

ActsTrk::TransformCache::~TransformCache ( )
virtual

Definition at line 9 of file TransformCache.cxx.

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()

virtual Amg::Transform3D ActsTrk::TransformCache::fetchTransform ( const DetectorAlignStore store) const
protectedpure virtual

◆ 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()

virtual Identifier ActsTrk::TransformCache::identify ( ) const
pure virtual

Returns the Identifier of the transform cache.

◆ operator=()

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

◆ parent()

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

Returns the parent IDetectorElement owning the cache.

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

◆ 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.

◆ 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.

◆ m_clientNo

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

Definition at line 60 of file TransformCache.h.

◆ m_hash

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

Definition at line 57 of file TransformCache.h.

◆ m_type

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

Definition at line 58 of file TransformCache.h.


The documentation for this class was generated from the following files:
ActsTrk::TransformCache::parent
virtual const IDetectorElement * parent() const =0
Returns the parent IDetectorElement owning the cache.
ActsTrk::TransformCache::m_clientNo
const unsigned int m_clientNo
Definition: TransformCache.h:60
ActsTrk::TransformCache::m_type
const DetectorType m_type
Definition: TransformCache.h:58
ActsTrk::DetectorAlignStore::TrackingAlignStore::giveBackTicket
static void giveBackTicket(const DetectorType detType, unsigned int ticketNo)
Definition: DetectorAlignStore.cxx:60
ActsTrk::TransformCache::hash
IdentifierHash hash() const
Returns the sensor hash of this transformation cache.
ActsTrk::TransformCache::m_hash
const IdentifierHash m_hash
Definition: TransformCache.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78