83 ATH_CHECK(clusterContainer.
record(std::make_unique<SCT_ClusterContainer>(clusterContainercache.
ptr())));
89 ATH_MSG_DEBUG(
"SCT clusters '" << clusterContainer.
name() <<
"' symlinked in StoreGate");
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");
98 ATH_CHECK(flaggedCondData.
record( std::make_unique<IDCInDetBSErrContainer>(flaggedCondCacheHandle.
ptr())) );
99 ATH_MSG_DEBUG(
"Created SCT IDCInDetBSErrContainer using external cache");
101 std::unordered_map<IdentifierHash, IDCInDetBSErrContainer::ErrorCode> flaggedCondMap;
112 bool dontDoClusterization{
false};
115 constexpr unsigned int totalNumberOfChannels{6279168};
117 unsigned int totalFiredStrips{0};
118 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
120 totalFiredStrips += rdo->getGroupSize();
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;
133 ATH_CHECK( sctDetElStatus.
isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
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);
143 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
156 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
160 SCT_ClusterContainer::IDC_WriteHandle lock{
161 clusterContainer->getWriteHandle(rdoCollections.
hashId())};
162 if (lock.OnlineAndPresentInAnotherView()) {
183 if ((not rd->
empty()) and goodModule) {
186 unsigned int nFiredStrips{0};
188 nFiredStrips += rdo->getGroupSize();
193 constexpr int value =
195 auto [pPair, inserted] =
196 flaggedCondMap.insert({rd->identifyHash(), value});
198 pPair->second |= value;
204 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
208 cache, dataItemsPool.get(), ctx)};
209 if (clusterCollection) {
210 if (not clusterCollection->empty()) {
212 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
214 << hash <<
"' added to Container\n");
229 std::vector<IdentifierHash> listOfSCTIds;
230 for (; roi != roiE; ++roi) {
231 listOfSCTIds.clear();
237 <<
" det. Elements");
238 for (
size_t i{0}; i < listOfSCTIds.size(); i++) {
241 rdoContainer->indexFindPtr(
id)};
242 if (RDO_Collection ==
nullptr){
250 ? sctDetElStatus->isGood(
id)
262 if ((not RDO_Collection->
empty()) and goodModule) {
265 unsigned int nFiredStrips{0};
267 nFiredStrips += rdo->getGroupSize();
272 constexpr int value =
274 auto [pPair, inserted] = flaggedCondMap.insert({id, value});
276 pPair->second |= value;
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]);
293 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
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)));
314 for (
auto [hash,
error] : flaggedCondMap) {
315 flaggedCondData->setOrDrop(hash,
error);
318 return StatusCode::SUCCESS;