Skip to content
seqIDataMgr.cpp 156 KiB
Newer Older
    // GET NCPA loaded and status
    if(m_obContext.ncpa_rotation_status != "")
    {
        std::stringstream json_alias;
        jsonStatus += ", ";
        json_alias << "\"ncpa_rot_status\": { \"name\": \"ncpa_rot_status\", \"value\": \"" << m_obContext.ncpa_rotation_status << "\"}";
        jsonStatus += json_alias.str();
    }

    if(m_obContext.ncpa_file != "")
    {
        std::stringstream json_alias;
        jsonStatus += ", ";
        json_alias << "\"ncpa_file_loaded\": { \"name\": \"ncpa_file_loaded\", \"value\": \"" << m_obContext.ncpa_file << "\"}";
        jsonStatus += json_alias.str();
    }
Fulvio Laudisio's avatar
Fulvio Laudisio committed
void SeqDataMgr::setFlags(uint64_t flags, uint64_t more_flags)
{
    if(flags & shins::flags::SAVE_INCOMING_SASHA_FILES)
    {
        m_bSaveIncomingBlob = true;
        U9_LLOG("Save Incoming Sasha files : " << "ON");
    }
    if(flags & shins::flags::SEQDATA_TEST01)
    {
        m_bTest01 = true;
        U9_LLOG("SeqIDataMgr TEST01 : " << "ON");
    }
    if(flags & shins::flags::SAVE_ONLY_EXPOSED_SASHA_FILES)// 2
Fulvio Laudisio's avatar
Fulvio Laudisio committed
    {
        if(!m_bSaveOnlyExposedFiles)
        {
            m_bSaveOnlyExposedFiles = true;
            m_bFlagChanged = true;
        }
        U9_LLOG("Save only exposed files : " << "ON");
    }
    if(flags & shins::flags::SEQDATA_FORCE_PROPERTY_SET)
    {
        m_bForcePropertySet = true;
        U9_LLOG("SeqIDataMgr Force Property Set : " << "ON");
    }
    if(flags & shins::flags::FAST_SAVING_MODE)
    {
        updateInstrumentHeader();
        m_bFastSavingMode = true;
        U9_LLOG("SeqIDataMgr Fast Saving Mode Set : ON");
    }
Fulvio Laudisio's avatar
Fulvio Laudisio committed
};
void SeqDataMgr::unsetFlags(uint64_t flags, uint64_t more_flags)
{
    if(flags & shins::flags::SAVE_INCOMING_SASHA_FILES)
    {
        m_bSaveIncomingBlob = false;
        U9_LLOG("Save Incoming Sasha files : " << "OFF");
    }
    if(flags & shins::flags::SEQDATA_TEST01)
    {
        m_bTest01 = false;
        U9_LLOG("SeqIDataMgr TEST01 : " << "OFF");
    }
    if(flags & shins::flags::SAVE_ONLY_EXPOSED_SASHA_FILES)// 2
Fulvio Laudisio's avatar
Fulvio Laudisio committed
    {
        if(m_bSaveOnlyExposedFiles)
        {
            m_bSaveOnlyExposedFiles = false;
            m_bFlagChanged = true;
        }
        U9_LLOG("Save only exposed files : " << "OFF");
    }
    if(flags & shins::flags::SEQDATA_FORCE_PROPERTY_SET)
    {
        m_bForcePropertySet = false;
        U9_LLOG("SeqIDataMgr Force Property Set : " << "OFF");
    }
    if(flags & shins::flags::FAST_SAVING_MODE)
    {
        m_bFastSavingMode = false;
        U9_LLOG("SeqIDataMgr Fast Saving Mode Set : OFF");
    }
Fulvio Laudisio's avatar
Fulvio Laudisio committed
void SeqDataMgr::toggleFlags(uint64_t flags, uint64_t more_flags)
{
    if(flags & shins::flags::SAVE_INCOMING_SASHA_FILES)
    {
        m_bSaveIncomingBlob = !m_bSaveIncomingBlob;
        U9_LLOG("Save incoming Sasha files : " << (m_bSaveIncomingBlob ? "ON" : "OFF"));
    }
    if(flags & shins::flags::SEQDATA_TEST01)
    {
        m_bTest01 = !m_bTest01;
        U9_LLOG("SeqIDataMgr TEST01 : " << (m_bTest01 ? "ON" : "OFF"));
    }
    if(flags & shins::flags::SAVE_ONLY_EXPOSED_SASHA_FILES) // 2
Fulvio Laudisio's avatar
Fulvio Laudisio committed
    {
        m_bSaveOnlyExposedFiles = !m_bSaveOnlyExposedFiles;
        m_bFlagChanged = true;
        U9_LLOG("Save only exposed files : " << (m_bSaveOnlyExposedFiles ? "ON" : "OFF"));
    }
    if(flags & shins::flags::SEQDATA_FORCE_PROPERTY_SET)
    {
        m_bForcePropertySet = !m_bForcePropertySet;
        U9_LLOG("SeqIDataMgr Force Property Set : " << (m_bForcePropertySet ? "ON" : "OFF"));
    }
    if(flags & shins::flags::FAST_SAVING_MODE)
    {
        if(!m_bFastSavingMode)
        {
            updateInstrumentHeader();
        }
        m_bFastSavingMode = !m_bFastSavingMode;
        U9_LLOG("SeqIDataMgr Fast Saving Mode Set : " << (m_bFastSavingMode ? "ON" : "OFF"));
    }