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

Form clusters from SCT Raw Data Objects. More...

#include <SCT_Clusterization.h>

Inheritance diagram for InDet::SCT_Clusterization:

Public Member Functions

 SCT_Clusterization (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual StatusCode sysInitialize () override
 Override sysInitialize.
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
Usual algorithm methods
virtual StatusCode initialize () override
 Retrieve the tools used and initialize handle keys.
virtual StatusCode execute (const EventContext &ctx) const override
 Form clusters and record them in StoreGate by WriteHandle.
virtual StatusCode finalize () override
 Finalize (nothing done actually)
virtual bool isClonable () const override
 Make this algorithm clonable.

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>
Disallow default instantiation, copy, assignment
 SCT_Clusterization ()=delete
 SCT_Clusterization (const SCT_Clusterization &)=delete
SCT_Clusterizationoperator= (const SCT_Clusterization &)=delete

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
Service and Tool Handles and ID helper
ToolHandle< IRegSelToolm_regionSelector {this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"}
ToolHandle< ISCT_ClusteringToolm_clusteringTool {this, "clusteringTool", "InDet::SCT_ClusteringTool"}
ToolHandle< IInDetConditionsToolm_pSummaryTool {this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Monitoring tool" }
const SCT_IDm_idHelper {nullptr}
Read, Write and Update HandleKeys

StoreGate accesses in AthenaMT way

SG::ReadHandleKey< TrigRoiDescriptorCollectionm_roiCollectionKey {this, "RoIs", "", "RoIs to read in"}
SG::ReadHandleKey< SCT_RDO_Containerm_rdoContainerKey {this, "DataObjectName", "SCT_RDOs", "SCT RDOs"}
SG::WriteHandleKey< SCT_ClusterContainer > m_clusterContainerKey {this, "ClustersName", "SCT_Clusters", "SCT cluster container"}
SG::WriteHandleKey< SiClusterContainer > m_clusterContainerLinkKey {this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"}
SG::WriteHandleKey< IDCInDetBSErrContainerm_flaggedCondDataKey {this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}
SG::UpdateHandleKey< SCT_ClusterContainerCache > m_clusterContainerCacheKey
 For HLT cache.
SG::UpdateHandleKey< IDCInDetBSErrContainer_Cachem_flaggedCondCacheKey
 For HLT cache.
SG::ReadHandleKey< InDet::SiDetectorElementStatusm_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
 Optional read handle to get status data to test whether a SCT detector element is good.
Flags to configure SCT_Clusterization
UnsignedIntegerProperty m_maxFiredStrips {this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."}
UnsignedIntegerProperty m_maxTotalOccupancyPercent {this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."}
BooleanProperty m_roiSeeded {this, "isRoI_Seeded", false, "Use RoI"}
BooleanProperty m_checkBadModules {this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"}
Gaudi::Property< bool > m_useDataPoolWithCache

Detailed Description

Form clusters from SCT Raw Data Objects.

The class loops over an RDO grouping strips and creating collections of clusters, subsequently recorded in StoreGate using WriteHandle(Key). Uses SCT_ConditionsTools to determine which strips to include.

Definition at line 53 of file SCT_Clusterization.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

◆ SCT_Clusterization() [1/3]

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

Constructor with parameters:

Definition at line 29 of file SCT_Clusterization.cxx.

29 :
30 AthReentrantAlgorithm(name, pSvcLocator)
31 {}

◆ SCT_Clusterization() [2/3]

InDet::SCT_Clusterization::SCT_Clusterization ( )
privatedelete

◆ SCT_Clusterization() [3/3]

InDet::SCT_Clusterization::SCT_Clusterization ( const SCT_Clusterization & )
privatedelete

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}

◆ 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::SCT_Clusterization::execute ( const EventContext & ctx) const
overridevirtual

Form clusters and record them in StoreGate by WriteHandle.

Definition at line 72 of file SCT_Clusterization.cxx.

72 {
73 //Monitoring Tool Configuration
74 auto mnt_timer_Total = Monitored::Timer<std::chrono::milliseconds>("TIME_Total");
75 auto mnt_timer_SummaryTool = Monitored::Timer<std::chrono::milliseconds>("TIME_SummaryTool");
76 auto mnt_timer_Clusterize = Monitored::Timer<std::chrono::milliseconds>("TIME_Clusterize");
77 // Register the IdentifiableContainer into StoreGate
78 SG::WriteHandle<SCT_ClusterContainer> clusterContainer{m_clusterContainerKey, ctx};
79 if (m_clusterContainerCacheKey.key().empty()) {
80 ATH_CHECK(clusterContainer.record(std::make_unique<SCT_ClusterContainer>(m_idHelper->wafer_hash_max(), EventContainers::Mode::OfflineFast)));
81 } else {
82 SG::UpdateHandle<SCT_ClusterContainerCache> clusterContainercache{m_clusterContainerCacheKey, ctx};
83 ATH_CHECK(clusterContainer.record(std::make_unique<SCT_ClusterContainer>(clusterContainercache.ptr())));
84 }
85 ATH_MSG_DEBUG("Container '" << clusterContainer.name() << "' initialised");
86
88 ATH_CHECK(clusterContainer.isValid());
89 ATH_MSG_DEBUG("SCT clusters '" << clusterContainer.name() << "' symlinked in StoreGate");
90
91 SG::WriteHandle<IDCInDetBSErrContainer> flaggedCondData{m_flaggedCondDataKey, ctx};
92 if (m_flaggedCondCacheKey.key().empty()) {
93 ATH_CHECK(flaggedCondData.record( std::make_unique<IDCInDetBSErrContainer>(m_idHelper->wafer_hash_max(), std::numeric_limits<IDCInDetBSErrContainer::ErrorCode>::min())));
94 ATH_MSG_DEBUG("Created IDCInDetBSErrContainer w/o using external cache");
95 } else {
96 SG::UpdateHandle<IDCInDetBSErrContainer_Cache> flaggedCondCacheHandle(m_flaggedCondCacheKey, ctx);
97 ATH_CHECK(flaggedCondCacheHandle.isValid() );
98 ATH_CHECK(flaggedCondData.record( std::make_unique<IDCInDetBSErrContainer>(flaggedCondCacheHandle.ptr())) );
99 ATH_MSG_DEBUG("Created SCT IDCInDetBSErrContainer using external cache");
100 }
101 std::unordered_map<IdentifierHash, IDCInDetBSErrContainer::ErrorCode> flaggedCondMap; // temporary store of flagged condition error
102
103 // First, we have to retrieve and access the container, not because we want to
104 // use it, but in order to generate the proxies for the collections, if they
105 // are being provided by a container converter.
106 SG::ReadHandle<SCT_RDO_Container> rdoContainer{m_rdoContainerKey, ctx};
107 ATH_CHECK(rdoContainer.isValid());
108
109 // Anything to dereference the DataHandle will trigger the converter
110 SCT_RDO_Container::const_iterator rdoCollections{rdoContainer->begin()};
111 SCT_RDO_Container::const_iterator rdoCollectionsEnd{rdoContainer->end()};
112 bool dontDoClusterization{false};
113 //new code to remove large numbers of hits (what is large?)
114 if (m_maxTotalOccupancyPercent.value()!=100) {
115 constexpr unsigned int totalNumberOfChannels{6279168};
116 const unsigned int maxAllowableStrips{(totalNumberOfChannels*m_maxTotalOccupancyPercent.value())/100};//integer arithmetic, should be ok
117 unsigned int totalFiredStrips{0};
118 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
119 for (const SCT_RDORawData* rdo: **rdoCollections) {
120 totalFiredStrips += rdo->getGroupSize();
121 }
122 } //iterator is now at the end
123 //reset the iterator
124 rdoCollections = rdoContainer->begin();
125 if (totalFiredStrips > maxAllowableStrips) {
126 ATH_MSG_WARNING("This event has too many hits in the SCT: " << totalFiredStrips << " > " << maxAllowableStrips);
127 dontDoClusterization = true;
128 }
129 }
130 SG::ReadHandle<InDet::SiDetectorElementStatus> sctDetElStatus;
131 if (!m_sctDetElStatus.empty()) {
132 sctDetElStatus=SG::ReadHandle<InDet::SiDetectorElementStatus>(m_sctDetElStatus, ctx);
133 ATH_CHECK( sctDetElStatus.isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
134 }
135
136 if (not dontDoClusterization) {
137 std::unique_ptr<DataPool<SCT_Cluster>> dataItemsPool = nullptr;
138 const bool hasExternalCache = rdoContainer->hasExternalCache();
139 if (!hasExternalCache) {
140 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
141 dataItemsPool->reserve(20000); // Some large default size
142 } else if (m_useDataPoolWithCache) {
143 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
144 // this is per view so let it expand on its own in blocks
145 }
146 // cache to avoid re-allocation inside the loop.
147 // Trying to re-use the vector capacities.
148 // we clear them inside the methods we call
149
150 SCTClusteringCache cache;
151 cache.currentVector.reserve(32);
152 cache.idGroups.reserve(16);
153 cache.tbinGroups.reserve(16);
154 if (not m_roiSeeded.value()) { // Full-scan mode
155
156 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
157 const InDetRawDataCollection<SCT_RDORawData>* rd{*rdoCollections};
158 ATH_MSG_DEBUG("RDO collection size=" << rd->size() << ", Hash="
159 << rd->identifyHash());
160 SCT_ClusterContainer::IDC_WriteHandle lock{
161 clusterContainer->getWriteHandle(rdoCollections.hashId())};
162 if (lock.OnlineAndPresentInAnotherView()) {
164 "Item already in cache , Hash=" << rd->identifyHash());
165 continue;
166 }
167 bool goodModule{
168 m_checkBadModules.value()
169 ? (!m_sctDetElStatus.empty()
170 ? sctDetElStatus->isGood(rd->identifyHash())
171 : m_pSummaryTool->isGood(rd->identifyHash(), ctx))
172 : true};
174 m_checkBadModules.value() && !m_sctDetElStatus.empty(),
175 sctDetElStatus->isGood(rd->identifyHash()),
176 m_pSummaryTool->isGood(rd->identifyHash(), ctx));
177
178 if (!goodModule) {
179 ATH_MSG_DEBUG(" module status is bad");
180 }
181 // Check the RDO is not empty and that the wafer is good according to
182 // the conditions
183 if ((not rd->empty()) and goodModule) {
184 // If more than a certain number of RDOs set module to bad
185 if (m_maxFiredStrips.value()) {
186 unsigned int nFiredStrips{0};
187 for (const SCT_RDORawData* rdo : *rd) {
188 nFiredStrips += rdo->getGroupSize();
189 }
190 if (nFiredStrips > m_maxFiredStrips.value()) {
191 // This should work in the case of a new code or existing, since
192 // the default init is 0
193 constexpr int value =
195 auto [pPair, inserted] =
196 flaggedCondMap.insert({rd->identifyHash(), value});
197 if (not inserted) {
198 pPair->second |= value;
199 }
200 continue;
201 }
202 }
203 // Use one of the specific clustering AlgTools to make clusters
204 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
205 m_clusteringTool->clusterize(
206 *rd, *m_idHelper,
207 !m_sctDetElStatus.empty() ? sctDetElStatus.cptr() : nullptr,
208 cache, dataItemsPool.get(), ctx)};
209 if (clusterCollection) {
210 if (not clusterCollection->empty()) {
211 const IdentifierHash hash{clusterCollection->identifyHash()};
212 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
213 ATH_MSG_DEBUG("Clusters with key '"
214 << hash << "' added to Container\n");
215 } else {
216 ATH_MSG_DEBUG("Don't write empty collections\n");
217 }
218 } else {
219 ATH_MSG_DEBUG("Clustering algorithm found no clusters\n");
220 }
221 }
222 }
223 } else { // enter RoI-seeded mode
224 SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection{
225 m_roiCollectionKey, ctx};
226 ATH_CHECK(roiCollection.isValid());
227 TrigRoiDescriptorCollection::const_iterator roi{roiCollection->begin()};
228 TrigRoiDescriptorCollection::const_iterator roiE{roiCollection->end()};
229 std::vector<IdentifierHash> listOfSCTIds;
230 for (; roi != roiE; ++roi) {
231 listOfSCTIds.clear(); // Prevents needless memory reallocations
232
233 m_regionSelector->lookup(ctx)->HashIDList( **roi, listOfSCTIds );
234
235 ATH_MSG_VERBOSE(**roi);
236 ATH_MSG_VERBOSE("REGTEST: SCT : Roi contains " << listOfSCTIds.size()
237 << " det. Elements");
238 for (size_t i{0}; i < listOfSCTIds.size(); i++) {
239 IdentifierHash id = listOfSCTIds[i];
240 const InDetRawDataCollection<SCT_RDORawData>* RDO_Collection{
241 rdoContainer->indexFindPtr(id)};
242 if (RDO_Collection == nullptr){
243 continue;
244 }
245 bool goodModule;
246 {
247 Monitored::ScopedTimer time_SummaryTool(mnt_timer_SummaryTool);
248 goodModule = {m_checkBadModules.value()
249 ? (!m_sctDetElStatus.empty()
250 ? sctDetElStatus->isGood(id)
251 : m_pSummaryTool->isGood(id, ctx))
252 : true};
254 m_checkBadModules.value() && !m_sctDetElStatus.empty(),
255 sctDetElStatus->isGood(id), m_pSummaryTool->isGood(id));
256 if (!goodModule){
257 ATH_MSG_VERBOSE("module status flagged as BAD");
258 }
259 }
260 // Check the RDO is not empty and that the wafer is good according
261 // to the conditions
262 if ((not RDO_Collection->empty()) and goodModule) {
263 // If more than a certain number of RDOs set module to bad
264 if (m_maxFiredStrips.value()) {
265 unsigned int nFiredStrips{0};
266 for (const SCT_RDORawData* rdo : *RDO_Collection){
267 nFiredStrips += rdo->getGroupSize();
268 }
269 if (nFiredStrips > m_maxFiredStrips.value()) {
270 // This should work in the case of a new code or existing,
271 // since the default init is 0
272 constexpr int value =
274 auto [pPair, inserted] = flaggedCondMap.insert({id, value});
275 if (not inserted) {
276 pPair->second |= value;
277 }
278 continue;
279 }
280 }
281 }
282
283 SCT_ClusterContainer::IDC_WriteHandle lock{
284 clusterContainer->getWriteHandle(listOfSCTIds[i])};
285 if (lock.OnlineAndPresentInAnotherView()) {
286 ATH_MSG_DEBUG("Item already in cache , Hash=" << listOfSCTIds[i]);
287 continue;
288 }
289
290 // Use one of the specific clustering AlgTools to make clusters
291 {
292 Monitored::ScopedTimer time_Clusterize(mnt_timer_Clusterize);
293 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
294 m_clusteringTool->clusterize(
295 *RDO_Collection, *m_idHelper,
296 !m_sctDetElStatus.empty() ? sctDetElStatus.cptr()
297 : nullptr,
298 cache, dataItemsPool.get(), ctx)};
299 if (clusterCollection and (not clusterCollection->empty())) {
300 ATH_MSG_VERBOSE("REGTEST: SCT : clusterCollection contains " << clusterCollection->size() << " clusters");
301 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
302 } else {
303 ATH_MSG_DEBUG("No SCTClusterCollection to write");
304 }
305 }
306 }
307 }
308 }
309 }
310 // Set container to const
311 ATH_CHECK(clusterContainer.setConst());
312
313 // Fill flaggedCondData
314 for (auto [hash, error] : flaggedCondMap) {
315 flaggedCondData->setOrDrop(hash, error);
316 }
317 auto monTime = Monitored::Group(m_monTool, mnt_timer_Total, mnt_timer_Clusterize, mnt_timer_SummaryTool);
318 return StatusCode::SUCCESS;
319 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual IdentifierHash identifyHash() const override final
ToolHandle< ISCT_ClusteringTool > m_clusteringTool
ToolHandle< GenericMonitoringTool > m_monTool
SG::WriteHandleKey< SiClusterContainer > m_clusterContainerLinkKey
ToolHandle< IInDetConditionsTool > m_pSummaryTool
SG::ReadHandleKey< SCT_RDO_Container > m_rdoContainerKey
SG::UpdateHandleKey< IDCInDetBSErrContainer_Cache > m_flaggedCondCacheKey
For HLT cache.
SG::WriteHandleKey< IDCInDetBSErrContainer > m_flaggedCondDataKey
ToolHandle< IRegSelTool > m_regionSelector
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_sctDetElStatus
Optional read handle to get status data to test whether a SCT detector element is good.
UnsignedIntegerProperty m_maxTotalOccupancyPercent
Gaudi::Property< bool > m_useDataPoolWithCache
SG::WriteHandleKey< SCT_ClusterContainer > m_clusterContainerKey
UnsignedIntegerProperty m_maxFiredStrips
SG::UpdateHandleKey< SCT_ClusterContainerCache > m_clusterContainerCacheKey
For HLT cache.
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
pointer_type ptr()
Dereference the pointer.
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
const std::string & name() const
Return the StoreGate ID for the referenced object.
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?

◆ 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

◆ finalize()

StatusCode InDet::SCT_Clusterization::finalize ( )
overridevirtual

Finalize (nothing done actually)

Definition at line 322 of file SCT_Clusterization.cxx.

323 {
324 return StatusCode::SUCCESS;
325 }

◆ initialize()

StatusCode InDet::SCT_Clusterization::initialize ( )
overridevirtual

Retrieve the tools used and initialize handle keys.

Definition at line 34 of file SCT_Clusterization.cxx.

34 {
35 // Get the conditions summary service (continue anyway, just check the pointer
36 // later and declare everything to be 'good' if it is nullptr)
37 ATH_CHECK( m_pSummaryTool.retrieve( DisableTool{!m_checkBadModules.value() || (!m_sctDetElStatus.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED)} ) );
38
40
41 ATH_CHECK(m_rdoContainerKey.initialize());
42 ATH_CHECK(m_clusterContainerKey.initialize());
45 ATH_CHECK(m_flaggedCondDataKey.initialize());
46 ATH_CHECK(m_flaggedCondCacheKey.initialize(not m_flaggedCondCacheKey.key().empty()));
47
48 ATH_CHECK(m_sctDetElStatus.initialize( !m_sctDetElStatus.empty() ));
49
50 // Get the clustering tool
51 ATH_CHECK(m_clusteringTool.retrieve());
52
53 // Get the SCT ID helper
55
56 if (m_roiSeeded.value()) {
57 ATH_CHECK(m_roiCollectionKey.initialize());
58 ATH_CHECK(m_regionSelector.retrieve());
59 } else {
60 ATH_CHECK(m_roiCollectionKey.initialize(false));
61 m_regionSelector.disable();
62 }
63
64 if ( !m_monTool.empty() ) {
65 ATH_CHECK(m_monTool.retrieve() );
66 }
67
68 return StatusCode::SUCCESS;
69 }
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()

virtual bool InDet::SCT_Clusterization::isClonable ( ) const
inlineoverridevirtual

Make this algorithm clonable.

Reimplemented from AthCommonReentrantAlgorithm< Gaudi::Algorithm >.

Definition at line 69 of file SCT_Clusterization.h.

69{ return true; };

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

SCT_Clusterization & InDet::SCT_Clusterization::operator= ( const SCT_Clusterization & )
privatedelete

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

BooleanProperty InDet::SCT_Clusterization::m_checkBadModules {this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"}
private

Definition at line 123 of file SCT_Clusterization.h.

123{this, "checkBadModules", true, "Flag to check bad modules using InDetSCT_ConditionsSummaryTool"};

◆ m_clusterContainerCacheKey

SG::UpdateHandleKey<SCT_ClusterContainerCache> InDet::SCT_Clusterization::m_clusterContainerCacheKey
private
Initial value:
{
this, "ClusterContainerCacheKey", ""}

For HLT cache.

Definition at line 104 of file SCT_Clusterization.h.

104 {
105 this, "ClusterContainerCacheKey", ""};

◆ m_clusterContainerKey

SG::WriteHandleKey<SCT_ClusterContainer> InDet::SCT_Clusterization::m_clusterContainerKey {this, "ClustersName", "SCT_Clusters", "SCT cluster container"}
private

Definition at line 100 of file SCT_Clusterization.h.

100{this, "ClustersName", "SCT_Clusters", "SCT cluster container"};

◆ m_clusterContainerLinkKey

SG::WriteHandleKey<SiClusterContainer> InDet::SCT_Clusterization::m_clusterContainerLinkKey {this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"}
private

Definition at line 101 of file SCT_Clusterization.h.

101{this, "ClustersLinkName_", "SCT_Clusters", "SCT cluster container link name (don't set this)"};

◆ m_clusteringTool

ToolHandle<ISCT_ClusteringTool> InDet::SCT_Clusterization::m_clusteringTool {this, "clusteringTool", "InDet::SCT_ClusteringTool"}
private

Definition at line 87 of file SCT_Clusterization.h.

87{this, "clusteringTool", "InDet::SCT_ClusteringTool"};

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

SG::UpdateHandleKey<IDCInDetBSErrContainer_Cache> InDet::SCT_Clusterization::m_flaggedCondCacheKey
private
Initial value:
{
this, "FlaggedCondCacheKey", ""}

For HLT cache.

Definition at line 106 of file SCT_Clusterization.h.

106 {
107 this, "FlaggedCondCacheKey", ""};

◆ m_flaggedCondDataKey

SG::WriteHandleKey<IDCInDetBSErrContainer> InDet::SCT_Clusterization::m_flaggedCondDataKey {this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"}
private

Definition at line 102 of file SCT_Clusterization.h.

102{this, "SCT_FlaggedCondData", "SCT_FlaggedCondData", "SCT flagged conditions data"};

◆ m_idHelper

const SCT_ID* InDet::SCT_Clusterization::m_idHelper {nullptr}
private

Definition at line 90 of file SCT_Clusterization.h.

90{nullptr};

◆ m_maxFiredStrips

UnsignedIntegerProperty InDet::SCT_Clusterization::m_maxFiredStrips {this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."}
private

Definition at line 120 of file SCT_Clusterization.h.

120{this, "maxFiredStrips", 384, "Threshold of number of fired strips per wafer, to mask noisy modules. 0 disables the per-wafer cut."};

◆ m_maxTotalOccupancyPercent

UnsignedIntegerProperty InDet::SCT_Clusterization::m_maxTotalOccupancyPercent {this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."}
private

Definition at line 121 of file SCT_Clusterization.h.

121{this, "maxTotalOccupancyInPercent", 100, "Threshold of percentage of fired strips for the whole SCT. 100 disables the whole SCT cut."};

◆ m_monTool

ToolHandle< GenericMonitoringTool > InDet::SCT_Clusterization::m_monTool { this, "MonTool", "", "Monitoring tool" }
private

Definition at line 89 of file SCT_Clusterization.h.

89{ this, "MonTool", "", "Monitoring tool" };

◆ m_pSummaryTool

ToolHandle<IInDetConditionsTool> InDet::SCT_Clusterization::m_pSummaryTool {this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}
private

Definition at line 88 of file SCT_Clusterization.h.

88{this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"};

◆ m_rdoContainerKey

SG::ReadHandleKey<SCT_RDO_Container> InDet::SCT_Clusterization::m_rdoContainerKey {this, "DataObjectName", "SCT_RDOs", "SCT RDOs"}
private

Definition at line 99 of file SCT_Clusterization.h.

99{this, "DataObjectName", "SCT_RDOs", "SCT RDOs"};

◆ m_regionSelector

ToolHandle<IRegSelTool> InDet::SCT_Clusterization::m_regionSelector {this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"}
private

Definition at line 86 of file SCT_Clusterization.h.

86{this, "RegSelTool", "RegSelTool/RegSel_SCT", "region selector tool for HLT"};

◆ m_roiCollectionKey

SG::ReadHandleKey<TrigRoiDescriptorCollection> InDet::SCT_Clusterization::m_roiCollectionKey {this, "RoIs", "", "RoIs to read in"}
private

Definition at line 98 of file SCT_Clusterization.h.

98{this, "RoIs", "", "RoIs to read in"};

◆ m_roiSeeded

BooleanProperty InDet::SCT_Clusterization::m_roiSeeded {this, "isRoI_Seeded", false, "Use RoI"}
private

Definition at line 122 of file SCT_Clusterization.h.

122{this, "isRoI_Seeded", false, "Use RoI"};

◆ m_sctDetElStatus

SG::ReadHandleKey<InDet::SiDetectorElementStatus> InDet::SCT_Clusterization::m_sctDetElStatus {this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"}
private

Optional read handle to get status data to test whether a SCT detector element is good.

If set to e.g. SCTDetectorElementStatus the event data will be used instead of the SCT conditions summary tool.

Definition at line 113 of file SCT_Clusterization.h.

114{this, "SCTDetElStatus", "", "Key of SiDetectorElementStatus for SCT"};

◆ m_useDataPoolWithCache

Gaudi::Property<bool> InDet::SCT_Clusterization::m_useDataPoolWithCache
private
Initial value:
{
this, "useDataPoolWithCache", false, "use DataPool With Cache"}

Definition at line 124 of file SCT_Clusterization.h.

124 {
125 this, "useDataPoolWithCache", false, "use DataPool With Cache"};

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