From ac06dcbc9d08cfb1b87a3e49eb3fe98dd56359da Mon Sep 17 00:00:00 2001 From: juanan Date: Wed, 30 Aug 2023 12:02:14 +0200 Subject: [PATCH 1/2] Removal of custom typedef any since it is misleading with std::any, replaced by RESTValue --- inc/TRestRawBaseLineCorrectionProcess.h | 4 ++-- inc/TRestRawCommonNoiseReductionProcess.h | 4 ++-- inc/TRestRawFindResponseSignalProcess.h | 4 ++-- inc/TRestRawMemoryBufferToSignalProcess.h | 4 ++-- inc/TRestRawSignalAddNoiseProcess.h | 4 ++-- inc/TRestRawSignalAnalysisProcess.h | 4 ++-- inc/TRestRawSignalChannelActivityProcess.h | 4 ++-- inc/TRestRawSignalConvolutionFittingProcess.h | 4 ++-- inc/TRestRawSignalFittingProcess.h | 4 ++-- inc/TRestRawSignalGeneralFitProcess.h | 4 ++-- inc/TRestRawSignalIdTaggingProcess.h | 4 ++-- inc/TRestRawSignalRangeReductionProcess.h | 4 ++-- inc/TRestRawSignalRemoveChannelsProcess.h | 4 ++-- inc/TRestRawSignalShapingProcess.h | 4 ++-- inc/TRestRawSignalViewerProcess.h | 4 ++-- inc/TRestRawToSignalProcess.h | 4 ++-- inc/TRestRawVetoAnalysisProcess.h | 4 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/inc/TRestRawBaseLineCorrectionProcess.h b/inc/TRestRawBaseLineCorrectionProcess.h index 7df7d277..efdcaf84 100644 --- a/inc/TRestRawBaseLineCorrectionProcess.h +++ b/inc/TRestRawBaseLineCorrectionProcess.h @@ -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; diff --git a/inc/TRestRawCommonNoiseReductionProcess.h b/inc/TRestRawCommonNoiseReductionProcess.h index 39e35f40..d56346b5 100644 --- a/inc/TRestRawCommonNoiseReductionProcess.h +++ b/inc/TRestRawCommonNoiseReductionProcess.h @@ -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; diff --git a/inc/TRestRawFindResponseSignalProcess.h b/inc/TRestRawFindResponseSignalProcess.h index 015edae4..c8335f18 100644 --- a/inc/TRestRawFindResponseSignalProcess.h +++ b/inc/TRestRawFindResponseSignalProcess.h @@ -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; diff --git a/inc/TRestRawMemoryBufferToSignalProcess.h b/inc/TRestRawMemoryBufferToSignalProcess.h index 71fcaec5..3071f549 100644 --- a/inc/TRestRawMemoryBufferToSignalProcess.h +++ b/inc/TRestRawMemoryBufferToSignalProcess.h @@ -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; diff --git a/inc/TRestRawSignalAddNoiseProcess.h b/inc/TRestRawSignalAddNoiseProcess.h index 18b34803..ad8db4d4 100644 --- a/inc/TRestRawSignalAddNoiseProcess.h +++ b/inc/TRestRawSignalAddNoiseProcess.h @@ -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; diff --git a/inc/TRestRawSignalAnalysisProcess.h b/inc/TRestRawSignalAnalysisProcess.h index 2ee95921..ab28ee96 100644 --- a/inc/TRestRawSignalAnalysisProcess.h +++ b/inc/TRestRawSignalAnalysisProcess.h @@ -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; diff --git a/inc/TRestRawSignalChannelActivityProcess.h b/inc/TRestRawSignalChannelActivityProcess.h index 3e3189e6..1e35e160 100644 --- a/inc/TRestRawSignalChannelActivityProcess.h +++ b/inc/TRestRawSignalChannelActivityProcess.h @@ -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; diff --git a/inc/TRestRawSignalConvolutionFittingProcess.h b/inc/TRestRawSignalConvolutionFittingProcess.h index c405d8ce..fcce36e0 100644 --- a/inc/TRestRawSignalConvolutionFittingProcess.h +++ b/inc/TRestRawSignalConvolutionFittingProcess.h @@ -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; diff --git a/inc/TRestRawSignalFittingProcess.h b/inc/TRestRawSignalFittingProcess.h index 51def46c..15e872da 100644 --- a/inc/TRestRawSignalFittingProcess.h +++ b/inc/TRestRawSignalFittingProcess.h @@ -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; } diff --git a/inc/TRestRawSignalGeneralFitProcess.h b/inc/TRestRawSignalGeneralFitProcess.h index 7fc7a824..53aab454 100644 --- a/inc/TRestRawSignalGeneralFitProcess.h +++ b/inc/TRestRawSignalGeneralFitProcess.h @@ -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; } diff --git a/inc/TRestRawSignalIdTaggingProcess.h b/inc/TRestRawSignalIdTaggingProcess.h index f6d74089..81e335cf 100644 --- a/inc/TRestRawSignalIdTaggingProcess.h +++ b/inc/TRestRawSignalIdTaggingProcess.h @@ -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; diff --git a/inc/TRestRawSignalRangeReductionProcess.h b/inc/TRestRawSignalRangeReductionProcess.h index 1ca54f1f..f440ed08 100644 --- a/inc/TRestRawSignalRangeReductionProcess.h +++ b/inc/TRestRawSignalRangeReductionProcess.h @@ -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; diff --git a/inc/TRestRawSignalRemoveChannelsProcess.h b/inc/TRestRawSignalRemoveChannelsProcess.h index 1df968a1..d71ca2d5 100644 --- a/inc/TRestRawSignalRemoveChannelsProcess.h +++ b/inc/TRestRawSignalRemoveChannelsProcess.h @@ -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; diff --git a/inc/TRestRawSignalShapingProcess.h b/inc/TRestRawSignalShapingProcess.h index 25792a25..3f34ef90 100644 --- a/inc/TRestRawSignalShapingProcess.h +++ b/inc/TRestRawSignalShapingProcess.h @@ -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; diff --git a/inc/TRestRawSignalViewerProcess.h b/inc/TRestRawSignalViewerProcess.h index 7543a879..4d48c777 100644 --- a/inc/TRestRawSignalViewerProcess.h +++ b/inc/TRestRawSignalViewerProcess.h @@ -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; diff --git a/inc/TRestRawToSignalProcess.h b/inc/TRestRawToSignalProcess.h index e35754fd..ac184a05 100644 --- a/inc/TRestRawToSignalProcess.h +++ b/inc/TRestRawToSignalProcess.h @@ -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(); diff --git a/inc/TRestRawVetoAnalysisProcess.h b/inc/TRestRawVetoAnalysisProcess.h index 4a280bf9..89b6d25f 100644 --- a/inc/TRestRawVetoAnalysisProcess.h +++ b/inc/TRestRawVetoAnalysisProcess.h @@ -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; From a66c904ecc874f7c804e374351bb7b7ed616bdfd Mon Sep 17 00:00:00 2001 From: juanan Date: Wed, 30 Aug 2023 15:01:40 +0200 Subject: [PATCH 2/2] Addressing error while loading macros --- macros/REST_Raw_PlotVetoData.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/REST_Raw_PlotVetoData.C b/macros/REST_Raw_PlotVetoData.C index 37eb3359..acb17388 100644 --- a/macros/REST_Raw_PlotVetoData.C +++ b/macros/REST_Raw_PlotVetoData.C @@ -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;