-
Notifications
You must be signed in to change notification settings - Fork 4
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
Moving to generic methods inside TRestRawSignal #100
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Co-authored-by: Luis Antonio Obis Aparicio <[email protected]>
Co-authored-by: Luis Antonio Obis Aparicio <[email protected]>
What about |
inc/TRestRawSignal.h
Outdated
@@ -56,7 +52,7 @@ class TRestRawSignal : public TObject { | |||
TGraph* fGraph; //! | |||
|
|||
/// A std::vector containing the index of points that are identified over threshold. | |||
std::vector<Int_t> fPointsOverThreshold; //! | |||
std::vector<std::pair<Float_t, Float_t> > fPointsOverThreshold; //! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to have fPointsOverThreshold
in correspondence with TRestRawSignal's data structure. x should be time bin(int) and y should be amplitude(unsigned short). Therefore the returned type should be std::vector<std::pair<Int_t, UShort_t> >
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I didn't notice this, I also think it would make more sense <Int_t, UShort_t>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code fPointsOverThreshold
corresponds to the points with the baseline substracted, so for me it doesn't make sense to return std::vector<std::pair<Int_t, Short_t> >
since we will be loosing precision.
I dont' think this would be a good idea since |
…std::pair<Int_t, Float_t>´
Using generic methods inside
TRestRawSignal
after being implemented inside framework rest-for-physics/framework#379Summary of changes:
TRestRawSignal
fPointsOverThreshold
fromstd::vector<Int_t>
tostd::vector<std::pair<Float_t, Float_t> >
GetData
which returnsstd::vector<Float_t>
vector with the baseline substracted