ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::InDetTrkAlignDBTool Class Reference

#include <InDetTrkAlignDBTool.h>

Inheritance diagram for InDet::InDetTrkAlignDBTool:
Collaboration diagram for InDet::InDetTrkAlignDBTool:

Public Member Functions

 InDetTrkAlignDBTool (const std::string &type, const std::string &name, const IInterface *parent)
 constructor
virtual ~InDetTrkAlignDBTool ()
 destructor
virtual StatusCode initialize ()
 initialize method
virtual StatusCode finalize ()
 finalize method
void writeAlignPar ()
 Writes alignment parameters.
virtual void setNtuple (TFile *)
 sets ntuple if needed
virtual void setLogStream (std::ostream *os)
 sets the output stream for the logfile
virtual StatusCode preSolve ()
 sets up initial alignment constants before solving
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.

Protected Attributes

std::ostream * m_logStream = nullptr
 logfile output stream

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void updateDB ()
 updates alignment constants in the DB
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::ITrkAlignDBToolm_siDBtool
ToolHandle< Trk::ITrkAlignDBToolm_trtDBtool
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 26 of file InDetTrkAlignDBTool.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

◆ InDetTrkAlignDBTool()

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

constructor

Definition at line 16 of file InDetTrkAlignDBTool.cxx.

17 : AthAlgTool(type,name,parent)
18 , m_siDBtool("InDet::SiTrkAlignDBTool/SiTrkAlignDBTool")
19 , m_trtDBtool("InDet::TRTTrkAlignDBTool/TRTTrkAlignDBTool")
20{
21 declareInterface<ITrkAlignDBTool>(this);
22
23 declareProperty("SiTrkAlignDBTool", m_siDBtool, "Tool for handling the Silicon DB I/O");
24 declareProperty("TRTTrkAlignDBTool", m_trtDBtool, "Tool for handling the TRT DB I/O");
25}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ToolHandle< Trk::ITrkAlignDBTool > m_trtDBtool
ToolHandle< Trk::ITrkAlignDBTool > m_siDBtool

◆ ~InDetTrkAlignDBTool()

InDet::InDetTrkAlignDBTool::~InDetTrkAlignDBTool ( )
virtual

destructor

Definition at line 28 of file InDetTrkAlignDBTool.cxx.

29{}

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 }

◆ 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

◆ finalize()

StatusCode InDet::InDetTrkAlignDBTool::finalize ( )
virtual

finalize method

Implements Trk::ITrkAlignDBTool.

Definition at line 54 of file InDetTrkAlignDBTool.cxx.

55{
56 ATH_MSG_DEBUG("finalize() of InDetTrkAlignDBTool");
57
58 return StatusCode::SUCCESS;
59}
#define ATH_MSG_DEBUG(x)

◆ initialize()

StatusCode InDet::InDetTrkAlignDBTool::initialize ( )
virtual

initialize method

Implements Trk::ITrkAlignDBTool.

Definition at line 32 of file InDetTrkAlignDBTool.cxx.

32 {
33
34 ATH_MSG_DEBUG("initialize() of InDetTrkAlignDBTool");
35
36 // get SiTrkAlignDBTool
37 if( m_siDBtool.retrieve().isFailure() ) {
38 msg(MSG::FATAL) << " Could not retrieve " << m_siDBtool << endmsg;
39 return StatusCode::FAILURE;
40 }
41 ATH_MSG_INFO("retrieved " << m_siDBtool);
42
43 // get TRTTrkAlignDBTool
44 if( m_trtDBtool.retrieve().isFailure() ) {
45 msg(MSG::FATAL) << " Could not retrieve " << m_trtDBtool << endmsg;
46 return StatusCode::FAILURE;
47 }
48 ATH_MSG_INFO("retrieved " << m_trtDBtool);
49
50 return StatusCode::SUCCESS;
51}
#define endmsg
#define ATH_MSG_INFO(x)
MsgStream & msg() const

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

Definition at line 58 of file ITrkAlignDBTool.h.

static const InterfaceID IID_TRKALIGNINTERFACES_ITrkAlignDBTool("ITrkAlignDBTool", 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.

◆ preSolve()

virtual StatusCode Trk::ITrkAlignDBTool::preSolve ( )
inlinevirtualinherited

sets up initial alignment constants before solving

Definition at line 52 of file ITrkAlignDBTool.h.

52{ return StatusCode::SUCCESS; }

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

◆ setLogStream()

virtual void Trk::ITrkAlignDBTool::setLogStream ( std::ostream * os)
inlinevirtualinherited

sets the output stream for the logfile

Definition at line 49 of file ITrkAlignDBTool.h.

49{ m_logStream = os; }
std::ostream * m_logStream
logfile output stream

◆ setNtuple()

virtual void Trk::ITrkAlignDBTool::setNtuple ( TFile * )
inlinevirtualinherited

sets ntuple if needed

Reimplemented in InDet::SiTrkAlignDBTool, and InDet::TRTTrkAlignDBTool.

Definition at line 46 of file ITrkAlignDBTool.h.

46{}

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

◆ updateDB()

void InDet::InDetTrkAlignDBTool::updateDB ( )
private

updates alignment constants in the DB

◆ 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

◆ writeAlignPar()

void InDet::InDetTrkAlignDBTool::writeAlignPar ( )
virtual

Writes alignment parameters.

Reimplemented from Trk::ITrkAlignDBTool.

Definition at line 62 of file InDetTrkAlignDBTool.cxx.

63{
64 ATH_MSG_DEBUG("in InDetTrkAlignDBTool::writeAlignPar()");
65
66 m_siDBtool->writeAlignPar();
67 m_trtDBtool->writeAlignPar();
68
69 return;
70}

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_logStream

std::ostream* Trk::ITrkAlignDBTool::m_logStream = nullptr
protectedinherited

logfile output stream

Definition at line 55 of file ITrkAlignDBTool.h.

◆ m_siDBtool

ToolHandle<Trk::ITrkAlignDBTool> InDet::InDetTrkAlignDBTool::m_siDBtool
private

Definition at line 50 of file InDetTrkAlignDBTool.h.

◆ m_trtDBtool

ToolHandle<Trk::ITrkAlignDBTool> InDet::InDetTrkAlignDBTool::m_trtDBtool
private

Definition at line 51 of file InDetTrkAlignDBTool.h.

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