ATLAS Offline Software
Loading...
Searching...
No Matches
JiveXML::InDetGeoModelTool Class Reference

Provides easy access to the geometry model managers and identifier helpers for all JiveXML::IDataRetriever implemenations in InDetJiveXML . More...

#include <InDetGeoModelTool.h>

Inheritance diagram for JiveXML::InDetGeoModelTool:
Collaboration diagram for JiveXML::InDetGeoModelTool:

Public Member Functions

 InDetGeoModelTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor with flags for requested geometry managers.
virtual StatusCode initialize ()
 Initialize.
const InDetDD::TRT_DetectorManagerTRTGeoManager () const
 Provide the TRT geometry manager.
const PixelIDPixelIDHelper () const
 Provide the Pixel identifier helper.
const SCT_IDSCTIDHelper () const
 Provide the SCT identifier helper.
const TRT_IDTRTIDHelper () const
 Provide the TRT identifier helper.
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 ()
 Return the interface identifier.

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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const PixelIDm_PixelIDHelper {}
const SCT_IDm_SCTIDHelper {}
const InDetDD::TRT_DetectorManagerm_TRTGeoManager {}
const TRT_IDm_TRTIDHelper {}
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

Provides easy access to the geometry model managers and identifier helpers for all JiveXML::IDataRetriever implemenations in InDetJiveXML .

Definition at line 20 of file InDetGeoModelTool.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

◆ InDetGeoModelTool()

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

Standard Constructor with flags for requested geometry managers.

This is the standard AthAlgTool constructor.

Parameters
typeAlgTool type name
nameAlgTool instance name
parentAlgTools parent owning this tool

Definition at line 26 of file InDetGeoModelTool.cxx.

26 :
27 AthAlgTool(type,name,parent) {
28
29 //Only declare the interface
30 declareInterface<IInDetGeoModelTool>(this);
31 }
AthAlgTool()
Default constructor:

Member Function Documentation

◆ 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

◆ initialize()

StatusCode JiveXML::InDetGeoModelTool::initialize ( )
virtual

Initialize.

In initalizie, retrieve all the requested geometry model managers.

Check for Pixel ID helper

Check for SCT ID helper

Check for TRT geo model manager and ID helper

Definition at line 36 of file InDetGeoModelTool.cxx.

36 {
37
41
42 // Get identifier helper
43 if (detStore()->retrieve(m_PixelIDHelper, "PixelID").isFailure()) {
44 ATH_MSG_ERROR( "Could not get Pixel ID helper" );
45 return StatusCode::RECOVERABLE;
46 }
47
51
52 // Get identifier helper
53 if (detStore()->retrieve(m_SCTIDHelper, "SCT_ID").isFailure()) {
54 ATH_MSG_ERROR( "Could not get SCT ID helper" );
55 return StatusCode::RECOVERABLE;
56 }
57
58 // check if SLHC geo is used (TRT not implemented)
59 // if not SLHC, get the TRT Det Descr manager
60 bool isSLHC = false;
61 const IdDictManager* idDictMgr = nullptr;
62 if (detStore()->retrieve(idDictMgr, "IdDict").isFailure()) {
63 ATH_MSG_ERROR( "Could not get IdDictManager !" );
64 return StatusCode::RECOVERABLE;
65 } else {
66 const IdDictDictionary* dict = idDictMgr->manager()->find_dictionary("InnerDetector");
67 if(!dict) {
68 ATH_MSG_ERROR( " Cannot access InnerDetector dictionary " );
69 return StatusCode::RECOVERABLE;
70 }else{
71 // if (dict->file_name().find("SLHC")!=std::string::npos) isSLHC=true;
72 if (dict->version().find("SLHC")!=std::string::npos) isSLHC=true;
73 }
74 }
75
76 if(!isSLHC){
80
81 // Get geo model manager
82 if ( detStore()->retrieve(m_TRTGeoManager, "TRT").isFailure()) {
83 ATH_MSG_ERROR( "Could not get TRT GeoModel Manager!" );
84 return StatusCode::RECOVERABLE;
85 }
86
87 // Get identifier helper
88 if (detStore()->retrieve(m_TRTIDHelper, "TRT_ID").isFailure()) {
89 ATH_MSG_ERROR( "Could not get TRT ID helper" );
90 return StatusCode::RECOVERABLE;
91 }
92 }
93
94 return StatusCode::SUCCESS;
95 }
#define ATH_MSG_ERROR(x)
const ServiceHandle< StoreGateSvc > & detStore() const
const std::string & version() const
Dictionary version.
const IdDictMgr * manager(void) const
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
const InDetDD::TRT_DetectorManager * m_TRTGeoManager
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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 & JiveXML::IInDetGeoModelTool::interfaceID ( )
inlinestaticinherited

Return the interface identifier.

Definition at line 44 of file IInDetGeoModelTool.h.

44{ return IID_IInDetGeoModelTool; }
static const InterfaceID IID_IInDetGeoModelTool("JiveXML::IInDetGeoModelTool", 1, 0)

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

◆ PixelIDHelper()

const PixelID * JiveXML::InDetGeoModelTool::PixelIDHelper ( ) const
inlinevirtual

Provide the Pixel identifier helper.

Implements JiveXML::IInDetGeoModelTool.

Definition at line 35 of file InDetGeoModelTool.h.

35{ return m_PixelIDHelper; }

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

◆ SCTIDHelper()

const SCT_ID * JiveXML::InDetGeoModelTool::SCTIDHelper ( ) const
inlinevirtual

Provide the SCT identifier helper.

Implements JiveXML::IInDetGeoModelTool.

Definition at line 37 of file InDetGeoModelTool.h.

37{ return m_SCTIDHelper; }

◆ 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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

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

◆ TRTGeoManager()

const InDetDD::TRT_DetectorManager * JiveXML::InDetGeoModelTool::TRTGeoManager ( ) const
inlinevirtual

Provide the TRT geometry manager.

Implements JiveXML::IInDetGeoModelTool.

Definition at line 32 of file InDetGeoModelTool.h.

32{ return m_TRTGeoManager; }

◆ TRTIDHelper()

const TRT_ID * JiveXML::InDetGeoModelTool::TRTIDHelper ( ) const
inlinevirtual

Provide the TRT identifier helper.

Implements JiveXML::IInDetGeoModelTool.

Definition at line 39 of file InDetGeoModelTool.h.

39{ return m_TRTIDHelper; }

◆ 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_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_PixelIDHelper

const PixelID* JiveXML::InDetGeoModelTool::m_PixelIDHelper {}
private

Definition at line 43 of file InDetGeoModelTool.h.

43{};

◆ m_SCTIDHelper

const SCT_ID* JiveXML::InDetGeoModelTool::m_SCTIDHelper {}
private

Definition at line 45 of file InDetGeoModelTool.h.

45{};

◆ m_TRTGeoManager

const InDetDD::TRT_DetectorManager* JiveXML::InDetGeoModelTool::m_TRTGeoManager {}
private

Definition at line 47 of file InDetGeoModelTool.h.

47{};

◆ m_TRTIDHelper

const TRT_ID* JiveXML::InDetGeoModelTool::m_TRTIDHelper {}
private

Definition at line 48 of file InDetGeoModelTool.h.

48{};

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