Skip to content

Commit

Permalink
Merge pull request #121 from rest-for-physics/any_to_RESTValue
Browse files Browse the repository at this point in the history
Removal of custom typedef any since it is misleading with std::any
  • Loading branch information
juanangp authored Sep 6, 2023
2 parents d14d457 + a66c904 commit 23ff62b
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions inc/TRestRawBaseLineCorrectionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class TRestRawBaseLineCorrectionProcess : public TRestEventProcess {
Bool_t fRangeEnabled = false; //!

public:
any GetInputEvent() const override { return fInputEvent; }
any GetOutputEvent() const override { return fOutputEvent; }
RESTValue GetInputEvent() const override { return fInputEvent; }
RESTValue GetOutputEvent() const override { return fOutputEvent; }

void InitProcess() override;

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawCommonNoiseReductionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class TRestRawCommonNoiseReductionProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fInputEvent; }
any GetOutputEvent() const override { return fOutputEvent; }
RESTValue GetInputEvent() const override { return fInputEvent; }
RESTValue GetOutputEvent() const override { return fOutputEvent; }

void InitProcess() override;

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawFindResponseSignalProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class TRestRawFindResponseSignalProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fInputSignalEvent; }
any GetOutputEvent() const override { return fOutputSignalEvent; }
RESTValue GetInputEvent() const override { return fInputSignalEvent; }
RESTValue GetOutputEvent() const override { return fOutputSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawMemoryBufferToSignalProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class TRestRawMemoryBufferToSignalProcess : public TRestEventProcess {

protected:
public:
any GetInputEvent() const override { return any((TRestEvent*)nullptr); }
any GetOutputEvent() const override { return fOutputRawSignalEvent; }
RESTValue GetInputEvent() const override { return RESTValue((TRestEvent*)nullptr); }
RESTValue GetOutputEvent() const override { return fOutputRawSignalEvent; }

void InitProcess() override;

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalAddNoiseProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class TRestRawSignalAddNoiseProcess : public TRestEventProcess {
inline void SetNoiseLevel(Double_t noiseLevel) { fNoiseLevel = noiseLevel; }

/// Returns a pointer to the input signal event
any GetInputEvent() const override { return fInputSignalEvent; }
RESTValue GetInputEvent() const override { return fInputSignalEvent; }

/// Returns a pointer to the output signal event
any GetOutputEvent() const override { return fOutputSignalEvent; }
RESTValue GetOutputEvent() const override { return fOutputSignalEvent; }

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class TRestRawSignalAnalysisProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fSignalEvent; }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return fSignalEvent; }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalChannelActivityProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class TRestRawSignalChannelActivityProcess : public TRestEventProcess {
void Initialize() override;

public:
any GetInputEvent() const override { return fSignalEvent; }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return fSignalEvent; }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalConvolutionFittingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class TRestRawSignalConvolutionFittingProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fRawSignalEvent; }
any GetOutputEvent() const override { return fRawSignalEvent; }
RESTValue GetInputEvent() const override { return fRawSignalEvent; }
RESTValue GetOutputEvent() const override { return fRawSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalFittingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class TRestRawSignalFittingProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fRawSignalEvent; }
any GetOutputEvent() const override { return fRawSignalEvent; }
RESTValue GetInputEvent() const override { return fRawSignalEvent; }
RESTValue GetOutputEvent() const override { return fRawSignalEvent; }

inline Double_t GetShaping() const { return fShaping; }
inline Double_t GetStartPosition() const { return fStartPosition; }
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalGeneralFitProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class TRestRawSignalGeneralFitProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fRawSignalEvent; }
any GetOutputEvent() const override { return fRawSignalEvent; }
RESTValue GetInputEvent() const override { return fRawSignalEvent; }
RESTValue GetOutputEvent() const override { return fRawSignalEvent; }

TF1* GetFunction() { return fFitFunc; }

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalIdTaggingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class TRestRawSignalIdTaggingProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fSignalEvent; }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return fSignalEvent; }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalRangeReductionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class TRestRawSignalRangeReductionProcess : public TRestEventProcess {
inline TVector2 GetDigitizationInputRange() const { return fDigitizationInputRange; }
void SetDigitizationInputRange(const TVector2& range);

any GetInputEvent() const override { return fInputRawSignalEvent; }
any GetOutputEvent() const override { return fOutputRawSignalEvent; }
RESTValue GetInputEvent() const override { return fInputRawSignalEvent; }
RESTValue GetOutputEvent() const override { return fOutputRawSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalRemoveChannelsProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class TRestRawSignalRemoveChannelsProcess : public TRestEventProcess {
TVector2 fSignalRange = TVector2(-1, -1);

public:
any GetInputEvent() const override { return fInputSignalEvent; }
any GetOutputEvent() const override { return fOutputSignalEvent; }
RESTValue GetInputEvent() const override { return fInputSignalEvent; }
RESTValue GetOutputEvent() const override { return fOutputSignalEvent; }

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalShapingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class TRestRawSignalShapingProcess : public TRestEventProcess {
inline Double_t GetShapingGain() const { return fShapingGain; }
inline void SetShapingGain(Double_t shapingGain) { fShapingGain = shapingGain; }

any GetInputEvent() const override { return fInputSignalEvent; }
any GetOutputEvent() const override { return fOutputSignalEvent; }
RESTValue GetInputEvent() const override { return fInputSignalEvent; }
RESTValue GetOutputEvent() const override { return fOutputSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawSignalViewerProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class TRestRawSignalViewerProcess : public TRestEventProcess {
// add here the members of your event process

public:
any GetInputEvent() const override { return fSignalEvent; }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return fSignalEvent; }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawToSignalProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class TRestRawToSignalProcess : public TRestEventProcess {
void LoadDefaultConfig();

public:
any GetInputEvent() const override { return any((TRestEvent*)nullptr); }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return RESTValue((TRestEvent*)nullptr); }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

virtual void InitProcess() override {
fRunOrigin = fRunInfo->GetRunNumber();
Expand Down
4 changes: 2 additions & 2 deletions inc/TRestRawVetoAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class TRestRawVetoAnalysisProcess : public TRestEventProcess {

protected:
public:
any GetInputEvent() const override { return fSignalEvent; }
any GetOutputEvent() const override { return fSignalEvent; }
RESTValue GetInputEvent() const override { return fSignalEvent; }
RESTValue GetOutputEvent() const override { return fSignalEvent; }

void InitProcess() override;
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
Expand Down
2 changes: 1 addition & 1 deletion macros/REST_Raw_PlotVetoData.C
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Int_t REST_Raw_PlotVetoData(
obsID = aTree->GetObservableID(obsNameTime[i]);
peakTimeMap.clear();

any a = aTree->GetObservable(obsID);
auto a = aTree->GetObservable(obsID);

a >> peakTimeMap;

Expand Down

0 comments on commit 23ff62b

Please sign in to comment.