Skip to content

fix for TOF cosmic calib#5895

Merged
shahor02 merged 3 commits intoAliceO2Group:devfrom
noferini:my
Apr 11, 2021
Merged

fix for TOF cosmic calib#5895
shahor02 merged 3 commits intoAliceO2Group:devfrom
noferini:my

Conversation

@noferini
Copy link
Copy Markdown
Collaborator

@noferini noferini commented Apr 9, 2021

Reserve memory to avoid allocation when emplacing_back elements (causing problem for high message rates)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are allocating upfront 320 MB, do you expect so much data in single TF? The clear preserves the capacity of the vector, so the actual allocation will be done only in the first few TFs, once it reached the asymptotic size, it will reuse the space.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was because I didn't know the possible size of this vector. I did some measure on real data and actually I reduced it by a factor 2000.

Comment on lines 26 to 28
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, resetting of such large array is much faster to do via memset(mCounters, 0, sizeof(int)*Geo::NCHANNELS)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 78 to 79
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReadoutWindowData is POD, why do you use vector instead of the span?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not a specific reason... moved to gsl::span

@shahor02
Copy link
Copy Markdown
Collaborator

@noferini thanks, I've also edited/committed on spot to remove unnecessary conversion of span to pointer and using at(i) instead of faster [i]. Will squash when merging after the tests.

@shahor02
Copy link
Copy Markdown
Collaborator

FullCI failure is unrelated, merging.

@shahor02 shahor02 merged commit 3555308 into AliceO2Group:dev Apr 11, 2021
cortesep pushed a commit to cortesep/AliceO2 that referenced this pull request Jun 11, 2021
* fix for TOF cosmic calib

* suppress unneeded dereferencing, [] instead of at()
Sign up for free to 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