NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Result.h
Go to the documentation of this file.
1//***************************************************************************************
4//***************************************************************************************
5
54#pragma once
55
56#include "NAGASH/Global.h"
57#include "NAGASH/MSGTool.h"
58#include "NAGASH/Toolkit.h"
59#include "NAGASH/ConfigTool.h"
60#include "NAGASH/SystTool.h"
61
62namespace NAGASH
63{
67 class Result
68 {
69 public:
70 const TString &GetResultName() { return Name; };
71 const TString &GetOutputFileName() { return FileName; };
72
73 virtual void Combine(std::shared_ptr<Result> result) {}
74 virtual void WriteToFile() {}
75
76 protected:
82 Result(std::shared_ptr<MSGTool> MSG, std::shared_ptr<ConfigTool> c, const TString &rname, const TString &fname = "")
83 : msg(MSG), config(c), toolkit(MSG), Name(rname), FileName(fname) {}
84
85 Result() = delete;
86 Result(const Result &result) = delete;
87 Result &operator=(const Result &result) = delete;
88 Result(Result &&result) = delete;
89 Result &operator=(Result &&result) = delete;
90 virtual ~Result() = default;
91
92 std::shared_ptr<MSGTool> MSGUser();
93 std::shared_ptr<ConfigTool> ConfigUser();
95
96 void SetOutputFileName(const TString &fileName) { FileName = fileName; }
97
98 private:
99 std::shared_ptr<MSGTool> msg;
100 std::shared_ptr<ConfigTool> config;
102 TString Name;
103 TString FileName;
104 };
105
106 inline std::shared_ptr<MSGTool> Result::MSGUser() { return msg; }
107 inline Toolkit *Result::ToolkitUser() { return &toolkit; }
108 inline std::shared_ptr<ConfigTool> Result::ConfigUser() { return config; }
109} // namespace NAGASH
Some global definitions.
Provide virtual interface to manipulate all the results inside NAGASH.
Definition Result.h:68
TString Name
Definition Result.h:102
Result & operator=(Result &&result)=delete
TString FileName
Definition Result.h:103
const TString & GetOutputFileName()
Return the name of the result.
Definition Result.h:71
Result & operator=(const Result &result)=delete
std::shared_ptr< MSGTool > msg
Definition Result.h:99
void SetOutputFileName(const TString &fileName)
Set the output file name of the result.
Definition Result.h:96
virtual ~Result()=default
const TString & GetResultName()
Definition Result.h:70
virtual void WriteToFile()
Definition Result.h:74
Toolkit toolkit
Definition Result.h:101
std::shared_ptr< ConfigTool > ConfigUser()
Return the internal ConfigTool.>
Definition Result.h:108
Result()=delete
Toolkit * ToolkitUser()
Return the internal Toolkit.
Definition Result.h:107
Result(const Result &result)=delete
Result(Result &&result)=delete
std::shared_ptr< MSGTool > MSGUser()
Return the internal MSGTool.
Definition Result.h:106
std::shared_ptr< ConfigTool > config
Definition Result.h:100
virtual void Combine(std::shared_ptr< Result > result)
Return the name of the output file.
Definition Result.h:73
Result(std::shared_ptr< MSGTool > MSG, std::shared_ptr< ConfigTool > c, const TString &rname, const TString &fname="")
virtual interface to write the result to a file.
Definition Result.h:82
Manipulate the Tool classes, give them correct MSGTool inside NAGASH::Job.
Definition Toolkit.h:17