Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing cases in which the number starts with 0 and is considered base 8 #1526

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

chiarazampolli
Copy link
Collaborator

@shahor02
I am still checking why I had wc -l...

Copy link

github-actions bot commented Mar 6, 2024

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2022-pp-apass4
async-2023-pbpb-apass
async-2023-pp-apass1
async-data
async-mc
async-2022-pp-apass6

@chiarazampolli
Copy link
Collaborator Author

In this case, -l gives a negative value --> so I take the substring from the end:
e.g.:
3027145464:-9 --> 027145464
-c gives a positive value, and it is used as offset for the substring:
e.g.:
3027145464:1 --> 027145464
So the net result is the same.
I think that -c is better, because -l will always be 1, no matter the length of the proc_id.

@chiarazampolli
Copy link
Collaborator Author

Note that with this script, we don't get the last 10 or 9 digits, as in the comment, but the last 9 (base 32) or 8 (base 16).
To get the last 10 (or 9), we could just use:

ALIEN_PROC_ID_OFFSET_INT32=$((10#${ALIEN_PROC_ID: -10}))
ALIEN_PROC_ID_OFFSET_INT16=$((10#${ALIEN_PROC_ID: -9}))

I will try with more time tomorrow.

@chiarazampolli
Copy link
Collaborator Author

Hello @shahor02 , @davidrohr ,

This seems much better to me. Can you please check?

Chiara

@chiarazampolli
Copy link
Collaborator Author

Hello @davidrohr , @shahor02 ,

Any comment about this PR?

Chiara

@davidrohr
Copy link
Collaborator

I didn't test it, but fine with me

@shahor02
Copy link
Collaborator

Fine for me

@chiarazampolli chiarazampolli merged commit 8de3655 into AliceO2Group:master Mar 18, 2024
6 checks passed
@noferini noferini added async-2023-pbpb-apass4 Request porting to async-2023-pbpb-apass4 and removed async-2023-pbpb-apass3 labels Apr 18, 2024
@benedikt-voelkel benedikt-voelkel removed the async-2023-pbpb-apass4 Request porting to async-2023-pbpb-apass4 label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants