Spectrum.hh 2 KB
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   Spectrum.hh
 * Author: hacene
 *
 * Created on December 31, 2020, 10:14 AM
 */

#ifndef SPECTRUM_HH
#define SPECTRUM_HH

#include "Parameter.hh"
#include "ParamData.hh"
#include "DataTypeMath.hh"
#include "Operation.hh"

#include <iterator>
namespace AMDA {
    namespace Parameters {
        namespace Spectrum {

using namespace std;

        template<typename DataType, OutputType>
        class SpectrumBase : public Operation {
        public:

            /**
             * @brief Constructor.
             * @details Create the ParamData type of the input ParamData.
             */
            Spectrum(Process& pProcess, ParamDataSpec<DataType >&paramInput, std::string sampling="center") :
            Operation(pProcess),
            _paramInput(paramInput),
            _paramOutput(new ParamDataSpec<std::vector<OutputType>>()),
            _sampling(sampling){
                _paramDataOutput = _paramOutput;
            };

            virtual ~Spectrum() {
            }

            /**
             * @overload Operation::write(ParamDataIndexInfo &pParamDataIndexInfo)
             */
            void write(ParamDataIndexInfo &pParamDataIndexInfo) {
                for (unsigned int _index = pParamDataIndexInfo._startIndex;
                        _index < pParamDataIndexInfo._startIndex + pParamDataIndexInfo._nbDataToProcess;
                        ++_index) {

                    DataType in = _paramInput.get(_index);
                    double crtTime = _paramInput.getTime(_index);
               
                    }
            }
          protected:
            ParamDataSpec<DataType>& _paramInput;
            ParamDataSpec<std::vector<OutputType>>* _paramOutput;
            std::string sampling;

        };

         
        } // end Spectrum
    } // end Parameters
} // end AMDA


#endif /* SPECTRUM_HH */