ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonGMR4::MdtReadoutGeomTool Class Reference

#include <MdtReadoutGeomTool.h>

Inheritance diagram for MuonGMR4::MdtReadoutGeomTool:
Collaboration diagram for MuonGMR4::MdtReadoutGeomTool:

Classes

struct  FactoryCache
 

Public Types

using physNodeMap = std::map< std::string, GeoFullPhysVol * >
 

Public Member Functions

 MdtReadoutGeomTool (const std::string &type, const std::string &name, const IInterface *parent)
 
StatusCode buildReadOutElements (MuonDetectorManager &mgr) override final
 Retrieves the GeoModel from the GeoModelSvc and append the ReadoutElements of the Given MuonDetectorTechnology to the MuonDetectorManager. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (IMuonReadoutGeomTool, 1, 0)
 Gaudi interface ID. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

using parameterBook = MdtReadoutElement::parameterBook
 
using ParamBookTable = std::map< std::string, parameterBook >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode readParameterBook (FactoryCache &facCache) const
 Retrieves the auxillary tables from the database. More...
 
StatusCode loadDimensions (FactoryCache &facCache, MdtReadoutElement::defineArgs &args) const
 Loads the chamber dimensions from GeoModel. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ServiceHandle< IGeoDbTagSvcm_geoDbTagSvc
 
PublicToolHandle< IMuonGeoUtilityToolm_geoUtilTool {this,"GeoUtilTool", "" }
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 18 of file MdtReadoutGeomTool.h.

Member Typedef Documentation

◆ ParamBookTable

using MuonGMR4::MdtReadoutGeomTool::ParamBookTable = std::map<std::string, parameterBook>
private

Definition at line 37 of file MdtReadoutGeomTool.h.

◆ parameterBook

Definition at line 36 of file MdtReadoutGeomTool.h.

◆ physNodeMap

using MuonGMR4::IMuonReadoutGeomTool::physNodeMap = std::map<std::string, GeoFullPhysVol*>
inherited

Definition at line 25 of file IMuonReaoutGeomTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MdtReadoutGeomTool()

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

Definition at line 28 of file MdtReadoutGeomTool.cxx.

31  : AthAlgTool{type, name, parent} {
32  declareInterface<IMuonReadoutGeomTool>(this);
33 }

Member Function Documentation

◆ buildReadOutElements()

StatusCode MuonGMR4::MdtReadoutGeomTool::buildReadOutElements ( MuonDetectorManager mgr)
finaloverridevirtual

Retrieves the GeoModel from the GeoModelSvc and append the ReadoutElements of the Given MuonDetectorTechnology to the MuonDetectorManager.

The keys should be formatted like <STATION_NAME>_<MUON_CHAMBERTYPE>_etc. The <MUON_CHAMBERTYPE> also indicates whether we're dealing with a MDT / TGC / CSC / RPC chamber If we are dealing with a MDT chamber, then there are 3 additional properties encoded into the chamber <STATIONETA>_<STATIONPHI>_ML

Skip the endcap chambers

Load first tube etc. from the parameter book table

Chamber dimensions are given from the GeoShape

Implements MuonGMR4::IMuonReadoutGeomTool.

Definition at line 108 of file MdtReadoutGeomTool.cxx.

108  {
109  ATH_CHECK(m_geoDbTagSvc.retrieve());
110  ATH_CHECK(m_idHelperSvc.retrieve());
111  ATH_CHECK(m_geoUtilTool.retrieve());
112  GeoModelIO::ReadGeoModel* sqliteReader = m_geoDbTagSvc->getSqliteReader();
113  if (!sqliteReader) {
114  ATH_MSG_FATAL("Error, the tool works exclusively from sqlite geometry inputs");
115  return StatusCode::FAILURE;
116  }
117  FactoryCache facCache{};
118  ATH_CHECK(readParameterBook(facCache));
119  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
120  // Get the list of full phys volumes from SQLite, and create detector elements
121  physNodeMap mapFPV = sqliteReader->getPublishedNodes<std::string, GeoFullPhysVol*>("Muon");
122 #ifndef SIMULATIONBASE
123  SurfaceBoundSetPtr<Acts::LineBounds> tubeBounds = std::make_shared<SurfaceBoundSet<Acts::LineBounds>>();
124  SurfaceBoundSetPtr<Acts::TrapezoidBounds> layerBounds = std::make_shared<SurfaceBoundSet<Acts::TrapezoidBounds>>();
125 #endif
126  for (auto& [key, pv] : mapFPV) {
133  std::vector<std::string> key_tokens = tokenize(key, "_");
134  if (key_tokens.size() != 5 ||
135  key_tokens[1].find("MDT") == std::string::npos)
136  continue;
137 
139  bool isValid{false};
140  define.detElId = idHelper.channelID(key_tokens[0].substr(0, 3),
141  atoi(key_tokens[2]),
142  atoi(key_tokens[3]),
143  atoi(key_tokens[4]), 1, 1, isValid);
144  if (!isValid) {
145  ATH_MSG_FATAL("Failed to build a good identifier out of " << key);
146  return StatusCode::FAILURE;
147  }
148  ATH_MSG_DEBUG("Key "<<key<<" brought us "<<m_idHelperSvc->toStringDetEl(define.detElId));
150  define.physVol = pv;
151  define.chambDesign = key_tokens[1];
152  define.alignTransform = m_geoUtilTool->findAlignableTransform(define.physVol);
153 
155  ParamBookTable::const_iterator book_itr = facCache.parBook.find(define.chambDesign);
156  if (book_itr == facCache.parBook.end()) {
157  ATH_MSG_FATAL("There is no chamber called "<<define.chambDesign);
158  return StatusCode::FAILURE;
159  }
160  static_cast<parameterBook&>(define) = book_itr->second;
161 #ifndef SIMULATIONBASE
162  define.tubeBounds = tubeBounds;
163  define.layerBounds = layerBounds;
164  #endif
166  ATH_CHECK(loadDimensions(facCache, define));
167  std::unique_ptr<MdtReadoutElement> mdtDetectorElement = std::make_unique<MdtReadoutElement>(std::move(define));
168  ATH_CHECK(mgr.addMdtReadoutElement(std::move(mdtDetectorElement)));
169  }
170  return StatusCode::SUCCESS;
171 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

MuonGMR4::IMuonReadoutGeomTool::DeclareInterfaceID ( IMuonReadoutGeomTool  ,
,
 
)
inherited

Gaudi interface ID.

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

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

◆ loadDimensions()

StatusCode MuonGMR4::MdtReadoutGeomTool::loadDimensions ( FactoryCache facCache,
MdtReadoutElement::defineArgs args 
) const
private

Loads the chamber dimensions from GeoModel.

The trapezoid defines the length of the chamber including the extra material stemming from the faraday cache etc.

Loop over the child nodes of the full mdt tube layer volume to pick the ones representing the tubeLayer – their logical volume is callded TubeLayerLog. The node right before the child volume is the associated transform node

Next check all tubes whether they're made up out of air or not. If yes, then there's no tube at this place and add the corresponding has hto the list.

Check for the endplug volumes

Either all tubes have an endplug or none

Definition at line 35 of file MdtReadoutGeomTool.cxx.

36  {
37 
38  ATH_MSG_VERBOSE("Load dimensions of "<<m_idHelperSvc->toString(define.detElId)
39  <<std::endl<<std::endl<<m_geoUtilTool->dumpVolume(define.physVol));
40  const GeoShape* shape = m_geoUtilTool->extractShape(define.physVol);
41  if (!shape) {
42  ATH_MSG_FATAL("Failed to deduce a valid shape for "<<m_idHelperSvc->toString(define.detElId));
43  return StatusCode::FAILURE;
44  }
47  if (shape->typeID() == GeoTrd::getClassTypeID()) {
48  ATH_MSG_VERBOSE("Extracted shape "<<m_geoUtilTool->dumpShape(shape));
49  const GeoTrd* trd = static_cast<const GeoTrd*>(shape);
50  define.longHalfX = std::max(trd->getYHalfLength1(), trd->getYHalfLength2()) * Gaudi::Units::mm;
51  define.shortHalfX = std::min(trd->getYHalfLength1(), trd->getYHalfLength2())* Gaudi::Units::mm;
52  define.halfY = trd->getZHalfLength()* Gaudi::Units::mm;
53  define.halfHeight = std::max(trd->getXHalfLength1(), trd->getXHalfLength2()) * Gaudi::Units::mm;
54  } else {
55  ATH_MSG_FATAL("Unknown shape type "<<shape->type());
56  return StatusCode::FAILURE;
57  }
61  for (unsigned int ch = 1; ch < define.physVol->getNChildNodes(); ++ch) {
62  const GeoGraphNode* childNode = (*define.physVol->getChildNode(ch));
63  const GeoVPhysVol* childVol = dynamic_cast<const GeoVPhysVol*>(childNode);
64  if (!childVol || childVol->getLogVol()->getName() != "TubeLayerLog") {
65  continue;
66  }
67  const GeoTransform* trfNode = dynamic_cast<const GeoTransform*>(*define.physVol->getChildNode(ch-1));
68  if (!trfNode) {
69  ATH_MSG_FATAL("Expect a GeoTransform node right before the tubelayer node");
70  return StatusCode::FAILURE;
71  }
72  ATH_MSG_VERBOSE("Add new tube layer "<<m_idHelperSvc->toStringDetEl(define.detElId)<<
73  std::endl<<std::endl<<m_geoUtilTool->dumpVolume(childVol));
74 
75  MdtTubeLayerPtr newLay = std::make_unique<MdtTubeLayer>(childVol, trfNode);
76  define.tubeLayers.emplace_back(*facCache.tubeLayers.insert(newLay).first);
77 
78  const MdtTubeLayer& lay{*define.tubeLayers.back()};
81  bool chEndPlug{false};
82  for (unsigned int tube = 0 ; tube < lay.nTubes(); ++tube) {
83  constexpr std::string_view airTubeName{"airTube"};
84  PVConstLink tubeVol{lay.getTubeNode(tube)};
85  if (tubeVol->getLogVol()->getName() == airTubeName) {
86  define.removedTubes.insert(MdtReadoutElement::measurementHash(define.tubeLayers.size(), tube+1));
87  } else if (!chEndPlug) {
89  chEndPlug = true;
90  std::vector<physVolWithTrans> endPlugs = m_geoUtilTool->findAllLeafNodesByName(tubeVol, "Endplug");
91  if (endPlugs.empty()) {
93  continue;
94  }
95  const GeoShape* plugShape = m_geoUtilTool->extractShape(endPlugs[0].volume);
96  if (plugShape->typeID() != GeoTube::getClassTypeID()){
97  ATH_MSG_FATAL("The shape "<<m_geoUtilTool->dumpShape(plugShape)<<" is not a tube");
98  return StatusCode::FAILURE;
99  }
100  const GeoTube* plugTube = static_cast<const GeoTube*>(plugShape);
101  define.endPlugLength = plugTube->getZHalfLength();
102  }
103  }
104  }
105  define.readoutSide = facCache.readoutOnLeftSide.count(m_idHelperSvc->chamberId(define.detElId)) ? -1. : 1.;
106  return StatusCode::SUCCESS;
107 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

◆ readParameterBook()

StatusCode MuonGMR4::MdtReadoutGeomTool::readParameterBook ( FactoryCache facCache) const
private

Retrieves the auxillary tables from the database.

Load the chamber that have their readout on the negative z-side

Definition at line 172 of file MdtReadoutGeomTool.cxx.

172  {
173  ServiceHandle<IRDBAccessSvc> accessSvc(m_geoDbTagSvc->getParamSvcName(),
174  name());
175  ATH_CHECK(accessSvc.retrieve());
176  IRDBRecordset_ptr paramTable = accessSvc->getRecordsetPtr("WMDT", "");
177  if (paramTable->size() == 0) {
178  ATH_MSG_FATAL("Empty parameter book table found");
179  return StatusCode::FAILURE;
180  }
181  ATH_MSG_VERBOSE("Found the " << paramTable->nodeName() << " ["
182  << paramTable->tagName() << "] table with "
183  << paramTable->size() << " records");
184  for (const IRDBRecord_ptr& record : *paramTable) {
186  pars.tubeWall = record->getDouble("TUBWAL") * Gaudi::Units::cm;
187  pars.tubePitch = record->getDouble("TUBPIT") * Gaudi::Units::cm;
188  pars.tubeInnerRad = record->getDouble("TUBRAD") * Gaudi::Units::cm;
189  pars.endPlugLength = record->getDouble("TUBDEA") * Gaudi::Units::cm;
190  pars.radLengthX0 = record->getDouble("X0");
191  unsigned int nLay = record->getInt("LAYMDT");
192  const std::string key {record->getString("WMDT_TYPE")};
193  ATH_MSG_DEBUG("Extracted parameters " <<pars<<" number of layers: "<<nLay<<" will be safed under key "<<key);
194  cache.parBook[key] = std::move(pars);
195  }
197  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
198  paramTable = accessSvc->getRecordsetPtr("MdtTubeROSides" ,"");
199  if (paramTable->size() == 0) {
200  ATH_MSG_FATAL("Empty parameter book table found");
201  return StatusCode::FAILURE;
202  }
203  ATH_MSG_VERBOSE("Found the " << paramTable->nodeName() << " ["
204  << paramTable->tagName() << "] table with "
205  << paramTable->size() << " records");
206  for (const IRDBRecord_ptr& record : *paramTable) {
207  const std::string stName = record->getString("stationName");
208  const int stEta = record->getInt("stationEta");
209  const int stPhi = record->getInt("stationPhi");
210  const int side = record->getInt("side");
211  if (side == -1) {
212  bool isValid{false};
213  cache.readoutOnLeftSide.insert(idHelper.elementID(stName,stEta,stPhi, isValid));
214  if (!isValid) {
215  ATH_MSG_FATAL("station "<<stName<<" eta: "<<stEta<<" phi: "<<stPhi<<" is unknown.");
216  return StatusCode::FAILURE;
217  }
218  }
219  }
220  return StatusCode::SUCCESS;
221 }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

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

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

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

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_geoDbTagSvc

ServiceHandle<IGeoDbTagSvc> MuonGMR4::MdtReadoutGeomTool::m_geoDbTagSvc
private
Initial value:
{this, "GeoDbTagSvc",
"GeoDbTagSvc"}

Definition at line 32 of file MdtReadoutGeomTool.h.

◆ m_geoUtilTool

PublicToolHandle<IMuonGeoUtilityTool> MuonGMR4::MdtReadoutGeomTool::m_geoUtilTool {this,"GeoUtilTool", "" }
private

Definition at line 35 of file MdtReadoutGeomTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGMR4::MdtReadoutGeomTool::m_idHelperSvc
private
Initial value:
{
this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 29 of file MdtReadoutGeomTool.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:
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
MuonGMR4::MdtReadoutElement::parameterBook::tubeBounds
ActsTrk::SurfaceBoundSetPtr< Acts::LineBounds > tubeBounds
Sets of surface bounds which is shared amongst all readout elements used to assign the same bound obj...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:62
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
MuonGMR4::MdtTubeLayerPtr
GeoModel::TransientConstSharedPtr< MdtTubeLayer > MdtTubeLayerPtr
Definition: MdtTubeLayer.h:17
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
MuonGMR4::MdtReadoutElement::measurementHash
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
MuonGMR4::MdtReadoutGeomTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: MdtReadoutGeomTool.h:32
MuonGMR4::MdtReadoutGeomTool::readParameterBook
StatusCode readParameterBook(FactoryCache &facCache) const
Retrieves the auxillary tables from the database.
Definition: MdtReadoutGeomTool.cxx:172
MuonGMR4::MdtReadoutGeomTool::m_geoUtilTool
PublicToolHandle< IMuonGeoUtilityTool > m_geoUtilTool
Definition: MdtReadoutGeomTool.h:35
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TRT::Hit::side
@ side
Definition: HitInfo.h:83
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGMR4::MdtReadoutGeomTool::parameterBook
MdtReadoutElement::parameterBook parameterBook
Definition: MdtReadoutGeomTool.h:36
MdtIdHelper
Definition: MdtIdHelper.h:61
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
min
#define min(a, b)
Definition: cfImp.cxx:40
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MuonGMR4::MdtReadoutGeomTool::loadDimensions
StatusCode loadDimensions(FactoryCache &facCache, MdtReadoutElement::defineArgs &args) const
Loads the chamber dimensions from GeoModel.
Definition: MdtReadoutGeomTool.cxx:35
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IRDBRecord_ptr
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
Definition: IRDBRecordset.h:23
python.changerun.pv
pv
Definition: changerun.py:81
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ActsTrk::SurfaceBoundSetPtr
std::shared_ptr< SurfaceBoundSet< BoundType > > SurfaceBoundSetPtr
Aberivation to create a new SurfaceBoundSetPtr.
Definition: SurfaceBoundSet.h:50
AthAlgTool
Definition: AthAlgTool.h:26
MuonGMR4::IMuonReadoutGeomTool::physNodeMap
std::map< std::string, GeoFullPhysVol * > physNodeMap
Definition: IMuonReaoutGeomTool.h:25
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
calibdata.tube
tube
Definition: calibdata.py:31
fitman.k
k
Definition: fitman.py:528
MuonGMR4::defineArgs
MuonChamber::defineArgs defineArgs
Definition: ChamberAssembleTool.cxx:32
MuonGMR4::MdtReadoutGeomTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtReadoutGeomTool.h:29
ServiceHandle< IRDBAccessSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37