Skip to content

Conversation

@FelixofRivia
Copy link

Updating data structures to comply with RNTuples (and better c++).

Copy link
Contributor

@siilieva siilieva left a comment

Choose a reason for hiding this comment

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

lets remove the previous hit constructor versions as we add the new ones
and please use a more explicit commit message

LOG(DEBUG) << "signal created";
}

AdvMuFilterHit::AdvMuFilterHit(Int_t detID, const std::vector<const AdvMuFilterPoint*>& V)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can safely remove the previous version of this constructor in the lines above
AdvMuFilterHit::AdvMuFilterHit(Int_t detID, const std::vector<AdvMuFilterPoint*>& V)

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait a sec, shouldn't this be const std::vector<AdvMuFilterPoint>&?
AFAIK the recommended way to store and read classes in TTree and RNTuple is as std::vector<T> unless not possible.

Copy link
Author

Choose a reason for hiding this comment

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

I think we can safely remove the previous version of this constructor in the lines above AdvMuFilterHit::AdvMuFilterHit(Int_t detID, const std::vector<AdvMuFilterPoint*>& V)

I agree, I did not remove it because i feared it would brake the current digitization

Copy link
Author

Choose a reason for hiding this comment

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

Wait a sec, shouldn't this be const std::vector<AdvMuFilterPoint>&? AFAIK the recommended way to store and read classes in TTree and RNTuple is as std::vector<T> unless not possible.

That would be my ideal implementation too, as a minimal change from the current digitization i kept the pointers (also if we implement this as the only constructor the current digitization would definetly break)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can safely remove the previous version of this constructor in the lines above AdvMuFilterHit::AdvMuFilterHit(Int_t detID, const std::vector<AdvMuFilterPoint*>& V)

I agree, I did not remove it because i feared it would brake the current digitization
ok, then we can drop that removal for now, especially since we have a large PR by Nayana that relies on the old format.
We can factorize all these updates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait a sec, shouldn't this be const std::vector<AdvMuFilterPoint>&? AFAIK the recommended way to store and read classes in TTree and RNTuple is as std::vector<T> unless not possible.

That would be my ideal implementation too, as a minimal change from the current digitization i kept the pointers (also if we implement this as the only constructor the current digitization would definetly break)

hm, then go ahead with your ideal, also advised, implementation, changing also the digitization.
Lets have all that in the PR.

explicit AdvMuFilterHit(Int_t detID);

// Constructor from MuFilterPoint
AdvMuFilterHit(Int_t detID, const std::vector<AdvMuFilterPoint*>&);
Copy link
Contributor

Choose a reason for hiding this comment

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

AdvMuFilterHit(Int_t detID, const std::vector<AdvMuFilterPoint*>&);
this is no longer needed if we have the new version with const pointers

LOG(DEBUG) << "signal created";
}

AdvTargetHit::AdvTargetHit(Int_t detID, const std::vector<const AdvTargetPoint*>& V)
Copy link
Contributor

Choose a reason for hiding this comment

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

same as for the constructor in AdvMuFilter

explicit AdvTargetHit(Int_t detID);

// Constructor from AdvTargetPoint
AdvTargetHit(Int_t detID, const std::vector<AdvTargetPoint*>&);
Copy link
Contributor

Choose a reason for hiding this comment

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

same as for the constructor in AdvMuFilter

Copy link
Contributor

@olantwin olantwin left a comment

Choose a reason for hiding this comment

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

We should store std::vector<T>. The only case where I know it's not possible is for std::vector<genfit::Track*>

@FelixofRivia
Copy link
Author

Thanks for the feedback, should i create a new folder "rntuple" with the new digitization code (and the following updated processes)? In order to leave the current digi task untouched and later at some point replace it.

@siilieva
Copy link
Contributor

Thanks for the feedback, should i create a new folder "rntuple" with the new digitization code (and the following updated processes)? In order to leave the current digi task untouched and later at some point replace it.

I'd work directly on the existing code. We have the previous version of the repo tagged (25.04), so we're safe to officially start migrating to RNTuple

@olantwin
Copy link
Contributor

Thanks for the feedback, should i create a new folder "rntuple" with the new digitization code (and the following updated processes)? In order to leave the current digi task untouched and later at some point replace it.

I'd work directly on the existing code. We have the previous version of the repo tagged (25.04), so we're safe to officially start migrating to RNTuple

I agree, we should avoid having multiple versions. We have git for that. We can keep this unmerged until after Nayana's changes and then resolve any conflicts that might pop up.

@FelixofRivia
Copy link
Author

Thanks for the feedback, should i create a new folder "rntuple" with the new digitization code (and the following updated processes)? In order to leave the current digi task untouched and later at some point replace it.

I'd work directly on the existing code. We have the previous version of the repo tagged (25.04), so we're safe to officially start migrating to RNTuple

Understood, but I am not using FairTask for the digi, just plain c++

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants