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;
111 bool dontDoClusterization{
false};
114 constexpr unsigned int totalNumberOfChannels{6279168};
116 unsigned int totalFiredStrips{0};
117 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
119 totalFiredStrips += rdo->getGroupSize();
123 rdoCollections = rdoContainer->begin();
124 if (totalFiredStrips > maxAllowableStrips) {
125 ATH_MSG_WARNING(
"This event has too many hits in the SCT: " << totalFiredStrips <<
" > " << maxAllowableStrips);
126 dontDoClusterization =
true;
132 ATH_CHECK( sctDetElStatus.
isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
135 if (not dontDoClusterization) {
136 std::unique_ptr<DataPool<SCT_Cluster>> dataItemsPool =
nullptr;
137 const bool hasExternalCache = rdoContainer->hasExternalCache();
138 if (!hasExternalCache) {
139 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
140 dataItemsPool->reserve(20000);
142 dataItemsPool = std::make_unique<DataPool<SCT_Cluster>>(ctx);
155 for (; rdoCollections != rdoCollectionsEnd; ++rdoCollections) {
159 SCT_ClusterContainer::IDC_WriteHandle lock{
160 clusterContainer->getWriteHandle(rdoCollections.
hashId())};
161 if (lock.OnlineAndPresentInAnotherView()) {
182 if ((not rd->
empty()) and goodModule) {
185 unsigned int nFiredStrips{0};
187 nFiredStrips += rdo->getGroupSize();
192 constexpr int value =
194 auto [pPair, inserted] =
195 flaggedCondMap.insert({rd->identifyHash(), value});
197 pPair->second |= value;
203 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
207 cache, dataItemsPool.get(), ctx)};
208 if (clusterCollection) {
209 if (not clusterCollection->empty()) {
211 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
213 << hash <<
"' added to Container\n");
228 std::vector<IdentifierHash> listOfSCTIds;
229 for (; roi != roiE; ++roi) {
230 listOfSCTIds.clear();
236 <<
" det. Elements");
237 for (
size_t i{0}; i < listOfSCTIds.size(); i++) {
240 rdoContainer->indexFindPtr(
id)};
241 if (RDO_Collection ==
nullptr){
249 ? sctDetElStatus->isGood(
id)
261 if ((not RDO_Collection->
empty()) and goodModule) {
264 unsigned int nFiredStrips{0};
266 nFiredStrips += rdo->getGroupSize();
271 constexpr int value =
273 auto [pPair, inserted] = flaggedCondMap.insert({id, value});
275 pPair->second |= value;
282 SCT_ClusterContainer::IDC_WriteHandle lock{
283 clusterContainer->getWriteHandle(listOfSCTIds[i])};
284 if (lock.OnlineAndPresentInAnotherView()) {
285 ATH_MSG_DEBUG(
"Item already in cache , Hash=" << listOfSCTIds[i]);
292 std::unique_ptr<SCT_ClusterCollection> clusterCollection{
297 cache, dataItemsPool.get(), ctx)};
298 if (clusterCollection and (not clusterCollection->empty())) {
299 ATH_MSG_VERBOSE(
"REGTEST: SCT : clusterCollection contains " << clusterCollection->size() <<
" clusters");
300 ATH_CHECK(lock.addOrDelete(std::move(clusterCollection)));
313 for (
auto [hash,
error] : flaggedCondMap) {
314 flaggedCondData->setOrDrop(hash,
error);
317 return StatusCode::SUCCESS;