Skip to content

dev: creating decoding method which can be used also in QC ctp#11271

Merged
shahor02 merged 4 commits intoAliceO2Group:devfrom
lietava:ctpdev
May 5, 2023
Merged

dev: creating decoding method which can be used also in QC ctp#11271
shahor02 merged 4 commits intoAliceO2Group:devfrom
lietava:ctpdev

Conversation

@lietava
Copy link
Copy Markdown
Contributor

@lietava lietava commented May 2, 2023

Hi @shahor02 , we are doing code for CTP QC. I realised that it would be useful to have function in decoding which can be used also in:
https://github.com/AliceO2Group/QualityControl/blob/master/Modules/CTP/src/RawDataQcTask.cxx
Do you see any problem with that ?
Any other comments ?
Cheers, R.

@shahor02
Copy link
Copy Markdown
Collaborator

shahor02 commented May 2, 2023

The decoding function itself is fine but using RawDecoderSpec as an include for other processor is not good, may mess up dependencies. It is better to put it into a separate class, even as having only this static method.
Also, to pass the CI, we will need 1st to merge O2 with this method, then open PR for QC.

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 3, 2023

@shahor02 : thanks. I'll create new class. In workflow or in reconstruction ?
Yes, we shall wait with QC for this. btw what is 'CI' ?

@shahor02
Copy link
Copy Markdown
Collaborator

shahor02 commented May 3, 2023

I would put it in the reconstruction, with all framework classes forward declared in the header and included in the implementation.
CI is for the continuous integration (the build test running for every PR)

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 3, 2023

Hi @shahor02 , created separate class. Please, have a look.

@lietava lietava marked this pull request as ready for review May 4, 2023 05:46
@lietava lietava requested a review from a team as a code owner May 4, 2023 05:46
@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 4, 2023

@shahor02 build/O2/o2-dataflow failed. But I can not see any CTP related error ?

void setVerbose(bool v) { mVerbose = v; }
uint32_t getIRRejected() { return mIRRejected; }
uint32_t getTCRRejected() { return mTCRRejected; }
std::vector<uint32_t> getTFOrbits() { return mTFOrbits; }
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.

Here you return a copy of the vector but as far as I can see you never modify it. I guess it can be

const std::vector<uint32_t>& getTFOrbits() const { return mTFOrbits; }

{
std::sort(mTFOrbits.begin(), mTFOrbits.end());
size_t l = mTFOrbits.size();
std::vector<uint32_t> TFOrbits = mDecoder.getTFOrbits();
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.

if you change the getTFOrbits() in the way I've suggested, then here there should be

const auto& TFOrbits = mDecoder.getTFOrbits();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but I modify TFOrbits in the line 36 ?

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.

OK, did not notice the sort. But then before it was applied to the copy rather than to the data member. No it is ok.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I understand, thanks.

shahor02
shahor02 previously approved these changes May 4, 2023
@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

Hi @shahor02 , this can be merged ?

@shahor02
Copy link
Copy Markdown
Collaborator

shahor02 commented May 5, 2023

@lietava it says branch cannot be rebased due to conflicts, can you check?

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

I do not see anything on my web interface . I solved conflict yesterday - see commits - last merge ?

@shahor02
Copy link
Copy Markdown
Collaborator

shahor02 commented May 5, 2023

image
Can you update your dev and try to do git rebase dev from your branch ?

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

I pushed by force. Now I have conflict:
image

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

I resolve the conflict now.

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

Conflict resolved.

@lietava
Copy link
Copy Markdown
Contributor Author

lietava commented May 5, 2023

sorry, I didnt see this
"Can you update your dev and try to do git rebase dev from your branch ?"
I will do.

@shahor02 shahor02 merged commit fe19461 into AliceO2Group:dev May 5, 2023
mdiotti pushed a commit to mdiotti/AliceO2 that referenced this pull request May 25, 2023
…O2Group#11271)

* dev: creating decoding method which can be used also in QC ctp

* dev: decoding moved to separate class

* clang

* fix: Ruben's fixes
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