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

#include <MdtCalibDbAlg.h>

Inheritance diagram for MuonCalibR4::MdtCalibDbAlg:
Collaboration diagram for MuonCalibR4::MdtCalibDbAlg:

Classes

struct  RtPayload
 
struct  RtTubePayload
 

Public Member Functions

 MdtCalibDbAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~MdtCalibDbAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual bool isReEntrant () const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 

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 RtRelationPtr = MuonCalib::MdtFullCalibData::RtRelationPtr
 
using TubeContainerPtr = MuonCalib::MdtFullCalibData::TubeContainerPtr
 
using RtMap = std::map< Identifier, RtRelationPtr >
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode loadRt (const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
 
StatusCode loadTube (MuonCalib::MdtCalibDataContainer &writeCdo) const
 
StatusCode readRtPayload (const coral::AttributeList &attributeList, std::unordered_map< Identifier, RtPayload > &rtCalibration) const
 
StatusCode readTubePayload (const coral::AttributeList &attributeList, std::unordered_map< Identifier, RtTubePayload > &tubeCalibration) const
 
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 {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
const MuonGMR4::MuonDetectorManagerm_r4detMgr {nullptr}
 
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainerm_writeKey
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyRt {this, "ReadKeyRt", "/MDT/RTBLOB", "DB folder containing the RT calibrations"}
 
SG::ReadCondHandleKey< CondAttrListCollectionm_readKeyTube {this, "ReadKeyTube", "/MDT/T0BLOB", "DB folder containing the tube constants"}
 
ToolHandle< MuonCalib::IIdToFixedIdToolm_idToFixedIdTool {this, "IdToFixedIdTool", "MuonCalib::IdToFixedIdTool"}
 
Gaudi::Property< double > m_prop_beta {this, "PropagationSpeedBeta", 1., "Speed of the signal propagation"}
 
Gaudi::Property< unsigned int > m_maxOrder {this, "MaxOrder", 9, "Maximum order of the polynomial fit"}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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 28 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h.

Member Typedef Documentation

◆ RtMap

◆ RtRelationPtr

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TubeContainerPtr

Constructor & Destructor Documentation

◆ MdtCalibDbAlg()

MdtCalibDbAlg::MdtCalibDbAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 28 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

28  :
29  AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MdtCalibDbAlg()

virtual MuonCalibR4::MdtCalibDbAlg::~MdtCalibDbAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode MdtCalibDbAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 42 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

42  {
43  ATH_MSG_VERBOSE("Executing MdtCalibDbAlgR4");
45  if(writeHandle.isValid()) {
46  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.");
47  return StatusCode::SUCCESS;
48  }
49  writeHandle.addDependency(EventIDRange(IOVInfiniteRange::infiniteRunLB()));
50  RegionGranularity gran{RegionGranularity::OnePerMultiLayer};
51  auto writeCdo = std::make_unique<MuonCalib::MdtCalibDataContainer>(m_idHelperSvc.get(), gran);
52 
53  ATH_CHECK(loadRt(ctx,*writeCdo));
54  ATH_CHECK(loadTube(*writeCdo));
55 
56  ATH_CHECK(writeHandle.record(std::move(writeCdo)));
57 
58 
59  return StatusCode::SUCCESS;
60 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode MdtCalibDbAlg::initialize ( )
overridevirtual

Definition at line 31 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

31  {
32  ATH_MSG_VERBOSE("Initialize...");
33  ATH_CHECK(m_idHelperSvc.retrieve());
34  ATH_CHECK(m_idToFixedIdTool.retrieve());
39  return StatusCode::SUCCESS;
40 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isReEntrant()

virtual bool MuonCalibR4::MdtCalibDbAlg::isReEntrant ( ) const
inlineoverridevirtual

Definition at line 35 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h.

35 {return false;}

◆ loadRt()

StatusCode MdtCalibDbAlg::loadRt ( const EventContext &  ctx,
MuonCalib::MdtCalibDataContainer writeCdo 
) const
private

Definition at line 62 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

62  {
63  ATH_MSG_DEBUG("loadRt " << name());
64 
65 
66  SG::ReadCondHandle readHandleRt{m_readKeyRt, ctx};
67  if(!readHandleRt.isValid()) {
68  ATH_MSG_ERROR("No RT data found in " << m_readKeyRt.key());
69  return StatusCode::FAILURE;
70  }
71 
72  std::unordered_map<Identifier, RtPayload> rtCalibration{};
73  for(CondAttrListCollection::const_iterator it = readHandleRt->begin();
74  it != readHandleRt->end(); ++it) {
75  if(!readRtPayload(it->second, rtCalibration)) {
76  ATH_MSG_ERROR("Failed to read RT payload");
77  return StatusCode::FAILURE;
78  }
79  }
80 
81  std::vector<const MuonGMR4::MdtReadoutElement*> detEls = m_r4detMgr->getAllMdtReadoutElements();
82  for(const MuonGMR4::MuonReadoutElement* mdtDetEl : detEls){
83  const Identifier& detElId = mdtDetEl->identify();
84  ATH_MSG_DEBUG("Adding Rt relation for detector element " << m_idHelperSvc->toString(detElId));
85  if(writeHandle.hasDataForChannel(detElId, msgStream())) {
86  const MuonCalib::MdtFullCalibData* dataObj = writeHandle.getCalibData(detElId, msgStream());
87  if(dataObj->rtRelation) {
88  ATH_MSG_DEBUG("Rt relation constants for " << m_idHelperSvc->toString(detElId) << " already exist");
89  continue;
90  }
91  }
92  //find the calibration data for this detector element
93  auto it = rtCalibration.find(detElId);
94  RtPayload payload{};
95  if(it == rtCalibration.end()) {
96  // payload is not appearing in database for multilayer 2, so default it to multilayer 1 calibration
97  if(m_idHelperSvc->mdtIdHelper().multilayer(detElId) == 2) {
98  //try to find the calibration data for multilayer 1
99  Identifier ml1Id = m_idHelperSvc->mdtIdHelper().elementID(m_idHelperSvc->stationName(detElId),
100  m_idHelperSvc->stationEta(detElId),
101  m_idHelperSvc->stationPhi(detElId));
102  Identifier mlID = m_idHelperSvc->mdtIdHelper().multilayerID(ml1Id, 1);
103  it = rtCalibration.find(mlID);
104  if(it == rtCalibration.end()) {
105  ATH_MSG_WARNING("No calibration data found for " << m_idHelperSvc->toString(ml1Id) << " Identifier is " << ml1Id);
106  continue;
107  } else {
108  ATH_MSG_DEBUG("Identifier " << m_idHelperSvc->toString(detElId) << " not found, using multilayer 1 calibration");
109  payload = it->second;
110  }
111  }
112  } else{
113  ATH_MSG_DEBUG("Found calibration data for " << m_idHelperSvc->toString(detElId) << " Identifier is " << detElId);
114  payload = it->second;
115 
116  }
117 
118  //extract rt parameters
119  std::vector<MuonCalib::SamplePoint> samplePointsRt{};
120  for(size_t i = 0; i < payload.times.size(); ++i) {
121  //remap t to [-1,1] range
122  const double chebyShevT = 2.*(payload.times[i] - 0.5*(payload.times.front() + payload.times.back())) / (payload.times.back() - payload.times.front());
123  samplePointsRt.emplace_back(chebyShevT, payload.radii[i], payload.resolutions[i]);
124  }
125 
126  MuonCalib::CalibFunc::ParVec rtPars{payload.times.front(), payload.times.back()}, resolutionPars{};
128  fitter.fit_parameters(samplePointsRt, 1, samplePointsRt.size(), MuonCalib::ChebyshevPolynomial{});
129  for(const double c : fitter.coefficients()) {
130  ATH_MSG_DEBUG("rtPars: " << c);
131  rtPars.push_back(c);
132  }
133 
134  //Extract tr parameters
135  std::vector<MuonCalib::SamplePoint> samplePointsTr{};
136  for(size_t i = 0; i < payload.radii.size(); ++i) {
137  //remap r to [-1,1] range
138  const double chebyShevR = 2.*(payload.radii[i] - 0.5*(payload.radii.front() + payload.radii.back())) / (payload.radii.back() - payload.radii.front());
139  samplePointsTr.emplace_back(chebyShevR, payload.times[i], payload.resolutions[i]);
140  }
141  MuonCalib::CalibFunc::ParVec trPars{payload.radii.front(), payload.radii.back()};
142  fitter.fit_parameters(samplePointsTr, 1, samplePointsTr.size(), MuonCalib::ChebyshevPolynomial{});
143  for(const double c : fitter.coefficients()) {
144  ATH_MSG_DEBUG("trPars: " << c);
145  trPars.push_back(c);
146  }
147 
148  auto rtRelRegion{std::make_shared<MuonCalib::RtChebyshev>(rtPars)};
149  auto rtResRegion{std::make_shared<MuonCalibR4::RtResolutionSqrt>(resolutionPars)};
150  auto trRelRegion{std::make_shared<MuonCalib::TrChebyshev>(rtRelRegion, trPars)};
151  RtRelationPtr MdtRt = std::make_unique<MuonCalib::MdtRtRelation>(std::move(rtRelRegion), std::move(rtResRegion), std::move(trRelRegion), 0.);
152  if(!writeHandle.storeData(detElId, MdtRt, msgStream())) {
153  ATH_MSG_ERROR("Failed to store Rt for " << m_idHelperSvc->toString(detElId));
154  return StatusCode::FAILURE;
155  }
156  }
157  return StatusCode::SUCCESS;
158 }

◆ loadTube()

StatusCode MdtCalibDbAlg::loadTube ( MuonCalib::MdtCalibDataContainer writeCdo) const
private

Definition at line 160 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

160  {
161  ATH_MSG_DEBUG("loadTube " << name());
162  SG::ReadCondHandle readHandleTube{m_readKeyTube};
163  if(!readHandleTube.isValid()) {
164  ATH_MSG_ERROR("No tube data found in " << m_readKeyTube.key());
165  return StatusCode::FAILURE;
166  }
167  std::unordered_map<Identifier, RtTubePayload> tubeCalibration{};
168  for(CondAttrListCollection::const_iterator it = readHandleTube->begin();
169  it != readHandleTube->end(); ++it) {
170  if(!readTubePayload(it->second, tubeCalibration)) {
171  ATH_MSG_ERROR("Failed to read tube payload");
172  return StatusCode::FAILURE;
173  }
174  }
175  const double inversePropSpeed = 1. / (Gaudi::Units::c_light * m_prop_beta);
176  std::vector<const MuonGMR4::MdtReadoutElement*> detEls = m_r4detMgr->getAllMdtReadoutElements();
177  for(const MuonGMR4::MdtReadoutElement* mdtDetEl: detEls){
178  const Identifier& chamberId = mdtDetEl->identify();
179  if(writeCdo.hasDataForChannel(chamberId, msgStream())) {
180  if(writeCdo.getCalibData(chamberId, msgStream())->tubeCalib) {
181  ATH_MSG_DEBUG("Tube calibration constants for " << m_idHelperSvc->toString(chamberId) << " already exist");
182  continue;
183  }
184  }
185  TubeContainerPtr tubes = std::make_unique<MuonCalib::MdtTubeCalibContainer>(m_idHelperSvc.get(), chamberId);
186  if(!writeCdo.storeData(chamberId, tubes, msgStream())) {
187  ATH_MSG_FATAL("Failed to store chamber " << m_idHelperSvc->toString(chamberId));
188  return StatusCode::FAILURE;
189  }
190  for(std::size_t layer = 1; layer <= mdtDetEl->numLayers(); ++layer){
191  for(std::size_t tube = 1; tube <= mdtDetEl->numTubesInLay(); ++tube){
192  const Identifier tubeId{mdtDetEl->measurementId(mdtDetEl->measurementHash(layer, tube))};
193  auto it = tubeCalibration.find(tubeId);
194  if(it == tubeCalibration.end()) {
195  ATH_MSG_WARNING("No calibration data found for " << m_idHelperSvc->toString(tubeId));
196  continue;
197  }
198  const RtTubePayload& payload = it->second;
200  tubeCalibration.statusCode = payload.statusCode;
201  tubeCalibration.inversePropSpeed = inversePropSpeed;
202  tubeCalibration.t0 = payload.tZero;
203  tubeCalibration.adcCal = payload.meanAdc;
204  if(!tubes->setCalib(std::move(tubeCalibration), tubeId, msgStream())) {
205  ATH_MSG_ERROR("Failed to store tube calibration for " << m_idHelperSvc->toString(tubeId));
206  return StatusCode::FAILURE;
207  }
208  }
209  }
210  }
211  return StatusCode::SUCCESS;
212 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ readRtPayload()

StatusCode MdtCalibDbAlg::readRtPayload ( const coral::AttributeList &  attributeList,
std::unordered_map< Identifier, RtPayload > &  rtCalibration 
) const
private

Definition at line 214 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

214  {
215  ATH_MSG_DEBUG("readRtPayload " << name());
216  std::string data{}, delim{};
217  if (attributeList["data"].specification().type() == typeid(coral::Blob)) {
218  if (!CoralUtilities::readBlobAsString(attributeList["data"].data<coral::Blob>(), data)) {
219  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
220  return StatusCode::FAILURE;
221  }
222  delim = "\n";
223  } else {
224  data = *(static_cast<const std::string *>((attributeList["data"]).addressOfData()));
225  delim = " ";
226  }
227  const std::vector<std::string> tokens = CxxUtils::tokenize(data, delim);
228  if (tokens.size() < 2) {
229  ATH_MSG_FATAL("The line "<<data<<" cannot be resolved into header & payload");
230  return StatusCode::FAILURE;
231  }
232  const std::string& header = tokens[0];
233  const std::string& payload = tokens[1];
234  const std::vector<int> tokensHeader = CxxUtils::tokenizeInt(header, ",");
235  if(tokensHeader.size()< 2){
236  ATH_MSG_FATAL("Failed to deduce extract number of points & calib Identifier from "<<header);
237  return StatusCode::FAILURE;
238  }
239  const std::size_t calibId = tokensHeader[0];
240  const std::size_t numPoints = tokensHeader[1];
241  MuonCalib::MuonFixedId id(calibId);
242  if (!id.is_mdt()) {
243  ATH_MSG_FATAL("Found non-MDT MuonFixedId, continuing...");
244  return StatusCode::FAILURE;
245  }
246  const Identifier athenaId = m_idToFixedIdTool->fixedIdToId(id);
247  if (!m_idHelperSvc->isMuon(athenaId)) {
248  ATH_MSG_WARNING("The translation from the calibration ID with station: "
249  <<id.stationNameString()<<"("<<id.stationName()<<") "
250  <<" eta:"<<id.eta()<<" phi: "<<id.phi());
251  }
252 
253  RtPayload channelPayload{};
254  channelPayload.station = m_idHelperSvc->stationNameString(athenaId);
255  channelPayload.eta = m_idHelperSvc->stationEta(athenaId);
256  channelPayload.phi = m_idHelperSvc->stationPhi(athenaId);
257  channelPayload.ml = m_idHelperSvc->mdtIdHelper().multilayer(athenaId);
258  channelPayload.layer = m_idHelperSvc->mdtIdHelper().tubeLayer(athenaId);
259  channelPayload.tube = m_idHelperSvc->mdtIdHelper().tube(athenaId);
260  channelPayload.appliedRT = (attributeList["tech"].data<int>());
261 
262  const std::vector<double> dataPoints = CxxUtils::tokenizeDouble(payload, ",");
263  if (dataPoints.size() % 3 != 0) {
264  ATH_MSG_FATAL("Payload does not contain a multiple of 3 elements. Size: " << dataPoints.size());
265  return StatusCode::FAILURE;
266  }
267 
268  // Calculate expected number of data points
269  const std::size_t expectedPoints = dataPoints.size() / 3;
270  if (expectedPoints != numPoints) {
271  ATH_MSG_FATAL("Number of data points (" << expectedPoints << ") does not match numPoints in header (" << numPoints << ").");
272  return StatusCode::FAILURE;
273  }
274 
275  std::vector<double> radii(expectedPoints);
276  std::vector<double> times(expectedPoints);
277  std::vector<double> resos(expectedPoints);
278 
279  for (size_t i = 0; i < expectedPoints; ++i) {
280  radii[i] = dataPoints[i * 3];
281  times[i] = dataPoints[i * 3 + 1];
282  resos[i] = dataPoints[i * 3 + 2];
283  }
284  channelPayload.radii = std::move(radii);
285  channelPayload.times = std::move(times);
286  channelPayload.resolutions = std::move(resos);
287 
288  rtCalibration[athenaId] = std::move(channelPayload);
289  return StatusCode::SUCCESS;
290 }

◆ readTubePayload()

StatusCode MdtCalibDbAlg::readTubePayload ( const coral::AttributeList &  attributeList,
std::unordered_map< Identifier, RtTubePayload > &  tubeCalibration 
) const
private

Definition at line 292 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx.

292  {
293  ATH_MSG_DEBUG("readTubePayload " << name());
294 
295  std::string data;
296  if (attributeList["data"].specification().type() == typeid(coral::Blob)) {
297  ATH_MSG_VERBOSE("Loading data as a BLOB, uncompressing...");
298  if (!CoralUtilities::readBlobAsString(attributeList["data"].data<coral::Blob>(), data)) {
299  ATH_MSG_FATAL("Cannot uncompress BLOB! Aborting...");
300  return StatusCode::FAILURE;
301  }
302  } else {
303  data = *(static_cast<const std::string*>(attributeList["data"].addressOfData()));
304  }
305 
306  const std::vector<std::string> tokens = CxxUtils::tokenize(data, "\n");
307  if (tokens.size() < 2) {
308  ATH_MSG_FATAL("The line " << data << " cannot be resolved into header & payload");
309  return StatusCode::FAILURE;
310  }
311 
312  std::string header = tokens[0];
313  const std::string& payload = tokens[1];
314 
315  std::string stName = header.substr(2, 3);
316  std::replace(header.begin(), header.end(), '_', ',');
317  const std::vector<std::string> headerTokens = CxxUtils::tokenize(header, ",");
318 
319  if (headerTokens.size() < 6) { // expecting at least 6 tokens
320  ATH_MSG_FATAL("Invalid header format: " << header);
321  return StatusCode::FAILURE;
322  }
323 
324  int phi = std::atoi(headerTokens[1].c_str());
325  int eta = std::atoi(headerTokens[2].c_str());
326  Identifier chamID = m_idHelperSvc->mdtIdHelper().elementID(stName, eta, phi);
327 
328  RtTubePayload channelPayload{};
329  channelPayload.station = stName;
330  channelPayload.eta = eta;
331  channelPayload.phi = phi;
332  channelPayload.appliedT0 = (attributeList["tech"].data<int>());
333 
334  const std::vector<double> payLoadData = CxxUtils::tokenizeDouble(payload, ",");
335  if (payLoadData.size() % 3 != 0) {
336  ATH_MSG_FATAL("Payload size is not a multiple of 3. Size: " << payLoadData.size());
337  return StatusCode::FAILURE;
338  }
339 
340  std::size_t numPoints = payLoadData.size() / 3;
341  std::vector<double> tZeros, meanAdcs;
342  std::vector<int> statusCodes;
343 
344  tZeros.reserve(numPoints);
345  meanAdcs.reserve(numPoints);
346  statusCodes.reserve(numPoints);
347 
348  for (std::size_t i = 0; i < payLoadData.size(); i += 3) {
349  tZeros.push_back(payLoadData[i]);
350  statusCodes.push_back(static_cast<int>(payLoadData[i + 1]));
351  meanAdcs.push_back(payLoadData[i + 2]);
352  }
353 
354  if (statusCodes.size() != tZeros.size() || statusCodes.size() != meanAdcs.size() || statusCodes.empty()) {
355  ATH_MSG_FATAL("Inconsistent payload data sizes for chamber " << m_idHelperSvc->toStringChamber(chamID));
356  return StatusCode::FAILURE;
357  }
358 
359  int ml = 1, layer = 1, tube = 1;
360  const int numMl = m_idHelperSvc->mdtIdHelper().numberOfMultilayers(chamID);
361  const Identifier secondMlID = m_idHelperSvc->mdtIdHelper().multilayerID(chamID, numMl);
362  const int tubesPerLay = std::max(m_idHelperSvc->mdtIdHelper().tubeMax(chamID),
363  m_idHelperSvc->mdtIdHelper().tubeMax(secondMlID));
364  const int numLayers = std::max(m_idHelperSvc->mdtIdHelper().tubeLayerMax(chamID),
365  m_idHelperSvc->mdtIdHelper().tubeLayerMax(secondMlID));
366 
367  for(std::size_t i = 0; i < tZeros.size(); ++i){
368  Identifier tubeID = m_idHelperSvc->mdtIdHelper().channelID(chamID, ml, layer, tube);
369  RtTubePayload tubePayload = channelPayload;
370  tubePayload.ml = ml;
371  tubePayload.layer = layer;
372  tubePayload.tube = tube;
373  tubePayload.tZero = tZeros[i];
374  tubePayload.meanAdc = meanAdcs[i];
375  tubePayload.statusCode = statusCodes[i];
376  tubeCalibration[tubeID] = std::move(tubePayload);
377  if (++tube > tubesPerLay) {
378  tube = 1;
379  if (++layer > numLayers) {
380  layer = 1;
381  ++ml;
382  }
383  }
384  }
385  return StatusCode::SUCCESS;
386 }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonCalibR4::MdtCalibDbAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

◆ m_idToFixedIdTool

ToolHandle<MuonCalib::IIdToFixedIdTool> MuonCalibR4::MdtCalibDbAlg::m_idToFixedIdTool {this, "IdToFixedIdTool", "MuonCalib::IdToFixedIdTool"}
private

◆ m_maxOrder

Gaudi::Property<unsigned int> MuonCalibR4::MdtCalibDbAlg::m_maxOrder {this, "MaxOrder", 9, "Maximum order of the polynomial fit"}
private

◆ m_prop_beta

Gaudi::Property<double> MuonCalibR4::MdtCalibDbAlg::m_prop_beta {this, "PropagationSpeedBeta", 1., "Speed of the signal propagation"}
private

◆ m_r4detMgr

const MuonGMR4::MuonDetectorManager* MuonCalibR4::MdtCalibDbAlg::m_r4detMgr {nullptr}
private

◆ m_readKeyRt

SG::ReadCondHandleKey<CondAttrListCollection> MuonCalibR4::MdtCalibDbAlg::m_readKeyRt {this, "ReadKeyRt", "/MDT/RTBLOB", "DB folder containing the RT calibrations"}
private

◆ m_readKeyTube

SG::ReadCondHandleKey<CondAttrListCollection> MuonCalibR4::MdtCalibDbAlg::m_readKeyTube {this, "ReadKeyTube", "/MDT/T0BLOB", "DB folder containing the tube constants"}
private

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<MuonCalib::MdtCalibDataContainer> MuonCalibR4::MdtCalibDbAlg::m_writeKey
private
Initial value:
{this, "WriteKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}

Definition at line 75 of file MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
MuonCalibR4::MdtCalibDbAlg::readTubePayload
StatusCode readTubePayload(const coral::AttributeList &attributeList, std::unordered_map< Identifier, RtTubePayload > &tubeCalibration) const
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx:292
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
test_pyathena.eta
eta
Definition: test_pyathena.py:10
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
GeoModel::TransientConstSharedPtr< MdtTubeCalibContainer >
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CxxUtils::tokenizeDouble
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:34
header
Definition: hcg.cxx:526
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
MuonCalib::ChebyshevPolynomial
Definition: ChebyshevPolynomial.h:17
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
CxxUtils::tokenizeInt
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:55
MuonCalib::MdtCalibDataContainer::storeData
bool storeData(const Identifier &mlID, CorrectionPtr corrFuncSet, MsgStream &msg)
Definition: MdtCalibDataContainer.cxx:49
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
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
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
MuonCalib::MdtFullCalibData::rtRelation
RtRelationPtr rtRelation
Definition: MdtFullCalibData.h:21
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
MuonCalibR4::MdtCalibDbAlg::m_readKeyTube
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyTube
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:80
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
MuonCalib::MdtFullCalibData
class which holds the full set of calibration constants for a given tube
Definition: MdtFullCalibData.h:15
MuonCalibR4::MdtCalibDbAlg::readRtPayload
StatusCode readRtPayload(const coral::AttributeList &attributeList, std::unordered_map< Identifier, RtPayload > &rtCalibration) const
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx:214
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::statusCode
unsigned int statusCode
Definition: MdtTubeCalibContainer.h:26
MuonCalibR4::MdtCalibDbAlg::loadTube
StatusCode loadTube(MuonCalib::MdtCalibDataContainer &writeCdo) const
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx:160
MuonCalib::BaseFunctionFitter
Definition: BaseFunctionFitter.h:39
MuonCalib::MdtFullCalibData::tubeCalib
TubeContainerPtr tubeCalib
Definition: MdtFullCalibData.h:22
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonCalibR4::MdtCalibDbAlg::m_idToFixedIdTool
ToolHandle< MuonCalib::IIdToFixedIdTool > m_idToFixedIdTool
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:81
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
CoralUtilities::readBlobAsString
bool readBlobAsString(const coral::Blob &, std::string &)
Definition: blobaccess.cxx:85
MuonCalibR4::MdtCalibDbAlg::m_r4detMgr
const MuonGMR4::MuonDetectorManager * m_r4detMgr
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:74
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
IOVInfiniteRange::infiniteRunLB
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
Definition: IOVInfiniteRange.h:39
MuonCalib::CalibFunc::ParVec
std::vector< double > ParVec
Definition: CalibFunc.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalibR4::MdtCalibDbAlg::m_readKeyRt
SG::ReadCondHandleKey< CondAttrListCollection > m_readKeyRt
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:78
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
RegionGranularity
MdtCalibDataContainer::RegionGranularity RegionGranularity
Definition: MuonConditions/MuonCondGeneral/MuonCondAlg/src/MdtCalibDbAlg.cxx:47
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
MuonCalibR4::MdtCalibDbAlg::m_maxOrder
Gaudi::Property< unsigned int > m_maxOrder
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:84
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
MuonGMR4::MdtReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:22
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalibR4::MdtCalibDbAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:73
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
MuonCalib::MdtCalibDataContainer::getCalibData
const MdtFullCalibData * getCalibData(const Identifier &measId, MsgStream &msg) const
Returns the calibration data associated with this station
Definition: MdtCalibDataContainer.cxx:38
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
MuonCalibR4::MdtCalibDbAlg::m_prop_beta
Gaudi::Property< double > m_prop_beta
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:83
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCalibR4::MdtCalibDbAlg::m_writeKey
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:75
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
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
MuonCalibR4::MdtCalibDbAlg::RtRelationPtr
MuonCalib::MdtFullCalibData::RtRelationPtr RtRelationPtr
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.h:64
MuonCalib::MdtCalibDataContainer::hasDataForChannel
bool hasDataForChannel(const Identifier &measId, MsgStream &msg) const
Checks whether a calibration data object is already present.
Definition: MdtCalibDataContainer.cxx:33
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition: MdtTubeCalibContainer.h:18
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
MuonCalibR4::MdtCalibDbAlg::loadRt
StatusCode loadRt(const EventContext &ctx, MuonCalib::MdtCalibDataContainer &writeCdo) const
Definition: MuonPhaseII/MuonConditions/MuonCondAlgR4/src/MdtCalibDbAlg.cxx:62
python.compressB64.c
def c
Definition: compressB64.py:93
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
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
plot_times.times
def times(fn)
Definition: plot_times.py:11
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14