ProcessMexVexElsDecode.cc
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* ProcessMexVexElsDecode.cc
*
* Created on: Oct 14, 2016
* Author: elena
*/
#include <stdlib.h>
#include <string>
#include <boost/lexical_cast.hpp>
#include "DicError.hh"
#include "AMDA_exception.hh"
#include "Operation.hh"
#include "ParameterManager.hh"
#include "ProcessMexVexElsDecode.hh"
#include "MexVexElsDecodeCreator.hh"
//#include "MexVexElsDecode.hh"
#include "ParamMgr.hh"
#include "ParameterCreatorFromExpression.hh"
using namespace std;
using namespace boost;
using namespace log4cxx;
namespace AMDA {
namespace Parameters {
ProcessMexVexElsDecode::ProcessMexVexElsDecode(Parameter ¶meter, std::string energyTable) : MultiParamProcess_CRTP(parameter), _energyTable(energyTable) {
}
ProcessMexVexElsDecode::ProcessMexVexElsDecode(const ProcessMexVexElsDecode& pProcess, Parameter ¶meter)
: MultiParamProcess_CRTP(pProcess,parameter) {
}
ProcessMexVexElsDecode::~ProcessMexVexElsDecode() {
}
void ProcessMexVexElsDecode::establishConnection() {
ParameterCreatorFromExpression creator(_parameter.getParameterManager());
ParameterSPtr lParameter = creator.getOneParameterFromExpression(_parameter,_expression);
_paramNameList[lParameter->getId()].first = lParameter;
if (_parameter.getId() != _energyTable) {
ParameterSPtr energyTableParam = _parameter.getParameterManager().getParameter(_energyTable);
_paramNameList[energyTableParam->getId()].first = energyTableParam;
}
MultiParamProcess::establishConnection();
}
TimeStamp ProcessMexVexElsDecode::init() {
TimeStamp timeStamp = MultiParamProcess::init();
ParamData* lmainParamInput = _paramNameList.begin()->second.first->getParamData(this).get();
MexVexElsDecodeCreator lMexVexElsDecodeCreator(*this, *lmainParamInput, _energyTable);
_operation = lMexVexElsDecodeCreator.getOperation();
//_operation = new MexVexElsDecode::MexVexElsDecode<float>(*this, *lmainParamInput);
_paramData = ParamDataSPtr(_operation->getParamOutput());
_paramData->setMinSampling(lmainParamInput->getMinSampling());
return timeStamp;
}
ProcessMexElsDecode::ProcessMexElsDecode(Parameter ¶meter) : ProcessMexVexElsDecode(parameter, "mex_els_energytable") {
}
ProcessVexElsDecode::ProcessVexElsDecode(Parameter ¶meter) : ProcessMexVexElsDecode(parameter, "vex_els_energytable") {
}
} /* namespace Parameters */
} /* namespace AMDA */