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

Replace use of AtTabInfo with AtSubject/AtObserver implementation in DataHandling namespace #205

Open
anthoak13 opened this issue Apr 21, 2023 · 0 comments

Comments

@anthoak13
Copy link
Member

AtTabInfo is only really used in AtTabMacro, and could be replaced with the subject/observer implementation. It would keep multiple instances of tracking information that may be updated asynchronously and shared across different classes from being in use simultaneously.

Some other class use the AtTabInfoFairRoot class, but not in a way that is required. By design that class is basically an observer in use, just the observing is left to the AtTab class and AtTabInfoFairRoot just acts as a wrapper for a DataHandling::AtBranch subject with easy access to the underlying data (with a similar interface to a smart pointer). This use does not require implementing the AtTabInfo base class. Instead you could have something like an DataHandling::AtFairRoot<T> that keeps the same interface as AtTabFairRoot, but is an DataHandling::AtSubject (which can let its observers know when the underlying object it is referring too has changed) and it is an DataHandling::AtObserver that gets notified if either the branch it is observing, or the event number in the event, has changed. It would also allow for a common interface for accessing entries in the underlying TClonesArray if there is not just one entry (like in the AtMCFitter implementation).

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

No branches or pull requests

1 participant