ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalib::IdToFixedIdTool Class Reference

Tool responsible for wrapping the athena dependent Identifier class to a standalone Calib-EDM MuonFixedId identifier. More...

#include <IdToFixedIdTool.h>

Inheritance diagram for MuonCalib::IdToFixedIdTool:
Collaboration diagram for MuonCalib::IdToFixedIdTool:

Public Member Functions

 IdToFixedIdTool (const std::string &type, const std::string &name, const IInterface *parent)
 AlgTool constructor.
virtual ~IdToFixedIdTool ()=default
virtual StatusCode initialize () override
 IdToFixedIdTool initialization: retrieve all the IdHelpers needed to do strap the ATHENA Identifier.
void print (const Identifier &id) const override
 print method to output an ATHENA Identifier, warning the user when the conversion and reconversion yields different results.
void print (const MuonFixedId &fid) const override
 dump MuonFixedId
void print (const MuonFixedLongId &fid) const override
 dump MuonFixedLongId
Identifier fixedIdToId (const MuonFixedId &fid) const override
 Convert MuonFixedId to ATHENA Identifier.
MuonFixedId idToFixedId (const Identifier &id) const override
 Convert ATHENA Identifier to MuonFixedId.
Identifier fixedLongIdToId (const MuonFixedLongId &fid) const override
 Convert MuonFixedLongId to ATHENA Identifier.
MuonFixedLongId idToFixedLongId (const Identifier &id) const override
 Convert ATHENA Identifier to MuonFixedLongId.
Identifier regionKeyToId (std::string region) const override
 Returns an ATHENA Identifier for a given Region key.
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 ()
 retrieve Interface ID

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
int m_print_level
 Sets printlevel of output.
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

Tool responsible for wrapping the athena dependent Identifier class to a standalone Calib-EDM MuonFixedId identifier.

The athena-dependent Indentifier relies on idHelpers in order to decode the content. A MuonFixedId has methods itself to decode the content of the identifier.

Author
Zdenk.nosp@m.o.Va.nosp@m.n.Kes.nosp@m.tere.nosp@m.n@cer.nosp@m.n.ch

Definition at line 40 of file IdToFixedIdTool.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

◆ IdToFixedIdTool()

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

AlgTool constructor.

Definition at line 16 of file IdToFixedIdTool.cxx.

16 :
17 AthAlgTool(t, n, p), m_print_level(0) {
18 declareInterface<IIdToFixedIdTool>(this);
19 declareProperty("print_level", m_print_level);
20 }
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int m_print_level
Sets printlevel of output.

◆ ~IdToFixedIdTool()

virtual MuonCalib::IdToFixedIdTool::~IdToFixedIdTool ( )
virtualdefault

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

◆ fixedIdToId()

Identifier MuonCalib::IdToFixedIdTool::fixedIdToId ( const MuonFixedId & fid) const
overridevirtual

Convert MuonFixedId to ATHENA Identifier.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 88 of file IdToFixedIdTool.cxx.

88 {
89 Identifier tmp;
90 if (fid.is_mdt()) {
91 tmp = m_idHelperSvc->mdtIdHelper().channelID(fid.stationNameString(), fid.eta(), fid.phi(), fid.mdtMultilayer(),
92 fid.mdtTubeLayer(), fid.mdtTube());
93 } else if (fid.is_rpc()) {
94 tmp =
95 m_idHelperSvc->rpcIdHelper().channelID(fid.stationNameString(), fid.eta(), fid.phi(), fid.rpcDoubletR(), fid.rpcDoubletZ(),
96 fid.rpcDoubletPhi(), fid.rpcGasGap(), fid.rpcMeasuresPhi(), fid.rpcStrip());
97 } else if (m_idHelperSvc->hasCSC() && fid.is_csc()) {
98 tmp = m_idHelperSvc->cscIdHelper().channelID(fid.stationNameString(), fid.eta(), fid.phi(), fid.cscChamberLayer(),
99 fid.cscWireLayer(), fid.cscMeasuresPhi(), fid.cscStrip());
100 } else if (fid.is_tgc()) {
101 tmp = m_idHelperSvc->tgcIdHelper().channelID(fid.stationNameString(), fid.eta(), fid.phi(), fid.tgcGasGap(), fid.tgcIsStrip(),
102 fid.tgcChannel());
103 }
104 return tmp;
105 }
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc

◆ fixedLongIdToId()

Identifier MuonCalib::IdToFixedIdTool::fixedLongIdToId ( const MuonFixedLongId & fid) const
overridevirtual

Convert MuonFixedLongId to ATHENA Identifier.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 206 of file IdToFixedIdTool.cxx.

206 {
207 Identifier tmp;
208 if (fid.is_mdt()) {
209 tmp = m_idHelperSvc->mdtIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(), fid.mdtMultilayer(),
210 fid.mdtTubeLayer(), fid.mdtTube());
211 } else if (fid.is_rpc()) {
212 tmp =
213 m_idHelperSvc->rpcIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(), fid.rpcDoubletR(), fid.rpcDoubletZ(),
214 fid.rpcDoubletPhi(), fid.rpcGasGap(), fid.rpcMeasuresPhi(), fid.rpcStrip());
215 } else if (m_idHelperSvc->hasCSC() && fid.is_csc()) {
216 tmp = m_idHelperSvc->cscIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(), fid.cscChamberLayer(),
217 fid.cscWireLayer(), fid.cscMeasuresPhi(), fid.cscStrip());
218 } else if (fid.is_tgc()) {
219 tmp = m_idHelperSvc->tgcIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(), fid.tgcGasGap(), fid.tgcIsStrip(),
220 fid.tgcChannel());
221 } else if (fid.is_mmg()) {
222 tmp = m_idHelperSvc->mmIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(),
223 fid.mmgMultilayer(), fid.mmgGasGap(), fid.mmgStrip());
224 } else if (fid.is_stg()) {
225 // Convert the channel type enum
227 switch (fid.stgChannelType()) {
230 break;
233 break;
236 break;
237 default:
238 ATH_MSG_WARNING("Cannot convert StgChannelType");
239 break;
240 }
241 tmp = m_idHelperSvc->stgcIdHelper().channelID(std::string(fid.stationNameString()), fid.eta(), fid.phi(),
242 fid.stgMultilayer(), fid.stgGasGap(), channelType, fid.stgChannel());
243 }
244 return tmp;
245 }
#define ATH_MSG_WARNING(x)

◆ idToFixedId()

MuonFixedId MuonCalib::IdToFixedIdTool::idToFixedId ( const Identifier & id) const
overridevirtual

Convert ATHENA Identifier to MuonFixedId.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 28 of file IdToFixedIdTool.cxx.

28 {
29 bool done{false};
30 MuonFixedId fixedId;
31
32 if (!(m_idHelperSvc->isMuon(id))) {
33 ATH_MSG_DEBUG(" MuonIdentifier doesn't correspond to a muon ");
34 } else {
35 // setting the Muon specific fields
36 done = fixedId.setStationName(fixedId.stationStringToFixedStationNumber(
37 m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(id))));
38 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (general) ");
39 if (m_idHelperSvc->isMdt(id)) {
40 done = fixedId.setTechnology(0); // MDT = 0;
41 // setting the Mdt specific fields
42 if (done) done = fixedId.setStationEta(m_idHelperSvc->mdtIdHelper().stationEta(id));
43 if (done) done = fixedId.setStationPhi(m_idHelperSvc->mdtIdHelper().stationPhi(id));
44
45 if (done) done = fixedId.setMdtTube(m_idHelperSvc->mdtIdHelper().tube(id));
46 if (done) done = fixedId.setMdtTubeLayer(m_idHelperSvc->mdtIdHelper().tubeLayer(id));
47 if (done) done = fixedId.setMdtMultilayer(m_idHelperSvc->mdtIdHelper().multilayer(id));
48 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (MDT) ");
49 } else if (m_idHelperSvc->isRpc(id)) {
50 done = fixedId.setTechnology(3); // RPC = 3;
51 // setting the Rpc specific fields
52 if (done) done = fixedId.setStationEta(m_idHelperSvc->rpcIdHelper().stationEta(id));
53 if (done) done = fixedId.setStationPhi(m_idHelperSvc->rpcIdHelper().stationPhi(id));
54
55 if (done) done = fixedId.setRpcDoubletR(m_idHelperSvc->rpcIdHelper().doubletR(id));
56 if (done) done = fixedId.setRpcDoubletZ(m_idHelperSvc->rpcIdHelper().doubletZ(id));
57 if (done) done = fixedId.setRpcDoubletPhi(m_idHelperSvc->rpcIdHelper().doubletPhi(id));
58 if (done) done = fixedId.setRpcGasGap(m_idHelperSvc->rpcIdHelper().gasGap(id));
59 if (done) done = fixedId.setRpcMeasuresPhi(m_idHelperSvc->rpcIdHelper().measuresPhi(id));
60 if (done) done = fixedId.setRpcStrip(m_idHelperSvc->rpcIdHelper().strip(id));
61 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (RPC) ");
62 } else if (m_idHelperSvc->isCsc(id)) {
63 done = fixedId.setTechnology(1); // CSC = 1;
64 // setting the Csc specific fields
65 if (done) done = fixedId.setStationEta(m_idHelperSvc->cscIdHelper().stationEta(id));
66 if (done) done = fixedId.setStationPhi(m_idHelperSvc->cscIdHelper().stationPhi(id));
67
68 if (done) done = fixedId.setCscChamberLayer(m_idHelperSvc->cscIdHelper().chamberLayer(id));
69 if (done) done = fixedId.setCscWireLayer(m_idHelperSvc->cscIdHelper().wireLayer(id));
70 if (done) done = fixedId.setCscMeasuresPhi(m_idHelperSvc->cscIdHelper().measuresPhi(id));
71 if (done) done = fixedId.setCscStrip(m_idHelperSvc->cscIdHelper().strip(id));
72 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (CSC) ");
73 } else if (m_idHelperSvc->isTgc(id)) {
74 done = fixedId.setTechnology(2); // TGC = 2;
75 // setting the Tgc specific fields
76 if (done) done = fixedId.setStationEta(m_idHelperSvc->tgcIdHelper().stationEta(id));
77 if (done) done = fixedId.setStationPhi(m_idHelperSvc->tgcIdHelper().stationPhi(id));
78
79 if (done) done = fixedId.setTgcGasGap(m_idHelperSvc->tgcIdHelper().gasGap(id));
80 if (done) done = fixedId.setTgcIsStrip(m_idHelperSvc->tgcIdHelper().isStrip(id));
81 if (done) done = fixedId.setTgcChannel(m_idHelperSvc->tgcIdHelper().channel(id));
82 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (TGC) ");
83 }
84 }
85 return fixedId;
86 }
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)

◆ idToFixedLongId()

MuonFixedLongId MuonCalib::IdToFixedIdTool::idToFixedLongId ( const Identifier & id) const
overridevirtual

Convert ATHENA Identifier to MuonFixedLongId.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 107 of file IdToFixedIdTool.cxx.

107 {
108 bool done{false};
109 MuonFixedLongId fixedId;
110
111 if (!(m_idHelperSvc->isMuon(id))) {
112 ATH_MSG_DEBUG(" MuonIdentifier doesn't correspond to a muon ");
113 } else {
114 // setting the Muon specific fields
115 done = fixedId.setStationName(fixedId.stationStringToFixedStationNumber(
116 m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(id))));
117 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (general) ");
118 if (m_idHelperSvc->isMdt(id)) {
119 done = fixedId.setTechnology(MuonFixedLongId::technologyMDT); // MDT = 0;
120 // setting the Mdt specific fields
121 if (done) done = fixedId.setStationEta(m_idHelperSvc->mdtIdHelper().stationEta(id));
122 if (done) done = fixedId.setStationPhi(m_idHelperSvc->mdtIdHelper().stationPhi(id));
123
124 if (done) done = fixedId.setMdtTube(m_idHelperSvc->mdtIdHelper().tube(id));
125 if (done) done = fixedId.setMdtTubeLayer(m_idHelperSvc->mdtIdHelper().tubeLayer(id));
126 if (done) done = fixedId.setMdtMultilayer(m_idHelperSvc->mdtIdHelper().multilayer(id));
127 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (MDT) ");
128 } else if (m_idHelperSvc->isRpc(id)) {
129 done = fixedId.setTechnology(MuonFixedLongId::technologyRPC); // RPC = 3;
130 // setting the Rpc specific fields
131 if (done) done = fixedId.setStationEta(m_idHelperSvc->rpcIdHelper().stationEta(id));
132 if (done) done = fixedId.setStationPhi(m_idHelperSvc->rpcIdHelper().stationPhi(id));
133
134 if (done) done = fixedId.setRpcDoubletR(m_idHelperSvc->rpcIdHelper().doubletR(id));
135 if (done) done = fixedId.setRpcDoubletZ(m_idHelperSvc->rpcIdHelper().doubletZ(id));
136 if (done) done = fixedId.setRpcDoubletPhi(m_idHelperSvc->rpcIdHelper().doubletPhi(id));
137 if (done) done = fixedId.setRpcGasGap(m_idHelperSvc->rpcIdHelper().gasGap(id));
138 if (done) done = fixedId.setRpcMeasuresPhi(m_idHelperSvc->rpcIdHelper().measuresPhi(id));
139 if (done) done = fixedId.setRpcStrip(m_idHelperSvc->rpcIdHelper().strip(id));
140 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (RPC) ");
141 } else if (m_idHelperSvc->isCsc(id)) {
142 done = fixedId.setTechnology(MuonFixedLongId::technologyCSC); // CSC = 1;
143 // setting the Csc specific fields
144 if (done) done = fixedId.setStationEta(m_idHelperSvc->cscIdHelper().stationEta(id));
145 if (done) done = fixedId.setStationPhi(m_idHelperSvc->cscIdHelper().stationPhi(id));
146
147 if (done) done = fixedId.setCscChamberLayer(m_idHelperSvc->cscIdHelper().chamberLayer(id));
148 if (done) done = fixedId.setCscWireLayer(m_idHelperSvc->cscIdHelper().wireLayer(id));
149 if (done) done = fixedId.setCscMeasuresPhi(m_idHelperSvc->cscIdHelper().measuresPhi(id));
150 if (done) done = fixedId.setCscStrip(m_idHelperSvc->cscIdHelper().strip(id));
151 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (CSC) ");
152 } else if (m_idHelperSvc->isTgc(id)) {
153 done = fixedId.setTechnology(MuonFixedLongId::technologyTGC); // TGC = 2;
154 // setting the Tgc specific fields
155 if (done) done = fixedId.setStationEta(m_idHelperSvc->tgcIdHelper().stationEta(id));
156 if (done) done = fixedId.setStationPhi(m_idHelperSvc->tgcIdHelper().stationPhi(id));
157
158 if (done) done = fixedId.setTgcGasGap(m_idHelperSvc->tgcIdHelper().gasGap(id));
159 if (done) done = fixedId.setTgcIsStrip(m_idHelperSvc->tgcIdHelper().isStrip(id));
160 if (done) done = fixedId.setTgcChannel(m_idHelperSvc->tgcIdHelper().channel(id));
161 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (TGC) ");
162 } else if (m_idHelperSvc->isMM(id)) {
163 done = fixedId.setTechnology(MuonFixedLongId::technologyMMG);
164 // setting the MMG specific fields
165 if (done) done = fixedId.setStationEta(m_idHelperSvc->mmIdHelper().stationEta(id));
166 if (done) done = fixedId.setStationPhi(m_idHelperSvc->mmIdHelper().stationPhi(id));
167
168 if (done) done = fixedId.setMmgMultilayer(m_idHelperSvc->mmIdHelper().multilayer(id));
169 if (done) done = fixedId.setMmgGasGap(m_idHelperSvc->mmIdHelper().gasGap(id));
170 if (done) done = fixedId.setMmgStrip(m_idHelperSvc->mmIdHelper().channel(id));
171 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (MMG) ");
172 } else if (m_idHelperSvc->issTgc(id)) {
173 done = fixedId.setTechnology(MuonFixedLongId::technologySTG);
174 // setting the sTGC specific fields
175 if (done) done = fixedId.setStationEta(m_idHelperSvc->stgcIdHelper().stationEta(id));
176 if (done) done = fixedId.setStationPhi(m_idHelperSvc->stgcIdHelper().stationPhi(id));
177
178 // Convert the channel type enum
180 switch (m_idHelperSvc->stgcIdHelper().channelType(id)) {
183 break;
186 break;
189 break;
190 default:
191 ATH_MSG_WARNING("Cannot convert StgChannelType");
192 done = false;
193 break;
194 }
195
196 if (done) done = fixedId.setStgMultilayer(m_idHelperSvc->stgcIdHelper().multilayer(id));
197 if (done) done = fixedId.setStgGasGap(m_idHelperSvc->stgcIdHelper().gasGap(id));
198 if (done) done = fixedId.setStgChannelType(channelType);
199 if (done) done = fixedId.setStgChannel(m_idHelperSvc->stgcIdHelper().channel(id));
200 if (!done) ATH_MSG_INFO("Something went wrong in the conversion id->fid (STG) ");
201 }
202 }
203 return fixedId;
204 }
StgChannelType
an enum with the STGC channel types

◆ initialize()

StatusCode MuonCalib::IdToFixedIdTool::initialize ( )
overridevirtual

IdToFixedIdTool initialization: retrieve all the IdHelpers needed to do strap the ATHENA Identifier.

Definition at line 22 of file IdToFixedIdTool.cxx.

22 {
23 ATH_MSG_VERBOSE("Initialisation started");
24 ATH_CHECK(m_idHelperSvc.retrieve());
25 return StatusCode::SUCCESS;
26 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)

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

retrieve Interface ID

Definition at line 35 of file IIdToFixedIdTool.h.

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

◆ print() [1/3]

void MuonCalib::IdToFixedIdTool::print ( const Identifier & id) const
overridevirtual

print method to output an ATHENA Identifier, warning the user when the conversion and reconversion yields different results.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 288 of file IdToFixedIdTool.cxx.

288 {
289 MuonFixedId tmp = idToFixedId(id);
290 Identifier test = fixedIdToId(tmp);
291 if (id != test) ATH_MSG_WARNING("SOMETHING WENT WRONG PROCESSING FIXEDID<->ID");
292
293 m_idHelperSvc->mdtIdHelper().print(id);
294 }
MuonFixedId idToFixedId(const Identifier &id) const override
Convert ATHENA Identifier to MuonFixedId.
Identifier fixedIdToId(const MuonFixedId &fid) const override
Convert MuonFixedId to ATHENA Identifier.

◆ print() [2/3]

void MuonCalib::IdToFixedIdTool::print ( const MuonFixedId & fid) const
overridevirtual

dump MuonFixedId

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 296 of file IdToFixedIdTool.cxx.

296{ ATH_MSG_INFO("MuonFixedId conversion yields: " << fid); }

◆ print() [3/3]

void MuonCalib::IdToFixedIdTool::print ( const MuonFixedLongId & fid) const
overridevirtual

dump MuonFixedLongId

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 298 of file IdToFixedIdTool.cxx.

298{ ATH_MSG_INFO("MuonFixedLongId conversion yields: " << fid); }

◆ regionKeyToId()

Identifier MuonCalib::IdToFixedIdTool::regionKeyToId ( std::string region) const
overridevirtual

Returns an ATHENA Identifier for a given Region key.

Implements MuonCalib::IIdToFixedIdTool.

Definition at line 247 of file IdToFixedIdTool.cxx.

247 {
248 // unpack the region key string used by the calibration framework and return
249 // an Athena Identifier
250 int eta, phi, ml;
251 std::string stnName(region, 0, 3);
252 std::string::size_type separator1 = region.find_first_of('_');
253 std::string::size_type separator2 = region.find_last_of('_');
254 if ((separator1 == std::string::npos) || (separator2 == std::string::npos) || (separator1 == separator2)) {
255 ATH_MSG_WARNING("IdToFixedIdTool::regionKeyToId : invalid region key " << region);
256 return Identifier();
257 }
258 std::string::size_type separator3 = region.find('_', separator1 + 1);
259 if (separator3 != separator2) {
260 // format STN_ETA_PHI_ML
261 std::string stnPhi(region, separator1 + 1, separator2 - separator1 - 1);
262 std::string stnEta(region, separator2 + 1, separator3 - separator2 - 1);
263 std::istringstream is1, is2;
264 is1.str(stnEta);
265 is1 >> eta;
266 is2.str(stnPhi);
267 is2 >> phi;
268 std::string Ml(region, separator3 + 1, region.size() - separator3 - 1);
269 std::istringstream is3;
270 is3.str(Ml);
271 is3 >> ml;
272 } else {
273 // format STN_ETA_PHI
274 std::string stnPhi(region, separator1 + 1, separator2 - separator1 - 1);
275 std::string stnEta(region, separator2 + 1, region.size() - separator2 - 1);
276 std::istringstream is1, is2;
277 is1.str(stnEta);
278 is1 >> eta;
279 is2.str(stnPhi);
280 is2 >> phi;
281 ml = 0;
282 }
283 // figure out what to do here when ml!=0 ...
284 Identifier athenaId = m_idHelperSvc->mdtIdHelper().elementID(stnName, eta, phi);
285 return athenaId;
286 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

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

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonCalib::IdToFixedIdTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 60 of file IdToFixedIdTool.h.

60{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_print_level

int MuonCalib::IdToFixedIdTool::m_print_level
private

Sets printlevel of output.

Definition at line 62 of file IdToFixedIdTool.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: