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

#include <XAODToInDetClusterConversion.h>

Inheritance diagram for InDet::XAODToInDetClusterConversion:

Public Member Functions

 XAODToInDetClusterConversion (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
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 unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
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

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

Private Attributes

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

Disallow default instantiation, copy, assignment

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::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::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"}
Gaudi::Property< bool > m_processPixel {this, "ProcessPixel", false}
Gaudi::Property< bool > m_processStrip {this, "ProcessStrip", false}
Gaudi::Property< bool > m_processHgtd {this, "ProcessHgtd", false}
 XAODToInDetClusterConversion ()=delete
 XAODToInDetClusterConversion (const XAODToInDetClusterConversion &)=delete
XAODToInDetClusterConversionoperator= (const XAODToInDetClusterConversion &)=delete
StatusCode convertPixelClusters (const EventContext &ctx) const
StatusCode convertStripClusters (const EventContext &ctx) const
StatusCode convertHgtdClusters (const EventContext &ctx) const

Detailed Description

Definition at line 42 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.

Constructor & Destructor Documentation

◆ XAODToInDetClusterConversion() [1/3]

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

Constructor with parameters:

Definition at line 20 of file XAODToInDetClusterConversion.cxx.

22 : AthReentrantAlgorithm(name, pSvcLocator)
23 {}

◆ XAODToInDetClusterConversion() [2/3]

InDet::XAODToInDetClusterConversion::XAODToInDetClusterConversion ( )
delete

◆ XAODToInDetClusterConversion() [3/3]

InDet::XAODToInDetClusterConversion::XAODToInDetClusterConversion ( const XAODToInDetClusterConversion & )
delete

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

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

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ convertHgtdClusters()

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

Definition at line 212 of file XAODToInDetClusterConversion.cxx.

213 {
214 SG::ReadCondHandle<InDetDD::HGTD_DetectorElementCollection> hgtdDetEleHandle( m_HGTDDetEleCollKey, ctx );
215 const InDetDD::HGTD_DetectorElementCollection *hgtdElements( *hgtdDetEleHandle );
216 if (not hgtdDetEleHandle.isValid() or hgtdElements==nullptr) {
217 ATH_MSG_FATAL(m_HGTDDetEleCollKey.fullKey() << " is not available.");
218 return StatusCode::FAILURE;
219 }
220
221 SG::ReadHandle<xAOD::HGTDClusterContainer> inputHgtdClusterContainer = SG::makeHandle( m_inputHgtdClusterContainerKey, ctx );
222 ATH_CHECK( inputHgtdClusterContainer.isValid() );
223 const xAOD::HGTDClusterContainer *inputHgtdClusters = inputHgtdClusterContainer.cptr();
224
225 SG::WriteHandle<::HGTD_ClusterContainer> outputHgtdClusterContainer = SG::makeHandle(m_outputHgtdClusterContainerKey, ctx);
226 ATH_CHECK( outputHgtdClusterContainer.record (std::make_unique<::HGTD_ClusterContainer>(m_hgtdID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
227 ATH_MSG_DEBUG( "Container '" << m_outputHgtdClusterContainerKey.key() << "' initialised" );
228
229 ContainerAccessor<xAOD::HGTDCluster, IdentifierHash, 1>
230 hgtdAccessor ( *inputHgtdClusters,
231 [] (const xAOD::HGTDCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
232 hgtdElements->size());
233
234 const auto& allIdHashes = hgtdAccessor.allIdentifiers();
235 for (const auto& hashId : allIdHashes) {
236 const auto *element = InDetDD::HGTDDetEl::getDetectorElement(hashId,*hgtdElements);
237 if ( element == nullptr ) {
238 ATH_MSG_FATAL( "Invalid hgtd detector element for hash " << hashId);
239 return StatusCode::FAILURE;
240 }
241
242 std::unique_ptr<::HGTD_ClusterCollection> collection = std::make_unique<::HGTD_ClusterCollection>(hashId);
243
244 // Get the detector element and range for the idHash
245 for (const auto& this_range : hgtdAccessor.rangesForIdentifierDirect(hashId)) {
246 for (auto start = this_range.first; start != this_range.second; ++start) {
247 const xAOD::HGTDCluster* in_cluster = *start;
248
249 ::HGTD_Cluster* cluster = nullptr;
250 ATH_CHECK( TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, cluster) );
251 cluster->setHashAndIndex(hashId, collection->size());
252
253 // Add to Collection
254 collection->push_back(cluster);
255 }
256 }
257
258 ::HGTD_ClusterContainer::IDC_WriteHandle lock = outputHgtdClusterContainer->getWriteHandle(hashId);
259 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
260
261 } // loop on hashIds
262
263 ATH_CHECK( outputHgtdClusterContainer.setConst() );
264
265 return StatusCode::SUCCESS;
266 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
StatusCode addOrDelete(std::unique_ptr< T > ptr)
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_inputHgtdClusterContainerKey
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
SG::WriteHandleKey<::HGTD_ClusterContainer > m_outputHgtdClusterContainerKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
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
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
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 79 of file XAODToInDetClusterConversion.cxx.

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

142 {
143 SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> stripDetEleHandle( m_stripDetEleCollKey, ctx );
144 const InDetDD::SiDetectorElementCollection* stripElements( *stripDetEleHandle );
145 if (not stripDetEleHandle.isValid() or stripElements==nullptr) {
146 ATH_MSG_FATAL(m_stripDetEleCollKey.fullKey() << " is not available.");
147 return StatusCode::FAILURE;
148 }
149
150 SG::ReadHandle<xAOD::StripClusterContainer> inputStripClusterContainer = SG::makeHandle( m_inputStripClusterContainerKey, ctx );
151 ATH_CHECK( inputStripClusterContainer.isValid() );
152 const xAOD::StripClusterContainer *inputStripClusters = inputStripClusterContainer.cptr();
153
154 SG::WriteHandle<InDet::SCT_ClusterContainer> outputStripClusterContainer = SG::makeHandle( m_outputStripClusterContainerKey, ctx );
155 ATH_CHECK( outputStripClusterContainer.record (std::make_unique<InDet::SCT_ClusterContainer>(m_stripID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
156 ATH_CHECK( outputStripClusterContainer.isValid() );
157 ATH_MSG_DEBUG( "Container '" << m_outputStripClusterContainerKey.key() << "' initialised" );
158
159 ATH_CHECK( outputStripClusterContainer.symLink( m_stripClusterContainerLinkKey ) );
160
161 // Conversion
162 // Access to the cluster from a given detector element is possible
163 // via the ContainerAccessor.
164 ContainerAccessor<xAOD::StripCluster, IdentifierHash, 1>
165 stripAccessor ( *inputStripClusters,
166 [] (const xAOD::StripCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
167 stripElements->size());
168
169
170
171 const auto& allIdHashes = stripAccessor.allIdentifiers();
172 for (const auto& hashId : allIdHashes) {
173 const InDetDD::SiDetectorElement *element = stripElements->getDetectorElement(hashId);
174 if ( element == nullptr ) {
175 ATH_MSG_FATAL( "Invalid strip detector element for hash " << hashId);
176 return StatusCode::FAILURE;
177 }
178
179 bool isBarrel = element->isBarrel();
180
181 double shift = not isBarrel
182 ? m_lorentzAngleTool->getLorentzShift(hashId, ctx)
183 : 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 cluster->setHashAndIndex(hashId, collection->size());
196
197 // Add to Collection
198 collection->push_back( cluster );
199 }
200 }
201
202 InDet::SCT_ClusterContainer::IDC_WriteHandle lock = outputStripClusterContainer->getWriteHandle(hashId);
203 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
204
205 }
206
207 ATH_CHECK( outputStripClusterContainer.setConst() );
208
209 return StatusCode::SUCCESS;
210 }
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterContainerKey
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 57 of file XAODToInDetClusterConversion.cxx.

58 {
59 ATH_MSG_DEBUG( "Executing " << name() << " ... " );
60
61 if (m_processPixel.value()) {
62 ATH_MSG_DEBUG("Converting Pixel Clusters: xAOD -> InDet");
64 }
65
66 if (m_processStrip.value()) {
67 ATH_MSG_DEBUG("Converting Strip Clusters: xAOD -> InDet");
69 }
70
71 if (m_processHgtd.value()) {
72 ATH_MSG_DEBUG("Converting HGTD Clusters: xAOD -> InDet");
74 }
75
76 return StatusCode::SUCCESS;
77 }
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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode InDet::XAODToInDetClusterConversion::initialize ( )
overridevirtual

Definition at line 25 of file XAODToInDetClusterConversion.cxx.

26 {
27 ATH_MSG_INFO( "Initializing " << name() << " ... " );
28
29 // Pixel Clusters
31 ATH_CHECK( detStore()->retrieve(m_pixelID,"PixelID") );
32
36
37 // Strip Clusters
39 ATH_CHECK( detStore()->retrieve(m_stripID, "SCT_ID") );
40
44
45 ATH_CHECK( m_lorentzAngleTool.retrieve(EnableTool{not m_lorentzAngleTool.empty()}) );
46
47 // Hgtd Clusters
49 ATH_CHECK( detStore()->retrieve(m_hgtdID, "HGTD_ID") );
50
53
54 return StatusCode::SUCCESS;
55 }
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

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

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

◆ operator=()

XAODToInDetClusterConversion & InDet::XAODToInDetClusterConversion::operator= ( const XAODToInDetClusterConversion & )
delete

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

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

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

◆ m_hgtdID

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

Definition at line 69 of file XAODToInDetClusterConversion.h.

69{};

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

87{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 74 of file XAODToInDetClusterConversion.h.

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

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

71{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 88 of file XAODToInDetClusterConversion.h.

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

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

82{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 77 of file XAODToInDetClusterConversion.h.

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

◆ m_pixelDetEleCollKey

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

Definition at line 73 of file XAODToInDetClusterConversion.h.

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

◆ m_pixelID

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

Definition at line 67 of file XAODToInDetClusterConversion.h.

67{};

◆ m_processHgtd

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

Definition at line 92 of file XAODToInDetClusterConversion.h.

92{this, "ProcessHgtd", false};

◆ m_processPixel

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

Definition at line 90 of file XAODToInDetClusterConversion.h.

90{this, "ProcessPixel", false};

◆ m_processStrip

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

Definition at line 91 of file XAODToInDetClusterConversion.h.

91{this, "ProcessStrip", false};

◆ m_stripClusterContainerLinkKey

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

Definition at line 83 of file XAODToInDetClusterConversion.h.

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

◆ m_stripDetEleCollKey

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

Definition at line 79 of file XAODToInDetClusterConversion.h.

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

◆ m_stripID

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

Definition at line 68 of file XAODToInDetClusterConversion.h.

68{};

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