<commit_before>//__________________________________________________________________________
// Author(s): <NAME>, <NAME> - March 2015
// email:  <EMAIL>
//
// DO NOT REDISTRIBUTE WITHOUT PERMISSION
//__________________________________________________________________________
//


#ifndef Ceinms_SimulationManager_h
#define Ceinms_SimulationManager_h
#include "CeinmsSetupXmlReader.h"
#include "InputDataXmlReader.h"
#include "ExecutionXmlReader.h"
#include <string>
#include <vector>
#include <map>
#include <iostream>

namespace CEINMS {
    class SimulationManager {

    public:
        SimulationManager(const std::string& setupFilename);
        bool run();

    private:
        template <typename NMSmodelT, template <typename, typename> class ModelEvaluatorT, typename LoggerT>
        bool runOpenLoop();

        template <typename T>
        bool runHybrid();

       
        CeinmsSetupXmlReader ceinmsSetup_;
        InputDataXmlReader dataLocations_;
        ExecutionXmlReader executionCfg_;
        std::string subjectFile_;
        std::string executionFile_;
        std::string inputData_;
        std::string outputDirectory_;
        std::string emgGeneratorFile_;



    };

    //non-member non-friend functions are the best!
    template <typename NMSmodelT>
    void setupSubject(NMSmodelT& mySubject, std::string subjectFile) {

        SetupDataStructure<NMSmodelT> setupData(subjectFile);
        setupData.createCurves();
        setupData.createMuscles(mySubject);
        setupData.createDoFs(mySubject);

    }

    void sortMaFilenames(const std::map<std::string, std::string>& maMap, const std::vector< std::string >& dofNames, std::vector< std::string >& maDataFilenames)
    {
        int currentDof = 0;
        for (auto& it : dofNames)
        {
            try
            {
                maDataFilenames.push_back(maMap.at(it));
            }
            catch (std::out_of_range)
            {
                std::cerr << "Could not find moment arm file for " << it << " degree of freedom" << std::endl;
                exit(EXIT_FAILURE);
            }
        }
    }
}


#include "SimulationManager.cpp"
#endif<commit_msg>Add missing include<commit_after>//__________________________________________________________________________
// Author(s): <NAME>, <NAME> - March 2015
// email:  <EMAIL>
//
// DO NOT REDISTRIBUTE WITHOUT PERMISSION
//__________________________________________________________________________
//


#ifndef Ceinms_SimulationManager_h
#define Ceinms_SimulationManager_h
#include "SetupDataStructure.h"
#include "CeinmsSetupXmlReader.h"
#include "InputDataXmlReader.h"
#include "ExecutionXmlReader.h"
#include <string>
#include <vector>
#include <map>
#include <iostream>

namespace CEINMS {
    class SimulationManager {

    public:
        SimulationManager(const std::string& setupFilename);
        bool run();

    private:
        template <typename NMSmodelT, template <typename, typename> class ModelEvaluatorT, typename LoggerT>
        bool runOpenLoop();

        template <typename T>
        bool runHybrid();

       
        CeinmsSetupXmlReader ceinmsSetup_;
        InputDataXmlReader dataLocations_;
        ExecutionXmlReader executionCfg_;
        std::string subjectFile_;
        std::string executionFile_;
        std::string inputData_;
        std::string outputDirectory_;
        std::string emgGeneratorFile_;



    };

    //non-member non-friend functions are the best!
    template <typename NMSmodelT>
    void setupSubject(NMSmodelT& mySubject, std::string subjectFile) {

        SetupDataStructure<NMSmodelT> setupData(subjectFile);
        setupData.createCurves();
        setupData.createMuscles(mySubject);
        setupData.createDoFs(mySubject);

    }

    void sortMaFilenames(const std::map<std::string, std::string>& maMap, const std::vector< std::string >& dofNames, std::vector< std::string >& maDataFilenames)
    {
        int currentDof = 0;
        for (auto& it : dofNames)
        {
            try
            {
                maDataFilenames.push_back(maMap.at(it));
            }
            catch (std::out_of_range)
            {
                std::cerr << "Could not find moment arm file for " << it << " degree of freedom" << std::endl;
                exit(EXIT_FAILURE);
            }
        }
    }
}


#include "SimulationManager.cpp"
#endif
{'fraction_non_alphanumeric': 0.09863013698630137, 'fraction_numerical': 0.00228310502283105, 'mean_word_length': 2.911607142857143, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '736483', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1194, 'n_words': 271}