ATLAS Offline Software
Loading...
Searching...
No Matches
DetectorAlignStore.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ACTSGEOMETRYINTERFACES_RawGeomAlignStore_H
5#define ACTSGEOMETRYINTERFACES_RawGeomAlignStore_H
6
17
18namespace ActsTrk {
19
21 public:
22
24 DetectorAlignStore(const DetectorAlignStore& other) = default;
27
29 virtual ~DetectorAlignStore() = default;
31 std::shared_ptr<GeoAlignmentStore> geoModelAlignment{std::make_shared<GeoAlignmentStore>()};
34 public:
38 static unsigned int drawTicket(const DetectorType detType);
40 static unsigned int distributedTickets(const DetectorType detType);
42 static void giveBackTicket(const DetectorType detType, unsigned int ticketNo);
44 const Amg::Transform3D* getTransform(unsigned int ticketNo) const {
45 return m_transforms[ticketNo].get();
46 }
47
49 const Amg::Transform3D& setTransform(unsigned int ticketNo, Amg::Transform3D && trf) const {
50 return (*m_transforms.at(ticketNo).set(std::make_unique<Amg::Transform3D>(std::move(trf))));
51 }
52
53 static constexpr unsigned s_techs{static_cast<unsigned>(DetectorType::UnDefined)};
54 using TicketCounterArr = std::array<std::atomic<unsigned>, s_techs>;
55 using ReturnedTicketArr = std::array<std::vector<bool>, s_techs>;
56 using ReturnedHintArr = std::array<int, s_techs>;
57 private:
58 static TicketCounterArr s_clientCounter ATLAS_THREAD_SAFE;
59 static ReturnedTicketArr s_returnedTickets ATLAS_THREAD_SAFE;
60 static ReturnedHintArr s_returnedHints ATLAS_THREAD_SAFE;
61 std::vector<CxxUtils::CachedUniquePtr<Amg::Transform3D>> m_transforms{};
62 };
63
67 TrackingAlignStorePtr trackingAlignment{std::make_unique<TrackingAlignStore>(detType)};
72 };
73
74
75} // namespace ActsTrk
76
79#endif
Cached unique_ptr with atomic update.
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
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...
static void giveBackTicket(const DetectorType detType, unsigned int ticketNo)
const Amg::Transform3D & setTransform(unsigned int ticketNo, Amg::Transform3D &&trf) const
Caches for the given ticket number the transformation in the store and returns the const reference to...
std::array< std::atomic< unsigned >, s_techs > TicketCounterArr
std::array< std::vector< bool >, s_techs > ReturnedTicketArr
static TicketCounterArr s_clientCounter ATLAS_THREAD_SAFE
const Amg::Transform3D * getTransform(unsigned int ticketNo) const
Returns the transformation associated with the ticket number.
static unsigned int distributedTickets(const DetectorType detType)
Returns the number of all distributed tickets.
std::vector< CxxUtils::CachedUniquePtr< Amg::Transform3D > > m_transforms
std::shared_ptr< GeoAlignmentStore > geoModelAlignment
Store containing the aligned GeoModel nodes.
GeoModel::TransientConstSharedPtr< InternalAlignStore > InternalAlignPtr
virtual ~DetectorAlignStore()=default
Default virtual destructor.
TrackingAlignStorePtr trackingAlignment
GeoModel::TransientConstSharedPtr< TrackingAlignStore > TrackingAlignStorePtr
Pointer to the store caching the final tracking transformations.
DetectorType detType
The aligned detector element type.
DetectorAlignStore(const DetectorAlignStore &other)=default
Copy constructor.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ UnDefined
Small Thing Gap chambers (NSW)
Eigen::Affine3d Transform3D
The muon system contains additional parameters such as B-lines, as-built, passivation.