ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDetectorManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 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
22// IOV SVC for alignment:
24
27
28#include <atomic>
29#include <string>
30#include <map>
31#include <set>
32#include <list>
33
34class StoreGateSvc;
36class Identifier;
37class AtlasDetectorID;
38class GeoVAlignmentStore;
40
41namespace InDetDD {
42
43 typedef std::map<std::string, const void*> RawAlignmentObjects;
44
60 class InDetDetectorManager : public GeoVDetectorManager, public AthMessaging {
61
62 public:
63
64 // Constructor
65 InDetDetectorManager(StoreGateSvc * detStore, const std::string & name);
66
67 // Destructor
69
70
72 const Version & getVersion() const;
73 const std::string & getLayout() const; // eg Initial, Final, TestBeam
74 void setVersion(const Version & version);
75
77 void addChannel(const std::string & key, int level, FrameType frame);
78 void addFolder(const std::string & key);
79 void addSpecialFolder(const std::string & key);
80 void addGlobalFolder(const std::string & key);
81 void addAlignFolderType(const AlignFolderType alignfolder);
82
84
85 StatusCode align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const;
86
88 virtual void invalidateAll() = 0;
89
91 virtual void updateAll() const = 0;
92
94 virtual bool identifierBelongs(const Identifier & id) const = 0;
95
97
98 protected:
100 mutable std::atomic_bool m_suppressWarnings;
101
102 private:
106 class LevelInfo {
107
108 private:
111
112 public:
115
116 int level() const {return m_level;}
117 FrameType frame() const {return m_type;}
118 bool isGlobalDelta() const {return m_type == InDetDD::global;}
119 bool isLocalDelta() const {return m_type == InDetDD::local;}
120 bool isValid() const {return (m_level >= 0);}
121 };
122
123 class AlignInfo {
124
125 private:
127
128 public:
130 AlignInfo(AlignFolderType alignfolder): m_aligntype(alignfolder) {};
132 bool isValidAlign() const {return (m_aligntype != InDetDD::none);}
133
134 };
135
136
138 const LevelInfo & getLevel(const std::string & key) const;
139
141 // InDetDD::AlignFolderType getAlignInfo();
142
144 bool processAlignmentContainer(const std::string & key) const;
145 bool processAlignmentContainer(const AlignableTransformContainer* container, GeoVAlignmentStore* alignStore) const;
146
149 bool processKey(const std::string& key,
150 const AlignableTransform* transformCollection,
151 GeoVAlignmentStore* alignStore=nullptr) const;
152
155 virtual bool setAlignableTransformDelta(int level,
156 const Identifier & id,
157 const Amg::Transform3D & delta,
158 FrameType frame,
159 GeoVAlignmentStore* alignStore=nullptr) const = 0;
160
161 //Serial (pre-MT) interface
162 virtual bool processSpecialAlignment(const std::string & key,
163 InDetDD::AlignFolderType alignfolder) = 0;
164
165 //MT-Interface
166 virtual bool processSpecialAlignment(const std::string& key,
167 const CondAttrListCollection* obj=nullptr,
168 GeoVAlignmentStore* alignStore=nullptr) const = 0;
169
170 bool processGlobalAlignmentContainer(const std::string & key,
171 const CondAttrListCollection* obj=nullptr,
172 GeoVAlignmentStore* alignStore=nullptr) const;
173
174 virtual bool processGlobalAlignment(const std::string & key, int level, FrameType frame,
175 const CondAttrListCollection* obj=nullptr,
176 GeoVAlignmentStore* alignStore=nullptr) const;
177
178 virtual const AtlasDetectorID* getIdHelper() const = 0;
179
181 std::map<std::string, LevelInfo> m_keys;
182 std::set<std::string> m_folders;
183 std::set<std::string> m_specialFolders;
184 std::set<std::string> m_globalFolders; // new time-dependent global folders
185
187 };
188
189} // namespace InDetDD
190
191#endif // INDETREADOUTGEOMETRY_INDETDETECTORMANAGER_H
CondMultChanCollection< AlignableTransform > AlignableTransformContainer
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition IOVSvcDefs.h:24
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)
StatusCode align(IOVSVC_CALLBACK_ARGS)
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