Skip to content

Commit

Permalink
Merge pull request #471 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 committed Sep 6, 2023
2 parents cad41cd + dd96a3b commit 2ecf709
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions source/framework/analysis/inc/TRestBenchMarkProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class TRestBenchMarkProcess : public TRestEventProcess {

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

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

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

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

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

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

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

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

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

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

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class TRestRealTimeAddInputFileProcess : public TRestEventProcess {
// if you don't want to save them as "metadata".

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

void InitProcess() override;

Expand Down
4 changes: 2 additions & 2 deletions source/framework/analysis/inc/TRestRealTimeDrawingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class TRestRealTimeDrawingProcess : public TRestEventProcess {

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

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

Expand Down
4 changes: 2 additions & 2 deletions source/framework/analysis/inc/TRestSummaryProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class TRestSummaryProcess : public TRestEventProcess {

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

TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;

Expand Down
2 changes: 1 addition & 1 deletion source/framework/core/src/TRestMetadata.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2305,7 +2305,7 @@ std::string TRestMetadata::GetConfigBuffer() { return configBuffer; }
/// All kinds of data member can be found, including non-streamed
/// data member and base-class data member
string TRestMetadata::GetDataMemberValue(string memberName) {
return any(this, this->ClassName()).GetDataMemberValueString(memberName);
return RESTValue(this, this->ClassName()).GetDataMemberValueString(memberName);
}

///////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions source/framework/core/src/TRestTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ void TRestTask::PrintArgumentHelp() {
} else if (fMode == 2) {
RESTError << "Macro class \"" << this->ClassName() << "\" gets invalided input!" << RESTendl;
RESTError << "You should give the following arguments ( * : necessary input):" << RESTendl;
unsigned int n = any(this).GetNumberOfDataMembers();
unsigned int n = RESTValue(this).GetNumberOfDataMembers();
for (unsigned int i = 1; i < n; i++) {
if (i < fNRequiredArgument + 1) RESTError << "*";
RESTError << any(this).GetDataMember(i).name << RESTendl;
RESTError << RESTValue(this).GetDataMember(i).name << RESTendl;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion source/framework/tools/inc/TRestReflector.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ TRestReflector WrapType(std::string typeName);
void CloneAny(TRestReflector from, TRestReflector to);
}; // namespace REST_Reflection

typedef REST_Reflection::TRestReflector any;
typedef REST_Reflection::TRestReflector RESTValue;

class RESTVirtualConverter {
Expand Down

0 comments on commit 2ecf709

Please sign in to comment.