/* * ProcessMexVexElsDecode.cc * * Created on: Oct 14, 2016 * Author: elena */ #include #include #include #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(*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 */