20 using TriggerList = std::vector<const NSWL1::PadTrigger *>;
21 using TriggerMap = std::map<uint32_t, TriggerList>;
22 TriggerMap triggerMap;
26 auto sector =
pt->triggerSectorNumber() - 1;
27 auto endcap =
pt->sideId();
28 if (sector == -1 || endcap == -1) {
29 return StatusCode::FAILURE;
33 auto it = triggerMap.find(
hash);
34 if (
it == triggerMap.end()) {
35 it = triggerMap.insert(std::make_pair(
hash, TriggerList())).first;
37 it->second.push_back(
pt.get());
39 for (
const auto &
item : triggerMap) {
40 const TriggerList &triggerList =
item.second;
41 const auto pt = triggerList[0];
42 const bool sideA =
static_cast<bool>(
pt->sideId());
44 for (
const auto&
pt: triggerList) {
45 newCollection->addTrigger(
pt->bandId(),
pt->phiId(), 0);
47 if (
out->addCollection(newCollection,
out->numberOfCollections()).isFailure()) {
48 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;