Skip to content

Avoid std::map in EventSelectionModule - #16396

Closed
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16396
Closed

Avoid std::map in EventSelectionModule#16396
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16396

Conversation

@ktf

@ktfktf commented May 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@ktf

ktf commented May 26, 2026

Copy link
Copy Markdown
MemberAuthor

@ddobrigk can you have a look here? Looking up in a map is very expensive due to the pointer traversal and constructing it requires one allocation per node which is also expensive. A binary search in a vector of pairs should be much faster. Also, @aalkin was suggesting to use a index table for this?

@ktf

ktf commented May 27, 2026

Copy link
Copy Markdown
MemberAuthor

@ekryshen can you have a look at this?

@ekryshen

Copy link
Copy Markdown
Collaborator

@ktf Thanks, looks reasonable.

Actually I suspect that we don't need this map or vector of pairs any longer. It was introduced as a workaround for early passes of pp2022 where trigger info wasn't aligned with actual bcs. As far as I understand, the trigger functionality is used by EMCAL analysers only. I will check with them if they still need support of old passes. If not, we can simply remove this workaround.

@ekryshen

Copy link
Copy Markdown
Collaborator

@ktf I've just got a confirmation that early passes are not used by ECAL analysers so this functionality is not needed any longer. How should we proceed? We can either merge or close this PR, then I will clean up this code.

@ktf

ktf commented May 29, 2026

Copy link
Copy Markdown
MemberAuthor

removing the mapping completely is of course fine with me. can you take care of it?

@ekryshen

Copy link
Copy Markdown
Collaborator

Done here #16489. I guess we can close this PR

@ktfktf closed this Jun 1, 2026
@ktf

ktf commented Jun 1, 2026

Copy link
Copy Markdown
MemberAuthor

Thanks

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ktf@ekryshen