41 {
42
43 SG::ReadHandle<TgcPrepDataContainer> tgcAll{
m_AllBCKey, ctx};
44
47 return StatusCode::FAILURE;
48 }
49
50
51
52 auto tgc3BCHandles =
m_3BCKeys.makeHandles(ctx);
53 for (
int ibc = 0; ibc <
BC_ALL; ibc++){
54 tgc3BCHandles.at(ibc) = std::make_unique<TgcPrepDataContainer>(
m_idHelperSvc->tgcIdHelper().module_hash_max());
55 }
56
58 for (const Muon::TgcPrepData* to_copy : *coll) {
59
60 uint16_t bcBitMap = to_copy->getBcBitMap();
61 std::array<uint16_t, BC_NUM> hasBC{0};
68
69 const Identifier
channelId = to_copy->identify();
70 const Identifier elementId =
m_idHelperSvc->tgcIdHelper().elementID(channelId);
71 std::array<Muon::TgcPrepDataCollection*, BC_ALL> collections{};
72 for (
int ibc = 0; ibc <
BC_ALL; ibc++) {
73 collections[ibc] = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
75
76 if (!hasBC[ibc]) continue;
78 newPrepData->
setHashAndIndex(collections[ibc]->identifyHash(), collections[ibc]->size());
79 collections[ibc]->push_back(newPrepData);
80 }
81 }
82 }
83
84
85 return StatusCode::SUCCESS;
86}
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection