ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDetectorManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// InDetDectorManager.h
8// (c) ATLAS Detector software
10
11#ifndef INDETREADOUTGEOMETRY_INDETDETECTORMANAGER_H
12#define INDETREADOUTGEOMETRY_INDETDETECTORMANAGER_H
13
14// Amg
16// GeoModel stuff
17#include "GeoModelKernel/GeoVDetectorManager.h"
20#include "CLHEP/Geometry/Transform3D.h"
21
24
25#include <atomic>
26#include <string>
27#include <map>
28#include <set>
29#include <list>
30
31class StoreGateSvc;
33class Identifier;
34class AtlasDetectorID;
35class GeoVAlignmentStore;
37
38namespace InDetDD {
39
40 typedef std::map<std::string, const void*> RawAlignmentObjects;
41
57 class InDetDetectorManager : public GeoVDetectorManager, public AthMessaging {
58
59 public:
60
61 // Constructor
62 InDetDetectorManager(StoreGateSvc * detStore, const std::string & name);
63
64 // Destructor
66
67
69 const Version & getVersion() const;
70 const std::string & getLayout() const; // eg Initial, Final, TestBeam
71 void setVersion(const Version & version);
72
74 void addChannel(const std::string & key, int level, FrameType frame);
75 void addFolder(const std::string & key);
76 void addSpecialFolder(const std::string & key);
77 void addGlobalFolder(const std::string & key);
78 void addAlignFolderType(const AlignFolderType alignfolder);
79
80 StatusCode align();
81
82 StatusCode align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const;
83
85 virtual void invalidateAll() = 0;
86
88 virtual void updateAll() const = 0;
89
91 virtual bool identifierBelongs(const Identifier & id) const = 0;
92
94
95 protected:
97 mutable std::atomic_bool m_suppressWarnings;
98
99 private:
103 class LevelInfo {
104
105 private:
108
109 public:
112
113 int level() const {return m_level;}
114 FrameType frame() const {return m_type;}
115 bool isGlobalDelta() const {return m_type == InDetDD::global;}
116 bool isLocalDelta() const {return m_type == InDetDD::local;}
117 bool isValid() const {return (m_level >= 0);}
118 };
119
120 class AlignInfo {
121
122 private:
124
125 public:
127 AlignInfo(AlignFolderType alignfolder): m_aligntype(alignfolder) {};
129 bool isValidAlign() const {return (m_aligntype != InDetDD::none);}
130
131 };
132
133
135 const LevelInfo & getLevel(const std::string & key) const;
136
138 // InDetDD::AlignFolderType getAlignInfo();
139
141 bool processAlignmentContainer(const std::string & key) const;
142 bool processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const;
143
146 bool processKey(const std::string& key,
147 const AlignableTransform* transformCollection,
148 GeoVAlignmentStore* alignStore=nullptr) const;
149
152 virtual bool setAlignableTransformDelta(int level,
153 const Identifier & id,
154 const Amg::Transform3D & delta,
155 FrameType frame,
156 GeoVAlignmentStore* alignStore=nullptr) const = 0;
157
158 //Serial (pre-MT) interface
159 virtual bool processSpecialAlignment(const std::string & key,
160 InDetDD::AlignFolderType alignfolder) = 0;
161
162 //MT-Interface
163 virtual bool processSpecialAlignment(const std::string& key,
164 const CondAttrListCollection* obj=nullptr,
165 GeoVAlignmentStore* alignStore=nullptr) const = 0;
166
167 bool processGlobalAlignmentContainer(const std::string & key,
168 const CondAttrListCollection* obj=nullptr,
169 GeoVAlignmentStore* alignStore=nullptr) const;
170
171 virtual bool processGlobalAlignment(const std::string & key, int level, FrameType frame,
172 const CondAttrListCollection* obj=nullptr,
173 GeoVAlignmentStore* alignStore=nullptr) const;
174
175 virtual const AtlasDetectorID* getIdHelper() const = 0;
176
178 std::map<std::string, LevelInfo> m_keys;
179 std::set<std::string> m_folders;
180 std::set<std::string> m_specialFolders;
181 std::set<std::string> m_globalFolders; // new time-dependent global folders
182
184 };
185
186} // namespace InDetDD
187
188#endif // INDETREADOUTGEOMETRY_INDETDETECTORMANAGER_H
CondMultChanCollection< AlignableTransform > AlignableTransformContainer
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
This class is a collection of AttributeLists where each one is associated with a channel number.
virtual bool identifierBelongs(const Identifier &id) const =0
Check identifier is for this detector.
virtual void updateAll() const =0
Update all caches.
void addGlobalFolder(const std::string &key)
void addAlignFolderType(const AlignFolderType alignfolder)
bool processKey(const std::string &key, const AlignableTransform *transformCollection, GeoVAlignmentStore *alignStore=nullptr) const
Called by processAlignmentContainer, applies only one key on the transform Collections.
InDetDetectorManager(StoreGateSvc *detStore, const std::string &name)
std::set< std::string > m_specialFolders
const std::string & getLayout() const
virtual bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder)=0
static const LevelInfo s_invalidLevel
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.
void addFolder(const std::string &key)
virtual bool processGlobalAlignment(const std::string &key, int level, FrameType frame, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
const LevelInfo & getLevel(const std::string &key) const
Retrieve level information.
bool processGlobalAlignmentContainer(const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
virtual bool processSpecialAlignment(const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const =0
virtual const AtlasDetectorID * getIdHelper() const =0
void addSpecialFolder(const std::string &key)
std::set< std::string > m_folders
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore=nullptr) const =0
Set method applying the delta transform (in global or local frame) onto the geoModel transform : CLHE...
virtual void invalidateAll()=0
Invalidate cache for all detector elements.
std::set< std::string > m_globalFolders
void setVersion(const Version &version)
const Version & getVersion() const
Get version information.
bool processAlignmentContainer(const std::string &key) const
return align folder string to use
std::map< std::string, LevelInfo > m_keys
Class to hold version information consisting of tag, name layout and description as strings,...
Definition Version.h:24
The Athena Transient Store API.
Eigen::Affine3d Transform3D
Message Stream Member.
std::map< std::string, const void * > RawAlignmentObjects