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

#include <XAODToInDetClusterConversion.h>

Inheritance diagram for InDet::XAODToInDetClusterConversion:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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 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

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

StatusCode convertPixelClusters (const EventContext &ctx) const
StatusCode convertStripClusters (const EventContext &ctx) const
StatusCode convertHgtdClusters (const EventContext &ctx) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const PixelIDm_pixelID {}
const SCT_IDm_stripID {}
const HGTD_IDm_hgtdID {}
ToolHandle< ISiLorentzAngleToolm_lorentzAngleTool {this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"}
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
SG::ReadHandleKey< xAOD::PixelClusterContainerm_inputPixelClusterContainerKey {this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"}
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey {this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"}
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey {this, "PixelClustersLinkName", "ITkPixelClusters"}
SG::WriteHandleKey< std::vector< unsigned int > > m_pixelClusterOffSetKey {this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"}
SG::WriteDecorHandleKey< xAOD::PixelClusterContainerm_pixelClusterLinkKey {this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" }
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"}
SG::ReadHandleKey< xAOD::StripClusterContainerm_inputStripClusterContainerKey {this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"}
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey {this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"}
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey {this, "StripClustersLinkName", "ITkStripClusters"}
SG::WriteHandleKey< std::vector< unsigned int > > m_stripClusterOffSetKey {this, "StripClusterOffSetKey", "ITkStripClustersOffsets"}
SG::WriteDecorHandleKey< xAOD::StripClusterContainerm_stripClusterLinkKey {this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" }
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollectionm_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"}
SG::ReadHandleKey< xAOD::HGTDClusterContainerm_inputHgtdClusterContainerKey {this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"}
SG::WriteHandleKey<::HGTD_ClusterContainerm_outputHgtdClusterContainerKey {this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"}
SG::WriteDecorHandleKey< xAOD::HGTDClusterContainerm_hgdtClusterLinkKey {this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" }
Gaudi::Property< bool > m_processPixel {this, "ProcessPixel", false}
Gaudi::Property< bool > m_processStrip {this, "ProcessStrip", false}
Gaudi::Property< bool > m_processHgtd {this, "ProcessHgtd", false}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 36 of file XAODToInDetClusterConversion.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ convertHgtdClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertHgtdClusters ( const EventContext & ctx) const
private

Definition at line 222 of file XAODToInDetClusterConversion.cxx.

222 {
223 const InDetDD::HGTD_DetectorElementCollection *hgtdElements{};
224 ATH_CHECK(SG::get(hgtdElements,m_HGTDDetEleCollKey, ctx));
225
226 const xAOD::HGTDClusterContainer *inputHgtdClusters{};
227 ATH_CHECK(SG::get(inputHgtdClusters, m_inputHgtdClusterContainerKey, ctx));
228
230 SG::WriteDecorHandle<xAOD::HGTDClusterContainer, Link_t> dec_link{m_hgdtClusterLinkKey,ctx};
231
232 SG::WriteHandle outputHgtdClusterContainer{m_outputHgtdClusterContainerKey, ctx};
233 ATH_CHECK( outputHgtdClusterContainer.record (std::make_unique<::HGTD_ClusterContainer>(m_hgtdID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
234 ATH_MSG_DEBUG( "Container '" << m_outputHgtdClusterContainerKey.key() << "' initialised" );
235
236 ContainerAccessor<xAOD::HGTDCluster, IdentifierHash, 1>
237 hgtdAccessor ( *inputHgtdClusters,
238 [] (const xAOD::HGTDCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
239 hgtdElements->size());
240
241 const auto& allIdHashes = hgtdAccessor.allIdentifiers();
242 for (const auto& hashId : allIdHashes) {
243 const auto *element = InDetDD::HGTDDetEl::getDetectorElement(hashId,*hgtdElements);
244 if ( element == nullptr ) {
245 ATH_MSG_FATAL( "Invalid hgtd detector element for hash " << hashId);
246 return StatusCode::FAILURE;
247 }
248
249 std::unique_ptr<::HGTD_ClusterCollection> collection = std::make_unique<::HGTD_ClusterCollection>(hashId);
250
251 // Get the detector element and range for the idHash
252 for (const auto& this_range : hgtdAccessor.rangesForIdentifierDirect(hashId)) {
253 for (auto start = this_range.first; start != this_range.second; ++start) {
254 const xAOD::HGTDCluster* in_cluster = *start;
255
256 ::HGTD_Cluster* cluster = nullptr;
257 //cluster is overwritten, but it is saved in 'collection' and later moved
258 //coverity[RESOURCE_LEAK]
259 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, cluster) );
260 cluster->setHashAndIndex(hashId, collection->size());
261
262 // Add to Collection
263 collection->push_back(cluster);
264 dec_link(*in_cluster) = Link_t{cluster, *collection};
265 }
266 }
267
268 ::HGTD_ClusterContainer::IDC_WriteHandle lock = outputHgtdClusterContainer->getWriteHandle(hashId);
269 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
270
271 } // loop on hashIds
272
273 ATH_CHECK( outputHgtdClusterContainer.setConst() );
274
275 return StatusCode::SUCCESS;
276 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
ElementLink< xAOD::TruthParticleContainer > Link_t
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_inputHgtdClusterContainerKey
SG::WriteDecorHandleKey< xAOD::HGTDClusterContainer > m_hgdtClusterLinkKey
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
SG::WriteHandleKey<::HGTD_ClusterContainer > m_outputHgtdClusterContainerKey
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash, const HGTD_DetectorElementCollection &coll)
DataVector< HGTD_DetectorElement > HGTD_DetectorElementCollection
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
StatusCode convertXaodToInDetCluster(const xAOD::PixelCluster &xaodCluster, const InDetDD::SiDetectorElement &element, const PixelID &pixelID, InDet::PixelCluster *&indetCluster)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
HGTDClusterContainer_v1 HGTDClusterContainer
Define the version of the HGTD cluster container.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
Definition HGTDCluster.h:13

◆ convertPixelClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertPixelClusters ( const EventContext & ctx) const
private

Definition at line 82 of file XAODToInDetClusterConversion.cxx.

82 {
83 const InDetDD::SiDetectorElementCollection* pixElements{};
84 ATH_CHECK(SG::get(pixElements, m_pixelDetEleCollKey, ctx));
85
86 const xAOD::PixelClusterContainer *inputPixelClusters{};
87 ATH_CHECK(SG::get(inputPixelClusters, m_inputPixelClusterContainerKey, ctx));
88
90 SG::WriteDecorHandle<xAOD::PixelClusterContainer, Link_t> dec_link{m_pixelClusterLinkKey,ctx};
91 SG::WriteHandle outputPixelClusterContainer{m_outputPixelClusterContainerKey, ctx};
92 ATH_CHECK( outputPixelClusterContainer.record (std::make_unique<InDet::PixelClusterContainer>(m_pixelID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
93 ATH_MSG_DEBUG( "Container '" << m_outputPixelClusterContainerKey.key() << "' initialised" );
94
95 ATH_CHECK( outputPixelClusterContainer.symLink( m_pixelClusterContainerLinkKey ) );
96
97
98 // Conversion
99 // Access to the cluster from a given detector element is possible
100 // via the ContainerAccessor.
101 ContainerAccessor<xAOD::PixelCluster, IdentifierHash, 1>
102 pixelAccessor ( *inputPixelClusters,
103 [] (const xAOD::PixelCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
104 pixElements->size());
105
106 const auto& allIdHashes = pixelAccessor.allIdentifiers();
107 for (const auto& hashId : allIdHashes) {
108 const InDetDD::SiDetectorElement *element = pixElements->getDetectorElement(hashId);
109 if ( element == nullptr ) {
110 ATH_MSG_FATAL( "Invalid pixel detector element for hash " << hashId);
111 return StatusCode::FAILURE;
112 }
113
114 std::unique_ptr<InDet::PixelClusterCollection> collection = std::make_unique<InDet::PixelClusterCollection>(hashId);
115
116 // Get the detector element and range for the idHash
117 for (const auto& this_range : pixelAccessor.rangesForIdentifierDirect(hashId)) {
118 for (auto start = this_range.first; start != this_range.second; ++start) {
119 const xAOD::PixelCluster* in_cluster = *start;
120
121 InDet::PixelCluster* cluster = nullptr;
122 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *m_pixelID, cluster) );
123 //coverity[FORWARD_NULL:FALSE]
124 cluster->setHashAndIndex(hashId, collection->size());
125
126 // Add to Collection
127 collection->push_back(cluster);
128 dec_link(*in_cluster) = Link_t{cluster, *collection};
129 }
130 }
131
132 InDet::PixelClusterContainer::IDC_WriteHandle lock = outputPixelClusterContainer->getWriteHandle(hashId);
133 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
134
135 } // loop on hashIds
136
137 auto offsets = std::make_unique<std::vector<unsigned int>>(m_pixelID->wafer_hash_max(), 0);
138 unsigned int counter(0);
139 for (const auto coll : *outputPixelClusterContainer) {
140 (*offsets)[coll->identifyHash()] = counter;
141 counter += coll->size();
142 }
143 SG::WriteHandle offSetHandle{m_pixelClusterOffSetKey ,ctx};
144 ATH_CHECK(offSetHandle.record(std::move(offsets)));
145
146 return StatusCode::SUCCESS;
147 }
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::WriteHandleKey< std::vector< unsigned int > > m_pixelClusterOffSetKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterContainerKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey
SG::WriteDecorHandleKey< xAOD::PixelClusterContainer > m_pixelClusterLinkKey
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.

◆ convertStripClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertStripClusters ( const EventContext & ctx) const
private

Definition at line 149 of file XAODToInDetClusterConversion.cxx.

149 {
150 const InDetDD::SiDetectorElementCollection* stripElements{};
151 ATH_CHECK(SG::get(stripElements, m_stripDetEleCollKey, ctx));
152 const xAOD::StripClusterContainer *inputStripClusters{};
153 ATH_CHECK(SG::get(inputStripClusters, m_inputStripClusterContainerKey, ctx));
154
156 SG::WriteDecorHandle<xAOD::StripClusterContainer, Link_t> dec_link{m_stripClusterLinkKey,ctx};
157
158 SG::WriteHandle outputStripClusterContainer{m_outputStripClusterContainerKey, ctx};
159 ATH_CHECK( outputStripClusterContainer.record (std::make_unique<InDet::SCT_ClusterContainer>(m_stripID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
160 ATH_MSG_DEBUG( "Container '" << m_outputStripClusterContainerKey.key() << "' initialised" );
161
162 ATH_CHECK( outputStripClusterContainer.symLink( m_stripClusterContainerLinkKey ) );
163
164 // Conversion
165 // Access to the cluster from a given detector element is possible
166 // via the ContainerAccessor.
167 ContainerAccessor<xAOD::StripCluster, IdentifierHash, 1>
168 stripAccessor ( *inputStripClusters,
169 [] (const xAOD::StripCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
170 stripElements->size());
171
172
173
174 const auto& allIdHashes = stripAccessor.allIdentifiers();
175 for (const auto& hashId : allIdHashes) {
176 const InDetDD::SiDetectorElement *element = stripElements->getDetectorElement(hashId);
177 if ( element == nullptr ) {
178 ATH_MSG_FATAL( "Invalid strip detector element for hash " << hashId);
179 return StatusCode::FAILURE;
180 }
181
182 bool isBarrel = element->isBarrel();
183 double shift = not isBarrel ? m_lorentzAngleTool->getLorentzShift(hashId, ctx) : 0.;
184
185 std::unique_ptr<InDet::SCT_ClusterCollection> collection = std::make_unique<InDet::SCT_ClusterCollection>(hashId);
186
187
188 // Get the detector element and range for the idHash
189 for (const auto& this_range : stripAccessor.rangesForIdentifierDirect(hashId)) {
190 for (auto start = this_range.first; start != this_range.second; ++start) {
191 const xAOD::StripCluster* in_cluster = *start;
192
193 InDet::SCT_Cluster* cluster = nullptr;
194 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *m_stripID, cluster, shift) );
195 //coverity[FORWARD_NULL:FALSE]
196 cluster->setHashAndIndex(hashId, collection->size());
197
198
199 // Add to Collection
200 collection->push_back( cluster );
201 dec_link(*in_cluster) = Link_t{cluster, *collection};
202 }
203 }
204
205 InDet::SCT_ClusterContainer::IDC_WriteHandle lock = outputStripClusterContainer->getWriteHandle(hashId);
206 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
207
208 }
209
210 auto offsets = std::make_unique<std::vector<unsigned int>>(m_stripID->wafer_hash_max(), 0);
211 unsigned int counter(0);
212 for (const auto coll : *outputStripClusterContainer) {
213 (*offsets)[coll->identifyHash()] = counter;
214 counter += coll->size();
215 }
216 SG::WriteHandle offSetHandle{m_stripClusterOffSetKey ,ctx};
217 ATH_CHECK(offSetHandle.record(std::move(offsets)));
218
219 return StatusCode::SUCCESS;
220 }
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::WriteHandleKey< std::vector< unsigned int > > m_stripClusterOffSetKey
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey
SG::WriteDecorHandleKey< xAOD::StripClusterContainer > m_stripClusterLinkKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterContainerKey
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

◆ evtStore()

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.

◆ execute()

StatusCode InDet::XAODToInDetClusterConversion::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 61 of file XAODToInDetClusterConversion.cxx.

62 {
63 ATH_MSG_DEBUG( "Executing " << name() << " ... ");
64 if (m_processPixel) {
65 ATH_MSG_DEBUG("Converting Pixel Clusters: xAOD -> InDet");
67 }
68
69 if (m_processStrip) {
70 ATH_MSG_DEBUG("Converting Strip Clusters: xAOD -> InDet");
72 }
73
74 if (m_processHgtd) {
75 ATH_MSG_DEBUG("Converting HGTD Clusters: xAOD -> InDet");
77 }
78
79 return StatusCode::SUCCESS;
80 }
StatusCode convertHgtdClusters(const EventContext &ctx) const
StatusCode convertPixelClusters(const EventContext &ctx) const
StatusCode convertStripClusters(const EventContext &ctx) const

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode InDet::XAODToInDetClusterConversion::initialize ( )
overridevirtual

Definition at line 22 of file XAODToInDetClusterConversion.cxx.

22 {
23 ATH_MSG_INFO( "Initializing " << name() << " ... " );
24
25 // Pixel Clusters
27 if (m_processPixel) {
28 ATH_CHECK( detStore()->retrieve(m_pixelID,"PixelID") );
29 }
35
36 // Strip Clusters
38 if (m_processStrip) {
39 ATH_CHECK( detStore()->retrieve(m_stripID, "SCT_ID") );
40 }
46
47 ATH_CHECK( m_lorentzAngleTool.retrieve(EnableTool{not m_lorentzAngleTool.empty()}) );
48
49 // Hgtd Clusters
51 if (m_processHgtd) {
52 ATH_CHECK( detStore()->retrieve(m_hgtdID, "HGTD_ID") );
53 }
57
58 return StatusCode::SUCCESS;
59 }
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const

◆ 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()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

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

◆ 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();
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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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) {
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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_hgdtClusterLinkKey

SG::WriteDecorHandleKey<xAOD::HGTDClusterContainer> InDet::XAODToInDetClusterConversion::m_hgdtClusterLinkKey {this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 79 of file XAODToInDetClusterConversion.h.

79{this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_HGTDDetEleCollKey

SG::ReadCondHandleKey<InDetDD::HGTD_DetectorElementCollection> InDet::XAODToInDetClusterConversion::m_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"}
private

Definition at line 75 of file XAODToInDetClusterConversion.h.

75{this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"};

◆ m_hgtdID

const HGTD_ID* InDet::XAODToInDetClusterConversion::m_hgtdID {}
private

Definition at line 54 of file XAODToInDetClusterConversion.h.

54{};

◆ m_inputHgtdClusterContainerKey

SG::ReadHandleKey<xAOD::HGTDClusterContainer> InDet::XAODToInDetClusterConversion::m_inputHgtdClusterContainerKey {this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"}
private

Definition at line 76 of file XAODToInDetClusterConversion.h.

76{this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"};

◆ m_inputPixelClusterContainerKey

SG::ReadHandleKey<xAOD::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_inputPixelClusterContainerKey {this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"}
private

Definition at line 59 of file XAODToInDetClusterConversion.h.

59{this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"};

◆ m_inputStripClusterContainerKey

SG::ReadHandleKey<xAOD::StripClusterContainer> InDet::XAODToInDetClusterConversion::m_inputStripClusterContainerKey {this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"}
private

Definition at line 68 of file XAODToInDetClusterConversion.h.

68{this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"};

◆ m_lorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::XAODToInDetClusterConversion::m_lorentzAngleTool {this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"}
private

Definition at line 56 of file XAODToInDetClusterConversion.h.

56{this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"};

◆ m_outputHgtdClusterContainerKey

SG::WriteHandleKey<::HGTD_ClusterContainer> InDet::XAODToInDetClusterConversion::m_outputHgtdClusterContainerKey {this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"}
private

Definition at line 78 of file XAODToInDetClusterConversion.h.

78{this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"};

◆ m_outputPixelClusterContainerKey

SG::WriteHandleKey<InDet::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_outputPixelClusterContainerKey {this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"}
private

Definition at line 61 of file XAODToInDetClusterConversion.h.

61{this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"};

◆ m_outputStripClusterContainerKey

SG::WriteHandleKey<InDet::SCT_ClusterContainer> InDet::XAODToInDetClusterConversion::m_outputStripClusterContainerKey {this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"}
private

Definition at line 70 of file XAODToInDetClusterConversion.h.

70{this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"};

◆ m_pixelClusterContainerLinkKey

SG::WriteHandleKey< InDet::SiClusterContainer > InDet::XAODToInDetClusterConversion::m_pixelClusterContainerLinkKey {this, "PixelClustersLinkName", "ITkPixelClusters"}
private

Definition at line 62 of file XAODToInDetClusterConversion.h.

62{this, "PixelClustersLinkName", "ITkPixelClusters"};

◆ m_pixelClusterLinkKey

SG::WriteDecorHandleKey<xAOD::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_pixelClusterLinkKey {this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 65 of file XAODToInDetClusterConversion.h.

65{this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_pixelClusterOffSetKey

SG::WriteHandleKey<std::vector<unsigned int> > InDet::XAODToInDetClusterConversion::m_pixelClusterOffSetKey {this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"}
private

Definition at line 63 of file XAODToInDetClusterConversion.h.

63{this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"};

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> InDet::XAODToInDetClusterConversion::m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
private

Definition at line 58 of file XAODToInDetClusterConversion.h.

58{this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};

◆ m_pixelID

const PixelID* InDet::XAODToInDetClusterConversion::m_pixelID {}
private

Definition at line 52 of file XAODToInDetClusterConversion.h.

52{};

◆ m_processHgtd

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processHgtd {this, "ProcessHgtd", false}
private

Definition at line 83 of file XAODToInDetClusterConversion.h.

83{this, "ProcessHgtd", false};

◆ m_processPixel

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processPixel {this, "ProcessPixel", false}
private

Definition at line 81 of file XAODToInDetClusterConversion.h.

81{this, "ProcessPixel", false};

◆ m_processStrip

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processStrip {this, "ProcessStrip", false}
private

Definition at line 82 of file XAODToInDetClusterConversion.h.

82{this, "ProcessStrip", false};

◆ m_stripClusterContainerLinkKey

SG::WriteHandleKey< InDet::SiClusterContainer > InDet::XAODToInDetClusterConversion::m_stripClusterContainerLinkKey {this, "StripClustersLinkName", "ITkStripClusters"}
private

Definition at line 71 of file XAODToInDetClusterConversion.h.

71{this, "StripClustersLinkName", "ITkStripClusters"};

◆ m_stripClusterLinkKey

SG::WriteDecorHandleKey<xAOD::StripClusterContainer> InDet::XAODToInDetClusterConversion::m_stripClusterLinkKey {this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 73 of file XAODToInDetClusterConversion.h.

73{this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_stripClusterOffSetKey

SG::WriteHandleKey<std::vector<unsigned int> > InDet::XAODToInDetClusterConversion::m_stripClusterOffSetKey {this, "StripClusterOffSetKey", "ITkStripClustersOffsets"}
private

Definition at line 72 of file XAODToInDetClusterConversion.h.

72{this, "StripClusterOffSetKey", "ITkStripClustersOffsets"};

◆ m_stripDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> InDet::XAODToInDetClusterConversion::m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"}
private

Definition at line 67 of file XAODToInDetClusterConversion.h.

67{this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"};

◆ m_stripID

const SCT_ID* InDet::XAODToInDetClusterConversion::m_stripID {}
private

Definition at line 53 of file XAODToInDetClusterConversion.h.

53{};

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


The documentation for this class was generated from the following files: