Commit 79366a3961151f2127c4c1c734fe463b61df458d
1 parent
aef1225b
Exists in
JUNO_JEDI
Add process to sum JUNO/JEDI parameters between two energies
Showing
5 changed files
with
461 additions
and
3 deletions
Show diff stats
src/ExternLib/GetJunoJediEnergy/AMDAPlugin.cc
... | ... | @@ -49,6 +49,7 @@ DESCRIPTION |
49 | 49 | //----------------------------------------------------------------------------- |
50 | 50 | |
51 | 51 | #include "GetJunoJediEnergyProcess.hh" |
52 | +#include "GetJunoJediSumEnergyProcess.hh" | |
52 | 53 | #include "ServicesServer.hh" |
53 | 54 | #include "PluginManager.hh" |
54 | 55 | |
... | ... | @@ -80,8 +81,12 @@ extern "C" void registerPlugin(AMDA::Plugins::PluginManager & pm) |
80 | 81 | ServicesServer::getInstance()->addProcessFactory("getJunoJediLowerEnergy", factProcessGetJunoJediLowerEnergy); |
81 | 82 | |
82 | 83 | ProcessFactory factProcessGetJunoJediUpperEnergy = boost::factory<AMDA::JunoJedi::GetJunoJediUpperEnergyProcess*>(); |
83 | - | |
84 | 84 | ServicesServer::getInstance()->addProcessFactory("getJunoJediUpperEnergy", factProcessGetJunoJediUpperEnergy); |
85 | - | |
86 | - ServicesServer::getInstance()->linkProcessWithPlugin("getJunoJediUpperEnergy", pm.getCurrentPluginPath()); | |
85 | + | |
86 | + ProcessFactory factProcessGetJunoJediSumEnergy = boost::factory<AMDA::JunoJedi::GetJunoJediSumEnergyProcess*>(); | |
87 | + ServicesServer::getInstance()->addProcessFactory("getJunoJediSumEnergy", factProcessGetJunoJediSumEnergy); | |
88 | + | |
89 | + ServicesServer::getInstance()->linkProcessWithPlugin("getJunoJediLowerEnergy", pm.getCurrentPluginPath()); | |
90 | + ServicesServer::getInstance()->linkProcessWithPlugin("getJunoJediUpperEnergy", pm.getCurrentPluginPath()); | |
91 | + ServicesServer::getInstance()->linkProcessWithPlugin("getJunoJediSumEnergy", pm.getCurrentPluginPath()); | |
87 | 92 | } | ... | ... |
... | ... | @@ -0,0 +1,123 @@ |
1 | +/* | |
2 | + * GetJunoJediSumEnergy.hh | |
3 | + * | |
4 | + * Created on: Aug 25, 2017 | |
5 | + * Author: AKKA | |
6 | + */ | |
7 | + | |
8 | +#ifndef GetJunoJediSumEnergy_HH_ | |
9 | +#define GetJunoJediSumEnergy_HH_ | |
10 | + | |
11 | +#include "vector" | |
12 | + | |
13 | +#include <boost/algorithm/string.hpp> | |
14 | +#include <boost/lexical_cast.hpp> | |
15 | + | |
16 | +#include "AMDA_exception.hh" | |
17 | +#include "DicError.hh" | |
18 | + | |
19 | +#include "Parameter.hh" | |
20 | +#include "ParamData.hh" | |
21 | +#include "Operation.hh" | |
22 | + | |
23 | +using namespace std; | |
24 | +using namespace boost; | |
25 | +using namespace AMDA::Parameters; | |
26 | + | |
27 | +namespace AMDA { | |
28 | + namespace JunoJedi { | |
29 | + | |
30 | + namespace Base { | |
31 | + | |
32 | + /** | |
33 | + * @class Base::GetJunoJediSumEnergy | |
34 | + * @brief Compute Juno Jedi sum energy | |
35 | + */ | |
36 | + class GetJunoJediSumEnergy : public Operation { | |
37 | + public: | |
38 | + | |
39 | + /** | |
40 | + * @brief Default Constructor. | |
41 | + */ | |
42 | + GetJunoJediSumEnergy(Process& pProcess) : Operation(pProcess) { | |
43 | + } | |
44 | + | |
45 | + /** | |
46 | + * @brief Destructor. | |
47 | + */ | |
48 | + virtual ~GetJunoJediSumEnergy() { | |
49 | + } | |
50 | + | |
51 | + | |
52 | + protected: | |
53 | + }; | |
54 | + } | |
55 | + | |
56 | + /** | |
57 | + * @class GetJunoJediEnergy | |
58 | + * @brief Compute Juno Jedi energy. | |
59 | + */ | |
60 | + template<class TParamData> | |
61 | + class GetJunoJediSumEnergy : public Base::GetJunoJediSumEnergy { | |
62 | + public: | |
63 | + | |
64 | + /** | |
65 | + * @brief Constructor. | |
66 | + * @details Create the ParamData type of the input ParamData. | |
67 | + */ | |
68 | + GetJunoJediSumEnergy(Process& pProcess, TParamData& paramInput, | |
69 | + ParamDataTab2DFloat& lower_energy_param_input, ParamDataTab2DFloat& upper_energy_param_input, double eMin, double eMax) | |
70 | + : Base::GetJunoJediSumEnergy(pProcess), _paramInput(paramInput), _paramOutput(new ParamDataTab1DFloat()), | |
71 | + _lower_energy_param_input(lower_energy_param_input), _upper_energy_param_input(upper_energy_param_input), _eMin(eMin), _eMax(eMax) { | |
72 | + _paramDataOutput = _paramOutput; | |
73 | + } | |
74 | + | |
75 | + /** | |
76 | + * @overload Operation::write(ParamDataIndexInfo &pParamDataIndexInfo) | |
77 | + */ | |
78 | + void write(ParamDataIndexInfo &pParamDataIndexInfo) { | |
79 | + unsigned int index = pParamDataIndexInfo._startIndex; | |
80 | + for (; index < pParamDataIndexInfo._startIndex + pParamDataIndexInfo._nbDataToProcess; index++) { | |
81 | + _paramOutput->pushTime(_paramInput.getTime(index)); | |
82 | + Tab2DData<float> data = _paramInput.getDataList()[index]; | |
83 | + Tab2DData<float> lowerEnData = _lower_energy_param_input.getDataList()[index]; | |
84 | + Tab2DData<float> upperEnData = _upper_energy_param_input.getDataList()[index]; | |
85 | + std::vector<float> res; | |
86 | + res.resize(data.getDim1Size()); | |
87 | + for (int i = 0; i < data.getDim1Size(); ++i) { | |
88 | + float sum = 0.; | |
89 | + for (int j = 0; j < data.getDim2Size(); ++j) { | |
90 | + if (lowerEnData[i][j] >= _eMin && upperEnData[i][j] <= _eMax) { | |
91 | + if (!isNAN(data[i][j])) | |
92 | + sum += data[i][j]; | |
93 | + } | |
94 | + } | |
95 | + res[i] = sum; | |
96 | + } | |
97 | + _paramOutput->getDataList().push_back(res); | |
98 | + } | |
99 | + } | |
100 | + | |
101 | + private: | |
102 | + /** | |
103 | + * @brief It is the channel of calibration. | |
104 | + */ | |
105 | + TParamData &_paramInput; | |
106 | + | |
107 | + /** | |
108 | + * @brief It is the channel of the data shifted. | |
109 | + */ | |
110 | + ParamDataTab1DFloat *_paramOutput; | |
111 | + | |
112 | + ParamDataTab2DFloat& _lower_energy_param_input; | |
113 | + ParamDataTab2DFloat& _upper_energy_param_input; | |
114 | + double _eMin; | |
115 | + double _eMax; | |
116 | + | |
117 | + | |
118 | + | |
119 | + }; | |
120 | + | |
121 | + } /* namespace JunoJedi */ | |
122 | +} /* namespace AMDA */ | |
123 | +#endif /* GetJunoJediSumEnergy_HH_ */ | ... | ... |
src/ExternLib/GetJunoJediEnergy/GetJunoJediSumEnergyCreator.hh
0 → 100644
... | ... | @@ -0,0 +1,170 @@ |
1 | +/* | |
2 | + * GetJunoJediSumEnergyCreator.hh | |
3 | + * | |
4 | + * Created on: Jun 27, 2023 | |
5 | + * Author: BRE | |
6 | + */ | |
7 | + | |
8 | +#ifndef GetJunoJediSumEnergyCreator_HH_ | |
9 | +#define GetJunoJediSumEnergyCreator_HH_ | |
10 | + | |
11 | +#include "DicError.hh" | |
12 | +#include "AMDA_exception.hh" | |
13 | + | |
14 | +#include "ParamData.hh" | |
15 | +#include "VisitorOfParamData.hh" | |
16 | +#include "GetJunoJediSumEnergy.hh" | |
17 | + | |
18 | +namespace AMDA { | |
19 | +namespace JunoJedi { | |
20 | + | |
21 | +/** | |
22 | + * @class GetJunoJediSumEnergyCreator | |
23 | + * @brief Creator of the Operation GetJunoJediSumEnergyCreator parameterized with ParamData input type. | |
24 | + * @details Implement the interface VisitorOfParamData. | |
25 | + */ | |
26 | +class GetJunoJediSumEnergyCreator : public VisitorOfParamData { | |
27 | +public: | |
28 | + /** | |
29 | + * @brief Constructor. | |
30 | + */ | |
31 | + GetJunoJediSumEnergyCreator(Process& pProcess, ParamData& paramInput, | |
32 | + ParamData& lower_energy_param_input, ParamData& upper_energy_param_input, double eMin, double eMax) | |
33 | + : _process(pProcess), _paramData(paramInput), _operation(NULL), | |
34 | + _lower_energy_param_input(lower_energy_param_input), _upper_energy_param_input(upper_energy_param_input), _eMin(eMin), _eMax(eMax) { | |
35 | + | |
36 | + _paramData.accept(*this); | |
37 | + } | |
38 | + | |
39 | + /** | |
40 | + * @overload VisitorOfParamData::visit(ParamDataScalaireShort *) | |
41 | + */ | |
42 | + void visit(ParamDataScalaireShort *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported"));} | |
43 | + | |
44 | + /** | |
45 | + * @overload VisitorOfParamData::visit(ParamDataScalaireFloat *) | |
46 | + */ | |
47 | + void visit(ParamDataScalaireFloat *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
48 | + | |
49 | + /** | |
50 | + * @overload VisitorOfParamData::visit(ParamDataScalaireDouble *) | |
51 | + */ | |
52 | + void visit(ParamDataScalaireDouble *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
53 | + | |
54 | + /** | |
55 | + * @overload VisitorOfParamData::visit(ParamDataScalaireLongDouble *) | |
56 | + */ | |
57 | + void visit(ParamDataScalaireLongDouble *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
58 | + | |
59 | + /** | |
60 | + * @overload VisitorOfParamData::visit(ParamDataScalaireInt *) | |
61 | + */ | |
62 | + void visit(ParamDataScalaireInt *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
63 | + | |
64 | + /** | |
65 | + * @overload VisitorOfParamData::visit(ParamDataLogicalData *) | |
66 | + */ | |
67 | + void visit(ParamDataLogicalData *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
68 | + | |
69 | + /** | |
70 | + * @overload VisitorOfParamData::visit(ParamDataTab1DShort *) | |
71 | + */ | |
72 | + void visit(ParamDataTab1DShort *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
73 | + | |
74 | + /** | |
75 | + * @overload VisitorOfParamData::visit(ParamDataTab1DFloat *) | |
76 | + */ | |
77 | + void visit(ParamDataTab1DFloat *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
78 | + | |
79 | + /** | |
80 | + * @overload VisitorOfParamData::visit(ParamDataTab1DDouble *) | |
81 | + */ | |
82 | + void visit(ParamDataTab1DDouble *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
83 | + | |
84 | + /** | |
85 | + * @overload VisitorOfParamData::visit(ParamDataTab1DLongDouble *) | |
86 | + */ | |
87 | + void visit(ParamDataTab1DLongDouble *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
88 | + | |
89 | + /** | |
90 | + * @overload VisitorOfParamData::visit(ParamDataTab1DInt *) | |
91 | + */ | |
92 | + void visit(ParamDataTab1DInt *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
93 | + | |
94 | + /** | |
95 | + * @overload VisitorOfParamData::visit(ParamDataTab1DLogicalData *) | |
96 | + */ | |
97 | + void visit(ParamDataTab1DLogicalData *) { BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); } | |
98 | + | |
99 | + /** | |
100 | + * @overload VisitorOfParamData::visit(ParamDataTab2DShort *) | |
101 | + */ | |
102 | + void visit(ParamDataTab2DShort *) { | |
103 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); | |
104 | + } | |
105 | + | |
106 | + /** | |
107 | + * @overload VisitorOfParamData::visit(ParamDataTab2DFloat *) | |
108 | + */ | |
109 | + void visit(ParamDataTab2DFloat *) { | |
110 | + _operation = new GetJunoJediSumEnergy<ParamDataTab2DFloat>( _process, dynamic_cast<ParamDataTab2DFloat &>(_paramData), dynamic_cast<ParamDataTab2DFloat &>(_lower_energy_param_input), dynamic_cast<ParamDataTab2DFloat &>(_upper_energy_param_input), _eMin, _eMax); | |
111 | + } | |
112 | + | |
113 | + /** | |
114 | + * @overload VisitorOfParamData::visit(ParamDataTab2DDouble *) | |
115 | + */ | |
116 | + void visit(ParamDataTab2DDouble *) { | |
117 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); | |
118 | + } | |
119 | + | |
120 | + /** | |
121 | + * @overload VisitorOfParamData::visit(ParamDataTab2DLongDouble *) | |
122 | + */ | |
123 | + void visit(ParamDataTab2DLongDouble *) { | |
124 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); | |
125 | + } | |
126 | + | |
127 | + /** | |
128 | + * @overload VisitorOfParamData::visit(ParamDataTab2DInt *) | |
129 | + */ | |
130 | + void visit(ParamDataTab2DInt *) { | |
131 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); | |
132 | + } | |
133 | + | |
134 | + /** | |
135 | + * @overload VisitorOfParamData::visit(ParamDataTab2DLogicalData *) | |
136 | + */ | |
137 | + void visit(ParamDataTab2DLogicalData *) { | |
138 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("GetJunoJediSumEnergyCreator operation not supported")); | |
139 | + } | |
140 | + | |
141 | + /** | |
142 | + * @brief get the GetJunoJediEnergy parameterized operation. | |
143 | + */ | |
144 | + Operation * getOperation() const { return _operation; } | |
145 | + | |
146 | +private: | |
147 | + /** | |
148 | + * @brief a reference on the process of Calibration | |
149 | + */ | |
150 | + Process &_process; | |
151 | + | |
152 | + /** | |
153 | + * @brief the input paramData | |
154 | + */ | |
155 | + ParamData &_paramData; | |
156 | + | |
157 | + /** | |
158 | + * @brief the operation which is created | |
159 | + */ | |
160 | + Operation *_operation; | |
161 | + | |
162 | + ParamData &_lower_energy_param_input; | |
163 | + ParamData &_upper_energy_param_input; | |
164 | + double _eMin; | |
165 | + double _eMax; | |
166 | +}; | |
167 | + | |
168 | +} /* namespace JunoJedi */ | |
169 | +} /* namespace AMDA */ | |
170 | +#endif /* GetJunoJediSumEnergyCreator_HH_ */ | ... | ... |
src/ExternLib/GetJunoJediEnergy/GetJunoJediSumEnergyProcess.cc
0 → 100644
... | ... | @@ -0,0 +1,86 @@ |
1 | +/* | |
2 | + * GetJunoJediSumEnergyProcess.cc | |
3 | + * | |
4 | + * Created on: Jun 27, 2023 | |
5 | + * Author: BRE | |
6 | + */ | |
7 | +#include <stdlib.h> | |
8 | +#include <string> | |
9 | + | |
10 | +#include "AMDA_exception.hh" | |
11 | +#include "DicError.hh" | |
12 | + | |
13 | +#include "Operation.hh" | |
14 | +#include "ParameterManager.hh" | |
15 | +#include "GetJunoJediSumEnergyProcess.hh" | |
16 | +#include "GetJunoJediSumEnergyCreator.hh" | |
17 | +#include "ParameterCreatorFromExpression.hh" | |
18 | + | |
19 | +using namespace std; | |
20 | +using namespace boost; | |
21 | +using namespace log4cxx; | |
22 | + | |
23 | +namespace AMDA { | |
24 | +namespace JunoJedi { | |
25 | + | |
26 | +GetJunoJediSumEnergyProcess::GetJunoJediSumEnergyProcess(Parameter ¶meter) : MultiParamProcess_CRTP(parameter) { | |
27 | +} | |
28 | + | |
29 | +GetJunoJediSumEnergyProcess::GetJunoJediSumEnergyProcess(const GetJunoJediSumEnergyProcess& pProcess, Parameter ¶meter) | |
30 | + : MultiParamProcess_CRTP(pProcess,parameter), _inputParamName(pProcess._inputParamName), | |
31 | + _inputLowerEnergyParamName(pProcess._inputLowerEnergyParamName), _inputUpperEnergyParamName(pProcess._inputUpperEnergyParamName), | |
32 | + _eMin(pProcess._eMin), _eMax(pProcess._eMax) { | |
33 | +} | |
34 | + | |
35 | +GetJunoJediSumEnergyProcess::~GetJunoJediSumEnergyProcess() { | |
36 | +} | |
37 | + | |
38 | +void GetJunoJediSumEnergyProcess::parse() { | |
39 | + ParameterCreatorFromExpression creator(_parameter.getParameterManager()); | |
40 | + ParameterSPtr lParameter = creator.getOneParameterFromExpression(_parameter,_expression, isUserProcess()); | |
41 | + _paramNameList[lParameter->getId()].first = lParameter; | |
42 | + _inputParamName = lParameter->getId(); | |
43 | + if (_attributList.size() != 4) { | |
44 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_PROCESS_ERR) << AMDA::ex_msg(std::string("GetJunoJediSumEnergyProcess::parse require 4 attributes'"))); | |
45 | + } | |
46 | + | |
47 | + lParameter = creator.getOneParameterFromExpression(_parameter,_attributList[0], isUserProcess()); | |
48 | + _paramNameList[lParameter->getId()].first = lParameter; | |
49 | + _inputLowerEnergyParamName = lParameter->getId(); | |
50 | + | |
51 | + lParameter = creator.getOneParameterFromExpression(_parameter,_attributList[1], isUserProcess()); | |
52 | + _paramNameList[lParameter->getId()].first = lParameter; | |
53 | + _inputUpperEnergyParamName = lParameter->getId(); | |
54 | +} | |
55 | + | |
56 | +void GetJunoJediSumEnergyProcess::establishConnection() { | |
57 | + parse(); | |
58 | + MultiParamProcess_CRTP::establishConnection(); | |
59 | +} | |
60 | + | |
61 | +TimeStamp GetJunoJediSumEnergyProcess::init() { | |
62 | + TimeStamp timeStamp = MultiParamProcess::init(); | |
63 | + | |
64 | + ParamData* lmainParamInput = _paramNameList[_inputParamName].first->getParamData(this).get(); | |
65 | + | |
66 | + ParamData* llowerEnergyParamInput = _paramNameList[_inputLowerEnergyParamName].first->getParamData(this).get(); | |
67 | + | |
68 | + ParamData* lupperEnergyParamInput = _paramNameList[_inputUpperEnergyParamName].first->getParamData(this).get(); | |
69 | + | |
70 | + if (_attributList.size() != 4) { | |
71 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_PROCESS_ERR) << AMDA::ex_msg(std::string("GetJunoJediSumEnergyProcess::init required at least 4 attributes'"))); | |
72 | + } | |
73 | + | |
74 | + _eMin = std::stod(_attributList[2]); | |
75 | + _eMax = std::stod(_attributList[3]); | |
76 | + | |
77 | + GetJunoJediSumEnergyCreator lGetJunoJediSumEnergyCreator(*this, *lmainParamInput, *llowerEnergyParamInput, *lupperEnergyParamInput, _eMin, _eMax); | |
78 | + _operation = lGetJunoJediSumEnergyCreator.getOperation(); | |
79 | + _paramData = ParamDataSPtr(_operation->getParamOutput()); | |
80 | + _paramData->setMinSampling(lmainParamInput->getMinSampling()); | |
81 | + | |
82 | + return timeStamp; | |
83 | +} | |
84 | + | |
85 | +} /* namespace JunoJedi */ | |
86 | +} /* namespace AMDA */ | ... | ... |
src/ExternLib/GetJunoJediEnergy/GetJunoJediSumEnergyProcess.hh
0 → 100644
... | ... | @@ -0,0 +1,74 @@ |
1 | +/* | |
2 | + * GetJunoJediSumEnergyProcess.hh | |
3 | + * | |
4 | + * Created on: Jun 27, 2023 | |
5 | + * Author: BRE | |
6 | + */ | |
7 | + | |
8 | +#ifndef GetJunoJedoSumEnergyProcess_HH_ | |
9 | +#define GetJunoJediSumEnergyProcess_HH_ | |
10 | + | |
11 | +#include "MultiParamProcess.hh" | |
12 | + | |
13 | +namespace AMDA { | |
14 | +namespace JunoJedi { | |
15 | + | |
16 | + /** | |
17 | + * @class GetJunoJediSumEnergyProcess | |
18 | + * @brief Return integrated parameter between two energy. | |
19 | + */ | |
20 | + class GetJunoJediSumEnergyProcess : public AMDA::Parameters::MultiParamProcess_CRTP<GetJunoJediSumEnergyProcess> { | |
21 | + public: | |
22 | + | |
23 | + /** | |
24 | + * @brief Constructor. | |
25 | + */ | |
26 | + GetJunoJediSumEnergyProcess(AMDA::Parameters::Parameter ¶meter); | |
27 | + /** | |
28 | + * @brief Copy Constructor. | |
29 | + */ | |
30 | + GetJunoJediSumEnergyProcess(const GetJunoJediSumEnergyProcess& pProcess, AMDA::Parameters::Parameter &pParameter) ; | |
31 | + /** | |
32 | + * @brief Destructor. | |
33 | + */ | |
34 | + ~GetJunoJediSumEnergyProcess(); | |
35 | + | |
36 | + // Overload Process methods | |
37 | + /** | |
38 | + * @overload Process::establishConnection() | |
39 | + */ | |
40 | + void establishConnection(); | |
41 | + | |
42 | + | |
43 | + // Overload Process methods | |
44 | + /** | |
45 | + * @overload Process::init() | |
46 | + */ | |
47 | + AMDA::Parameters::TimeStamp init(); | |
48 | + | |
49 | + protected: | |
50 | + | |
51 | + /** | |
52 | + * @brief If the expression is not a Single parameter, | |
53 | + * it must ask the creation of a parameter responsible of the formula calculation. | |
54 | + */ | |
55 | + void parse(); | |
56 | + | |
57 | + private: | |
58 | + | |
59 | + std::string _inputParamName; | |
60 | + | |
61 | + std::string _inputLowerEnergyParamName; | |
62 | + | |
63 | + std::string _inputUpperEnergyParamName; | |
64 | + | |
65 | + double _eMin; | |
66 | + double _eMax; | |
67 | + | |
68 | + }; | |
69 | + | |
70 | + | |
71 | + | |
72 | +} /* namespace JunoJedi */ | |
73 | +} /* namespace AMDA */ | |
74 | +#endif /* GetJunoJediSumEnergyProcess_HH_ */ | ... | ... |