Skip to content

Commit

Permalink
Updating processes to latest updates at framework
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalan committed May 17, 2022
1 parent e67d138 commit 1c3cc18
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 262 deletions.
16 changes: 8 additions & 8 deletions inc/TRestAxionAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ class TRestAxionAnalysisProcess : public TRestEventProcess {
/// A pointer to the specific TRestAxionEvent
TRestAxionEvent* fAxionEvent; //!

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

protected:
public:
virtual RESTValue GetInputEvent() { return fAxionEvent; }
virtual RESTValue GetOutputEvent() { return fAxionEvent; }
RESTValue GetInputEvent() const override { return fAxionEvent; }
RESTValue GetOutputEvent() const override { return fAxionEvent; }

TRestEvent* ProcessEvent(TRestEvent* evInput);
TRestEvent* ProcessEvent(TRestEvent* evInput) override;

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

EndPrintProcess();
}

/// Returns the name of this process
virtual const char* GetProcessName() { return (TString) "axionAnalysis"; }
const char* GetProcessName() const override { return "axionAnalysis"; }

// Constructor
TRestAxionAnalysisProcess();
Expand All @@ -64,6 +64,6 @@ class TRestAxionAnalysisProcess : public TRestEventProcess {
// Destructor
~TRestAxionAnalysisProcess();

ClassDef(TRestAxionAnalysisProcess, 1);
ClassDefOverride(TRestAxionAnalysisProcess, 1);
};
#endif
19 changes: 8 additions & 11 deletions inc/TRestAxionDetectorResponseProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,32 @@ class TRestAxionDetectorResponseProcess : public TRestEventProcess {
/// A 2-dimensional histogram were we store temporally the response loaded from a data response file.
TH2D* fDetectorResponse; //!

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

protected:
public:
TRestEvent* ProcessEvent(TRestEvent* evInput);
TRestEvent* ProcessEvent(TRestEvent* evInput) override;

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

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "Response filename : " << fResponseFileName << endl;

EndPrintProcess();
}

/// Returns a new instance of this class
TRestEventProcess* Maker() { return new TRestAxionDetectorResponseProcess; }

/// Returns the name of this process
TString GetProcessName() { return (TString) "axionDetectorResponse"; }
const char* GetProcessName() { return (TString) "axionDetectorResponse"; }

// Constructor
TRestAxionDetectorResponseProcess();
Expand All @@ -81,6 +78,6 @@ class TRestAxionDetectorResponseProcess : public TRestEventProcess {
// Destructor
~TRestAxionDetectorResponseProcess();

ClassDef(TRestAxionDetectorResponseProcess, 1);
ClassDefOverride(TRestAxionDetectorResponseProcess, 1);
};
#endif
21 changes: 9 additions & 12 deletions inc/TRestAxionFieldPropagationProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ class TRestAxionFieldPropagationProcess : public TRestEventProcess {

void PrintComplex(ComplexReal);

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

Expand All @@ -165,17 +165,17 @@ class TRestAxionFieldPropagationProcess : public TRestEventProcess {

protected:
public:
void InitProcess();
void InitProcess() override;

any GetInputEvent() { return fAxionEvent; }
any GetOutputEvent() { return fAxionEvent; }
any GetInputEvent() const override { return fAxionEvent; }
any GetOutputEvent() const override { return fAxionEvent; }

TRestEvent* ProcessEvent(TRestEvent* evInput);
TRestEvent* ProcessEvent(TRestEvent* evInput) override;

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "mode: " << fMode << endl;
Expand Down Expand Up @@ -238,11 +238,8 @@ class TRestAxionFieldPropagationProcess : public TRestEventProcess {
ComplexReal& orthogonalPhotonAmplitude, mpfr::mpreal axionMass,
mpfr::mpreal photonMass, mpfr::mpreal Ea, TVector3 from, TVector3 to);

/// Returns a new instance of this class
TRestEventProcess* Maker() { return new TRestAxionFieldPropagationProcess; }

/// Returns the name of this process
TString GetProcessName() { return (TString) "axionFieldPropagation"; }
const char* GetProcessName() const override { return "axionFieldPropagation"; }

// Constructor
TRestAxionFieldPropagationProcess();
Expand All @@ -251,6 +248,6 @@ class TRestAxionFieldPropagationProcess : public TRestEventProcess {
// Destructor
~TRestAxionFieldPropagationProcess();

ClassDef(TRestAxionFieldPropagationProcess, 1);
ClassDefOverride(TRestAxionFieldPropagationProcess, 1);
};
#endif
21 changes: 9 additions & 12 deletions inc/TRestAxionGeneratorProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TRestAxionGeneratorProcess : public TRestEventProcess {
Int_t fCounter = 0; //!

/// A pointer to the axion model stored in TRestRun
TRestAxionSpectrum *fAxionSpectrum; //!
TRestAxionSpectrum* fAxionSpectrum; //!

/// Random number generator
TRandom3* fRandom; //!
Expand Down Expand Up @@ -79,9 +79,9 @@ class TRestAxionGeneratorProcess : public TRestEventProcess {
/// Mode of rotated circle Wall construction
TString fMode; //->

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

Expand All @@ -93,15 +93,15 @@ class TRestAxionGeneratorProcess : public TRestEventProcess {
public:
void InitProcess();

any GetInputEvent() { return (TRestEvent*)NULL; }
any GetOutputEvent() { return fOutputAxionEvent; }
virtual RESTValue GetInputEvent() const override { return nullptr; }
virtual RESTValue GetOutputEvent() const override { return fOutputAxionEvent; }

TRestEvent* ProcessEvent(TRestEvent* eventInput);
TRestEvent* ProcessEvent(TRestEvent* eventInput) override;

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

metadata << "Energy distribution" << endl;
Expand All @@ -126,11 +126,8 @@ class TRestAxionGeneratorProcess : public TRestEventProcess {
EndPrintProcess();
}

/// Returns a new instance of this class
TRestEventProcess* Maker() { return new TRestAxionGeneratorProcess; }

/// Returns the name of this process
TString GetProcessName() { return (TString) "axionGenerator"; }
const char* GetProcessName() const override { return "axionGenerator"; }

// Constructor
TRestAxionGeneratorProcess();
Expand All @@ -139,6 +136,6 @@ class TRestAxionGeneratorProcess : public TRestEventProcess {
// Destructor
~TRestAxionGeneratorProcess();

ClassDef(TRestAxionGeneratorProcess, 1);
ClassDefOverride(TRestAxionGeneratorProcess, 1);
};
#endif
15 changes: 6 additions & 9 deletions inc/TRestAxionOpticsResponseProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,30 @@ class TRestAxionOpticsResponseProcess : public TRestEventProcess {
/// A pointer to the specific TRestAxionEvent
TRestAxionEvent* fAxionEvent; //!

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

protected:
public:
TRestEvent* ProcessEvent(TRestEvent* evInput);
TRestEvent* ProcessEvent(TRestEvent* evInput) override;

any GetInputEvent() { return fAxionEvent; }
any GetOutputEvent() { return fAxionEvent; }

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

EndPrintProcess();
}

/// Returns a new instance of this class
TRestEventProcess* Maker() { return new TRestAxionOpticsResponseProcess; }

/// Returns the name of this process
TString GetProcessName() { return (TString) "axionOpticsResponse"; }
const char* GetProcessName() const override { return "axionOpticsResponse"; }

// Constructor
TRestAxionOpticsResponseProcess();
Expand All @@ -67,6 +64,6 @@ class TRestAxionOpticsResponseProcess : public TRestEventProcess {
// Destructor
~TRestAxionOpticsResponseProcess();

ClassDef(TRestAxionOpticsResponseProcess, 1);
ClassDefOverride(TRestAxionOpticsResponseProcess, 1);
};
#endif
72 changes: 0 additions & 72 deletions inc/TRestAxionTemplateProcess.h

This file was deleted.

19 changes: 8 additions & 11 deletions inc/TRestAxionTransmissionProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,30 @@ class TRestAxionTransmissionProcess : public TRestEventProcess {
/// A pointer to the specific TRestAxionEvent
TRestAxionEvent* fAxionEvent; //!

void InitFromConfigFile();
void InitFromConfigFile() override;

void Initialize();
void Initialize() override;

void LoadDefaultConfig();

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

TRestEvent* ProcessEvent(TRestEvent* evInput);
TRestEvent* ProcessEvent(TRestEvent* evInput) override;

void LoadConfig(std::string cfgFilename, std::string name = "");

/// It prints out the process parameters stored in the metadata structure
void PrintMetadata() {
void PrintMetadata() override {
BeginPrintProcess();

EndPrintProcess();
}

/// Returns a new instance of this class
TRestEventProcess* Maker() { return new TRestAxionTransmissionProcess; }

/// Returns the name of this process
TString GetProcessName() { return (TString) "axionTransmission"; }
const char* GetProcessName() const override { return "axionTransmission"; }

// Constructor
TRestAxionTransmissionProcess();
Expand All @@ -68,6 +65,6 @@ class TRestAxionTransmissionProcess : public TRestEventProcess {
// Destructor
~TRestAxionTransmissionProcess();

ClassDef(TRestAxionTransmissionProcess, 1);
ClassDefOverride(TRestAxionTransmissionProcess, 1);
};
#endif
Loading

0 comments on commit 1c3cc18

Please sign in to comment.