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::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::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 205 of file XAODToInDetClusterConversion.cxx.

205 {
206 const InDetDD::HGTD_DetectorElementCollection *hgtdElements{};
207 ATH_CHECK(SG::get(hgtdElements,m_HGTDDetEleCollKey, ctx));
208
209 const xAOD::HGTDClusterContainer *inputHgtdClusters{};
210 ATH_CHECK(SG::get(inputHgtdClusters, m_inputHgtdClusterContainerKey, ctx));
211
213 SG::WriteDecorHandle<xAOD::HGTDClusterContainer, Link_t> dec_link{m_hgdtClusterLinkKey,ctx};
214
215 SG::WriteHandle outputHgtdClusterContainer{m_outputHgtdClusterContainerKey, ctx};
216 ATH_CHECK( outputHgtdClusterContainer.record (std::make_unique<::HGTD_ClusterContainer>(m_hgtdID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
217 ATH_MSG_DEBUG( "Container '" << m_outputHgtdClusterContainerKey.key() << "' initialised" );
218
219 ContainerAccessor<xAOD::HGTDCluster, IdentifierHash, 1>
220 hgtdAccessor ( *inputHgtdClusters,
221 [] (const xAOD::HGTDCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
222 hgtdElements->size());
223
224 const auto& allIdHashes = hgtdAccessor.allIdentifiers();
225 for (const auto& hashId : allIdHashes) {
226 const auto *element = InDetDD::HGTDDetEl::getDetectorElement(hashId,*hgtdElements);
227 if ( element == nullptr ) {
228 ATH_MSG_FATAL( "Invalid hgtd detector element for hash " << hashId);
229 return StatusCode::FAILURE;
230 }
231
232 std::unique_ptr<::HGTD_ClusterCollection> collection = std::make_unique<::HGTD_ClusterCollection>(hashId);
233
234 // Get the detector element and range for the idHash
235 for (const auto& this_range : hgtdAccessor.rangesForIdentifierDirect(hashId)) {
236 for (auto start = this_range.first; start != this_range.second; ++start) {
237 const xAOD::HGTDCluster* in_cluster = *start;
238
239 ::HGTD_Cluster* cluster = nullptr;
240 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, cluster) );
241 cluster->setHashAndIndex(hashId, collection->size());
242
243 // Add to Collection
244 collection->push_back(cluster);
245 dec_link(*in_cluster) = Link_t{cluster, *collection};
246 }
247 }
248
249 ::HGTD_ClusterContainer::IDC_WriteHandle lock = outputHgtdClusterContainer->getWriteHandle(hashId);
250 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
251
252 } // loop on hashIds
253
254 ATH_CHECK( outputHgtdClusterContainer.setConst() );
255
256 return StatusCode::SUCCESS;
257 }
#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 81 of file XAODToInDetClusterConversion.cxx.

81 {
82 const InDetDD::SiDetectorElementCollection* pixElements{};
83 ATH_CHECK(SG::get(pixElements, m_pixelDetEleCollKey, ctx));
84
85 const xAOD::PixelClusterContainer *inputPixelClusters{};
86 ATH_CHECK(SG::get(inputPixelClusters, m_inputPixelClusterContainerKey, ctx));
87
89 SG::WriteDecorHandle<xAOD::PixelClusterContainer, Link_t> dec_link{m_pixelClusterLinkKey,ctx};
90 SG::WriteHandle outputPixelClusterContainer{m_outputPixelClusterContainerKey, ctx};
91 ATH_CHECK( outputPixelClusterContainer.record (std::make_unique<InDet::PixelClusterContainer>(m_pixelID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
92 ATH_MSG_DEBUG( "Container '" << m_outputPixelClusterContainerKey.key() << "' initialised" );
93
94 ATH_CHECK( outputPixelClusterContainer.symLink( m_pixelClusterContainerLinkKey ) );
95
96
97 // Conversion
98 // Access to the cluster from a given detector element is possible
99 // via the ContainerAccessor.
100 ContainerAccessor<xAOD::PixelCluster, IdentifierHash, 1>
101 pixelAccessor ( *inputPixelClusters,
102 [] (const xAOD::PixelCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
103 pixElements->size());
104
105 const auto& allIdHashes = pixelAccessor.allIdentifiers();
106 for (const auto& hashId : allIdHashes) {
107 const InDetDD::SiDetectorElement *element = pixElements->getDetectorElement(hashId);
108 if ( element == nullptr ) {
109 ATH_MSG_FATAL( "Invalid pixel detector element for hash " << hashId);
110 return StatusCode::FAILURE;
111 }
112
113 std::unique_ptr<InDet::PixelClusterCollection> collection = std::make_unique<InDet::PixelClusterCollection>(hashId);
114
115 // Get the detector element and range for the idHash
116 for (const auto& this_range : pixelAccessor.rangesForIdentifierDirect(hashId)) {
117 for (auto start = this_range.first; start != this_range.second; ++start) {
118 const xAOD::PixelCluster* in_cluster = *start;
119
120 InDet::PixelCluster* cluster = nullptr;
121 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *m_pixelID, cluster) );
122 cluster->setHashAndIndex(hashId, collection->size());
123
124 // Add to Collection
125 collection->push_back(cluster);
126 dec_link(*in_cluster) = Link_t{cluster, *collection};
127 }
128 }
129
130 InDet::PixelClusterContainer::IDC_WriteHandle lock = outputPixelClusterContainer->getWriteHandle(hashId);
131 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
132
133 } // loop on hashIds
134
135 ATH_CHECK( outputPixelClusterContainer.setConst() );
136
137 return StatusCode::SUCCESS;
138 }
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
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 140 of file XAODToInDetClusterConversion.cxx.

140 {
141 const InDetDD::SiDetectorElementCollection* stripElements{};
142 ATH_CHECK(SG::get(stripElements, m_stripDetEleCollKey, ctx));
143 const xAOD::StripClusterContainer *inputStripClusters{};
144 ATH_CHECK(SG::get(inputStripClusters, m_inputStripClusterContainerKey, ctx));
145
147 SG::WriteDecorHandle<xAOD::StripClusterContainer, Link_t> dec_link{m_stripClusterLinkKey,ctx};
148
149 SG::WriteHandle outputStripClusterContainer{m_outputStripClusterContainerKey, ctx};
150 ATH_CHECK( outputStripClusterContainer.record (std::make_unique<InDet::SCT_ClusterContainer>(m_stripID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
151 ATH_MSG_DEBUG( "Container '" << m_outputStripClusterContainerKey.key() << "' initialised" );
152
153 ATH_CHECK( outputStripClusterContainer.symLink( m_stripClusterContainerLinkKey ) );
154
155 // Conversion
156 // Access to the cluster from a given detector element is possible
157 // via the ContainerAccessor.
158 ContainerAccessor<xAOD::StripCluster, IdentifierHash, 1>
159 stripAccessor ( *inputStripClusters,
160 [] (const xAOD::StripCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
161 stripElements->size());
162
163
164
165 const auto& allIdHashes = stripAccessor.allIdentifiers();
166 for (const auto& hashId : allIdHashes) {
167 const InDetDD::SiDetectorElement *element = stripElements->getDetectorElement(hashId);
168 if ( element == nullptr ) {
169 ATH_MSG_FATAL( "Invalid strip detector element for hash " << hashId);
170 return StatusCode::FAILURE;
171 }
172
173 bool isBarrel = element->isBarrel();
174 double shift = not isBarrel ? m_lorentzAngleTool->getLorentzShift(hashId, ctx) : 0.;
175
176 std::unique_ptr<InDet::SCT_ClusterCollection> collection = std::make_unique<InDet::SCT_ClusterCollection>(hashId);
177
178
179 // Get the detector element and range for the idHash
180 for (const auto& this_range : stripAccessor.rangesForIdentifierDirect(hashId)) {
181 for (auto start = this_range.first; start != this_range.second; ++start) {
182 const xAOD::StripCluster* in_cluster = *start;
183
184 InDet::SCT_Cluster* cluster = nullptr;
185 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *m_stripID, cluster, shift) );
186 cluster->setHashAndIndex(hashId, collection->size());
187
188
189 // Add to Collection
190 collection->push_back( cluster );
191 dec_link(*in_cluster) = Link_t{cluster, *collection};
192 }
193 }
194
195 InDet::SCT_ClusterContainer::IDC_WriteHandle lock = outputStripClusterContainer->getWriteHandle(hashId);
196 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
197
198 }
199
200 ATH_CHECK( outputStripClusterContainer.setConst() );
201
202 return StatusCode::SUCCESS;
203 }
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
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 59 of file XAODToInDetClusterConversion.cxx.

60 {
61 ATH_MSG_DEBUG( "Executing " << name() << " ... " );
62
63 if (m_processPixel) {
64 ATH_MSG_DEBUG("Converting Pixel Clusters: xAOD -> InDet");
66 }
67
68 if (m_processStrip) {
69 ATH_MSG_DEBUG("Converting Strip Clusters: xAOD -> InDet");
71 }
72
73 if (m_processHgtd) {
74 ATH_MSG_DEBUG("Converting HGTD Clusters: xAOD -> InDet");
76 }
77
78 return StatusCode::SUCCESS;
79 }
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 }
34
35 // Strip Clusters
37 if (m_processStrip) {
38 ATH_CHECK( detStore()->retrieve(m_stripID, "SCT_ID") );
39 }
44
45 ATH_CHECK( m_lorentzAngleTool.retrieve(EnableTool{not m_lorentzAngleTool.empty()}) );
46
47 // Hgtd Clusters
49 if (m_processHgtd) {
50 ATH_CHECK( detStore()->retrieve(m_hgtdID, "HGTD_ID") );
51 }
55
56 return StatusCode::SUCCESS;
57 }
#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 76 of file XAODToInDetClusterConversion.h.

76{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 72 of file XAODToInDetClusterConversion.h.

72{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 73 of file XAODToInDetClusterConversion.h.

73{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 66 of file XAODToInDetClusterConversion.h.

66{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 75 of file XAODToInDetClusterConversion.h.

75{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 68 of file XAODToInDetClusterConversion.h.

68{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 63 of file XAODToInDetClusterConversion.h.

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

◆ 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 80 of file XAODToInDetClusterConversion.h.

80{this, "ProcessHgtd", false};

◆ m_processPixel

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

Definition at line 78 of file XAODToInDetClusterConversion.h.

78{this, "ProcessPixel", false};

◆ m_processStrip

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

Definition at line 79 of file XAODToInDetClusterConversion.h.

79{this, "ProcessStrip", false};

◆ m_stripClusterContainerLinkKey

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

Definition at line 69 of file XAODToInDetClusterConversion.h.

69{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 70 of file XAODToInDetClusterConversion.h.

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

◆ m_stripDetEleCollKey

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

Definition at line 65 of file XAODToInDetClusterConversion.h.

65{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: