#define XERR
#include "modalities.ih"

void Modalities::active()
{
//    for (string const &modality:            // use sorted modality names
//                            set<string>{ d_active.begin(), d_active.end() })
//        d_activeVect.push_back(d_modBaseVect[ find(modality) ]);

    for (string const &modality: d_active)
    {
        uint16_t idx = find(modality);

        if (modality == "Mammo")
            d_activeVect.insert(d_activeVect.begin(), d_modBaseVect[idx]);
        else
            d_activeVect.push_back(d_modBaseVect[idx]);
    }
}
