ATLAS Offline Software
Loading...
Searching...
No Matches
HGTDAlignDBTool Class Reference

#include <HGTDAlignDBTool.h>

Inheritance diagram for HGTDAlignDBTool:
Collaboration diagram for HGTDAlignDBTool:

Public Member Functions

 HGTDAlignDBTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~HGTDAlignDBTool ()=default
StatusCode initialize () override
StatusCode createDB () override
 Create an empty alignment payload.
bool setTrans (const Identifier &, unsigned int level, const Amg::Transform3D &) const override
 Replace the transform of one module.
bool setTrans (const Identifier &, unsigned int level, const Amg::Vector3D &, double alpha, double beta, double gamma) const override
 Replace the transform using translation + rotations.
bool tweakTrans (const Identifier &, unsigned int level, const Amg::Transform3D &) const override
 Apply an incremental transform.
bool tweakTrans (const Identifier &, unsigned int level, const Amg::Vector3D &, double alpha, double beta, double gamma) const override
 Apply an incremental transform using translation + rotations.
virtual Amg::Transform3D getTrans (const Identifier &, unsigned int level) const override
 Retrieve transform.
StatusCode outputObjs () override
 Stream payload to POOL.
StatusCode fillDB (const std::string &tag, unsigned int run1, unsigned int event1, unsigned int run2, unsigned int event2) const override
 Register payload in the Conditions DB.
void printDB () const override
 Print payload.
void sortTrans () const override
 Sort AlignableTransform entries.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::string moduleTag (const Identifier &id) const
 Build the AlignableTransform tag corresponding to one HGTD module.
AlignableTransformgetTransPtr (const Identifier &id) const
 Retrieve writable AlignableTransform.
const AlignableTransformcgetTransPtr (const Identifier &id) const
 Retrieve read-only AlignableTransform.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const HGTD_DetectorManagerm_detManager {}
 HGTD detector manager.
const HGTD_IDm_hgtdId {nullptr}
 HGTD Identifier helper.
ToolHandle< IAthenaOutputStreamToolm_condStream
 Output stream.
Gaudi::Property< std::string > m_dbRoot
 Alignment folder.
Gaudi::Property< std::string > m_detManagerName
 Detector manager name.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 36 of file HGTDAlignDBTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ HGTDAlignDBTool()

HGTDAlignDBTool::HGTDAlignDBTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 34 of file HGTDAlignDBTool.cxx.

38 :
39 AthAlgTool(type,name,parent)
40{
41 declareInterface<IHGTDAlignDBTool>(this);
42}
AthAlgTool()
Default constructor:

◆ ~HGTDAlignDBTool()

virtual HGTDAlignDBTool::~HGTDAlignDBTool ( )
virtualdefault

Member Function Documentation

◆ cgetTransPtr()

const AlignableTransform * HGTDAlignDBTool::cgetTransPtr ( const Identifier & id) const
private

Retrieve read-only AlignableTransform.

Definition at line 179 of file HGTDAlignDBTool.cxx.

180{
181 const AlignableTransformContainer* container = nullptr;
182
183 if (detStore()->retrieve(container, m_dbRoot.value()).isFailure())
184 return nullptr;
185
186 const std::string tag = moduleTag(id);
187
188 for (const auto* transform : *container) {
189 if (transform->tag() == tag) {
190 return transform;
191 }
192 }
193
194 return nullptr;
195}
CondMultChanCollection< AlignableTransform > AlignableTransformContainer
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::string > m_dbRoot
Alignment folder.
std::string moduleTag(const Identifier &id) const
Build the AlignableTransform tag corresponding to one HGTD module.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const SG::AuxVectorData * container() const
Return the container holding this element.

◆ createDB()

StatusCode HGTDAlignDBTool::createDB ( )
overridevirtual

Create an empty alignment payload.

Implements IHGTDAlignDBTool.

Definition at line 84 of file HGTDAlignDBTool.cxx.

85{
86 ATH_MSG_INFO("Creating HGTD alignment payload");
87
89 {
90 ATH_MSG_ERROR("Alignment container already exists.");
91 return StatusCode::FAILURE;
92 }
93
95
96 unsigned int nModules = 0;
97 for(const auto* element : *m_detManager->getDetectorElementCollection())
98 {
99 if(!element)
100 continue;
101
102 Identifier id = element->identify();
103 IdentifierHash hash;
104 IdContext waferContext = m_hgtdId->wafer_context();
105
106 if(m_hgtdId->get_hash(id,
107 hash,
108 &waferContext))
109 {
110 ATH_MSG_WARNING("Cannot obtain wafer hash for " << m_hgtdId->show_to_string(id));
111 continue;
112 }
113
114 auto* transform = new AlignableTransform(moduleTag(id));
115
116 transform->add(
117 id,
118 Amg::EigenTransformToCLHEP(Amg::Transform3D::Identity()));
119
120 container->push_back(transform);
121 container->add(hash);
122 ATH_MSG_DEBUG("hash = " << hash.value()
123 << " tag = " << transform->tag());
124
125 ++nModules;
126 }
127
128 SG::DataProxy* proxy = detStore()->proxy(
130 m_dbRoot.value());
131
132 ATH_MSG_DEBUG("Proxy before record = " << proxy);
133
134 ATH_CHECK(detStore()->record(container, m_dbRoot.value()));
135
136 ATH_MSG_DEBUG("After record:");
137
138 const AlignableTransformContainer* test = nullptr;
139 StatusCode sc = detStore()->retrieve(test, m_dbRoot.value());
140
141 ATH_MSG_DEBUG("retrieve after record = " << sc);
142
143 if (test) {
144 ATH_MSG_DEBUG("retrieve pointer = " << test);
145 }
146 //sortTrans();
147
148 ATH_MSG_INFO("Created alignment payload for "
149 << nModules
150 << " HGTD modules.");
151
152 return StatusCode::SUCCESS;
153}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
const HGTD_ID * m_hgtdId
HGTD Identifier helper.
const HGTD_DetectorManager * m_detManager
HGTD detector manager.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillDB()

StatusCode HGTDAlignDBTool::fillDB ( const std::string & tag,
unsigned int run1,
unsigned int event1,
unsigned int run2,
unsigned int event2 ) const
overridevirtual

Register payload in the Conditions DB.

Implements IHGTDAlignDBTool.

Definition at line 414 of file HGTDAlignDBTool.cxx.

419{
420 SmartIF<IIOVRegistrationSvc> regSvc{
421 Gaudi::svcLocator()->service("IOVRegistrationSvc")
422 };
423
424 if(!regSvc.isValid())
425 {
426 ATH_MSG_FATAL("Cannot retrieve IOVRegistrationSvc");
427 return StatusCode::FAILURE;
428 }
429
430 ATH_MSG_INFO("Registering folder " << m_dbRoot);
431 ATH_MSG_INFO("Tag = " << tag);
432
433 ATH_CHECK(
434 regSvc->registerIOV(
435 "AlignableTransformContainer",
436 m_dbRoot.value(),
437 tag,
438 run1,
439 run2,
440 event1,
441 event2));
442
443 ATH_MSG_INFO("IOV registration successful");
444
445 return StatusCode::SUCCESS;
446}
#define ATH_MSG_FATAL(x)

◆ getTrans()

Amg::Transform3D HGTDAlignDBTool::getTrans ( const Identifier & ,
unsigned int level ) const
overridevirtual

Retrieve transform.

Implements IHGTDAlignDBTool.

Definition at line 308 of file HGTDAlignDBTool.cxx.

310{
311 (void)level;
312 const AlignableTransform* transform = cgetTransPtr(id);
313
314 if(!transform)
315 return Amg::Transform3D::Identity();
316
318
319 if (itr != transform->end()) {
321 itr->transform());
322 }
323
324 return Amg::Transform3D::Identity();
325}
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
const AlignableTransform * cgetTransPtr(const Identifier &id) const
Retrieve read-only AlignableTransform.
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.

◆ getTransPtr()

AlignableTransform * HGTDAlignDBTool::getTransPtr ( const Identifier & id) const
private

Retrieve writable AlignableTransform.

Definition at line 158 of file HGTDAlignDBTool.cxx.

159{
160 const AlignableTransformContainer* container = nullptr;
161
162 if (detStore()->retrieve(container, m_dbRoot.value()).isFailure())
163 return nullptr;
164
165 const std::string tag = moduleTag(id);
166
167 for (const auto* transform : *container) {
168 if (transform->tag() == tag) {
169 return const_cast<AlignableTransform*>(transform);
170 }
171 }
172
173 return nullptr;
174}

◆ initialize()

StatusCode HGTDAlignDBTool::initialize ( )
override

Definition at line 46 of file HGTDAlignDBTool.cxx.

47{
48 ATH_MSG_DEBUG("========================================");
49 ATH_MSG_DEBUG("LOCAL HGTDAlignDBTool initialize()");
50 ATH_MSG_DEBUG("========================================");
51
52 ATH_CHECK(detStore().retrieve());
53 ATH_CHECK(m_condStream.retrieve());
54 ATH_CHECK(detStore()->retrieve(m_detManager));
55 ATH_CHECK(detStore()->retrieve(m_hgtdId));
56
57 ATH_MSG_INFO("Alignment folder = " << m_dbRoot);
58 ATH_MSG_DEBUG("HGTD modules = " << m_hgtdId->wafer_hash_max());
59
60 return StatusCode::SUCCESS;
61}
ToolHandle< IAthenaOutputStreamTool > m_condStream
Output stream.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & IHGTDAlignDBTool::interfaceID ( )
inlinestaticinherited

Definition at line 81 of file IHGTDAlignDBTool.h.

82{
84}
static const InterfaceID IID_IHGTDAlignDBTool("IHGTDAlignDBTool", 1, 0)

◆ moduleTag()

std::string HGTDAlignDBTool::moduleTag ( const Identifier & id) const
private

Build the AlignableTransform tag corresponding to one HGTD module.

Definition at line 66 of file HGTDAlignDBTool.cxx.

67{
68 IdentifierHash hash;
69 IdContext waferContext = m_hgtdId->wafer_context();
70
71 if (m_hgtdId->get_hash(id,
72 hash,
73 &waferContext))
74 {
75 ATH_MSG_WARNING("Failed to obtain wafer hash for " << m_hgtdId->show_to_string(id));
76 return {};
77 }
78
79 return "HGTDModule_" + std::to_string(hash.value());
80}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputObjs()

StatusCode HGTDAlignDBTool::outputObjs ( )
overridevirtual

Stream payload to POOL.

Implements IHGTDAlignDBTool.

Definition at line 329 of file HGTDAlignDBTool.cxx.

330{
331 ATH_MSG_INFO("Writing HGTD alignment payload");
332
333 if (m_condStream->connectOutput().isFailure()) {
334 ATH_MSG_ERROR("Cannot connect output stream");
335 return StatusCode::FAILURE;
336 }
337
338 ATH_MSG_DEBUG("Output stream connected");
339
341 ATH_MSG_ERROR("Cannot find AlignableTransformContainer "
342 << m_dbRoot.value());
343 return StatusCode::FAILURE;
344 }
345
346 ATH_MSG_DEBUG("Container exists in DetectorStore");
347
349
350 objects.emplace_back("AlignableTransformContainer", m_dbRoot.value());
351
352 ATH_MSG_DEBUG("Streaming "
353 << objects.size()
354 << " object(s)");
355
356 if (m_condStream->streamObjects(objects).isFailure()) {
357
358 const AlignableTransformContainer* c = nullptr;
359 ATH_CHECK(detStore()->retrieve(c, m_dbRoot.value()));
360 ATH_MSG_INFO("Container key = " << m_dbRoot.value());
361 ATH_MSG_INFO("Container size = " << c->size());
362 ATH_MSG_INFO("Container pointer = " << c);
363
364 ATH_MSG_ERROR("streamObjects failed");
365 return StatusCode::FAILURE;
366 }
367
368 ATH_MSG_DEBUG("Objects streamed");
369
370 if (m_condStream->commitOutput().isFailure()) {
371 ATH_MSG_ERROR("commitOutput failed");
372 return StatusCode::FAILURE;
373 }
374
375 ATH_MSG_INFO("POOL payload committed");
376
377 const AlignableTransformContainer* c = nullptr;
378
379 ATH_CHECK(detStore()->retrieve(c, m_dbRoot.value()));
380
381 if (c) {
382 ATH_MSG_DEBUG("container ptr = " << c);
383 ATH_MSG_DEBUG("container size = " << c->size());
384 } else {
385 ATH_MSG_DEBUG("container is nullptr");
386 }
387
388 SG::DataProxy* proxy =
390 m_dbRoot.value());
391
392 if (!proxy) {
393 ATH_MSG_WARNING("NO PROXY FOUND");
394 }
395 else {
396 ATH_MSG_DEBUG("Proxy = " << proxy);
397 ATH_MSG_DEBUG("Proxy name = " << proxy->name());
398 ATH_MSG_DEBUG("Proxy CLID = " << proxy->clID());
399 const auto* address = proxy->address();
400 ATH_MSG_DEBUG("Proxy address = " << address);
401
402 if (address) {
403 ATH_MSG_DEBUG("Storage type = " << address->svcType());
404 ATH_MSG_DEBUG("Address class = " << typeid(*address).name());
405 }
406 }
407
408 return StatusCode::SUCCESS;
409}
std::vector< TypeKeyPair > TypeKeyPairs

◆ printDB()

void HGTDAlignDBTool::printDB ( ) const
overridevirtual

Print payload.

Implements IHGTDAlignDBTool.

Definition at line 450 of file HGTDAlignDBTool.cxx.

451{
452 const AlignableTransformContainer* container = nullptr;
453
454 if (detStore()->retrieve(container, m_dbRoot.value()).isFailure())
455 return;
456
457 ATH_MSG_INFO("HGTD alignment payload:");
458
459 unsigned int n = 0;
460
461 for (const auto* transform : *container) {
462
463 for (auto itr = transform->begin();
464 itr != transform->end();
465 ++itr)
466 {
467 const Amg::Transform3D trans = Amg::CLHEPTransformToEigen(itr->transform());
468 const Amg::Vector3D shift = trans.translation();
469
470 ATH_MSG_INFO("Identifier : "
471 << itr->identify()
472 << " Shift = ("
473 << shift.x() << ", "
474 << shift.y() << ", "
475 << shift.z() << ")");
476
477 ++n;
478 }
479 }
480
481 ATH_MSG_INFO("Total aligned modules : " << n);
482}
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setTrans() [1/2]

bool HGTDAlignDBTool::setTrans ( const Identifier & ,
unsigned int level,
const Amg::Transform3D &  ) const
overridevirtual

Replace the transform of one module.

Currently ignored. Reserved for possible future hierarchical alignment levels.

Implements IHGTDAlignDBTool.

Definition at line 200 of file HGTDAlignDBTool.cxx.

203{
206 (void)level;
207
208 AlignableTransform* transform = getTransPtr(id);
209
210 if(!transform)
211 {
212 ATH_MSG_ERROR("Cannot retrieve AlignableTransform for " << m_hgtdId->show_to_string(id));
213 return false;
214 }
215
216 return transform->update(
217 id,
219}
AlignableTransform * getTransPtr(const Identifier &id) const
Retrieve writable AlignableTransform.

◆ setTrans() [2/2]

bool HGTDAlignDBTool::setTrans ( const Identifier & ,
unsigned int level,
const Amg::Vector3D & ,
double alpha,
double beta,
double gamma ) const
overridevirtual

Replace the transform using translation + rotations.

Implements IHGTDAlignDBTool.

Definition at line 224 of file HGTDAlignDBTool.cxx.

231{
232 Amg::Translation3D t(translation);
233
235 t * Amg::RotationMatrix3D::Identity();
236
237 tr *= Amg::AngleAxis3D(
238 gamma,
239 Amg::Vector3D(0.,0.,1.));
240
241 tr *= Amg::AngleAxis3D(
242 beta,
243 Amg::Vector3D(0.,1.,0.));
244
245 tr *= Amg::AngleAxis3D(
246 alpha,
247 Amg::Vector3D(1.,0.,0.));
248
249 return setTrans(id, level, tr);
250}
bool setTrans(const Identifier &, unsigned int level, const Amg::Transform3D &) const override
Replace the transform of one module.
Eigen::AngleAxisd AngleAxis3D
Eigen::Translation< double, 3 > Translation3D

◆ sortTrans()

void HGTDAlignDBTool::sortTrans ( ) const
overridevirtual

Sort AlignableTransform entries.

Implements IHGTDAlignDBTool.

Definition at line 486 of file HGTDAlignDBTool.cxx.

487{
488 const AlignableTransformContainer* container = nullptr;
489
490 if (detStore()->retrieve(container, m_dbRoot.value()).isFailure())
491 return;
492
493 for (const auto* transform : *container) {
494 const_cast<AlignableTransform*>(transform)->sortv();
495 }
496}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tweakTrans() [1/2]

bool HGTDAlignDBTool::tweakTrans ( const Identifier & ,
unsigned int level,
const Amg::Transform3D &  ) const
overridevirtual

Apply an incremental transform.

Implements IHGTDAlignDBTool.

Definition at line 255 of file HGTDAlignDBTool.cxx.

258{
259 (void)level;
260
261 AlignableTransform* transform = getTransPtr(id);
262
263 if(!transform)
264 {
265 ATH_MSG_ERROR("Cannot retrieve AlignableTransform for " << m_hgtdId->show_to_string(id));
266 return false;
267 }
268
269 return transform->tweak(
270 id,
272}

◆ tweakTrans() [2/2]

bool HGTDAlignDBTool::tweakTrans ( const Identifier & ,
unsigned int level,
const Amg::Vector3D & ,
double alpha,
double beta,
double gamma ) const
overridevirtual

Apply an incremental transform using translation + rotations.

Implements IHGTDAlignDBTool.

Definition at line 277 of file HGTDAlignDBTool.cxx.

284{
285 Amg::Translation3D t(translation);
286
288 t * Amg::RotationMatrix3D::Identity();
289
290 tr *= Amg::AngleAxis3D(
291 gamma,
292 Amg::Vector3D(0.,0.,1.));
293
294 tr *= Amg::AngleAxis3D(
295 beta,
296 Amg::Vector3D(0.,1.,0.));
297
298 tr *= Amg::AngleAxis3D(
299 alpha,
300 Amg::Vector3D(1.,0.,0.));
301
302 return tweakTrans(id, level, tr);
303}
bool tweakTrans(const Identifier &, unsigned int level, const Amg::Transform3D &) const override
Apply an incremental transform.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_condStream

ToolHandle<IAthenaOutputStreamTool> HGTDAlignDBTool::m_condStream
private
Initial value:
{
this,
"CondStream",
"AthenaOutputStreamTool/AthenaOutputStreamTool"
}

Output stream.

Definition at line 107 of file HGTDAlignDBTool.h.

107 {
108 this,
109 "CondStream",
110 "AthenaOutputStreamTool/AthenaOutputStreamTool"
111 };

◆ m_dbRoot

Gaudi::Property<std::string> HGTDAlignDBTool::m_dbRoot
private
Initial value:
{
this,
"DBRoot",
"/HGTD/Align",
"Root folder for HGTD alignment conditions"
}

Alignment folder.

Definition at line 114 of file HGTDAlignDBTool.h.

114 {
115 this,
116 "DBRoot",
117 "/HGTD/Align",
118 "Root folder for HGTD alignment conditions"
119 };

◆ m_detManager

const HGTD_DetectorManager* HGTDAlignDBTool::m_detManager {}
private

HGTD detector manager.

Definition at line 101 of file HGTDAlignDBTool.h.

101{};

◆ m_detManagerName

Gaudi::Property<std::string> HGTDAlignDBTool::m_detManagerName
private
Initial value:
{
this,
"DetectorManager",
"HGTD",
"HGTD detector manager name"
}

Detector manager name.

Definition at line 122 of file HGTDAlignDBTool.h.

122 {
123 this,
124 "DetectorManager",
125 "HGTD",
126 "HGTD detector manager name"
127 };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hgtdId

const HGTD_ID* HGTDAlignDBTool::m_hgtdId {nullptr}
private

HGTD Identifier helper.

Definition at line 104 of file HGTDAlignDBTool.h.

104{nullptr};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: