Moving to generic methods inside TRestRawSignal#100
Conversation
for more information, see https://pre-commit.ci
Co-authored-by: Luis Antonio Obis Aparicio <35803280+lobis@users.noreply.github.com>
Co-authored-by: Luis Antonio Obis Aparicio <35803280+lobis@users.noreply.github.com>
|
What about |
|
|
||
| /// 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.
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.
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.
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
TRestRawSignalafter being implemented inside framework rest-for-physics/framework#379Summary of changes:
TRestRawSignalfPointsOverThresholdfromstd::vector<Int_t>tostd::vector<std::pair<Float_t, Float_t> >GetDatawhich returnsstd::vector<Float_t>vector with the baseline substracted