您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ERR_POST函数代码示例

51自学网 2021-06-01 20:33:45
  C++
这篇教程C++ ERR_POST函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ERR_POST函数的典型用法代码示例。如果您正苦于以下问题:C++ ERR_POST函数的具体用法?C++ ERR_POST怎么用?C++ ERR_POST使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ERR_POST函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OpenDOMNAME

/*Open DomNamedb */bool OpenDOMNAME(string name, bool create){	if(name.empty())	{		ERR_POST("[OpenDOMNAME]: No table name given");		return false;	}	/*Init codeBase if not init yet*/	if(!IsCodeBaseInit() && !InitCodeBase()){		ERR_POST(Fatal<<"[OpenDOMNAME]:Cannot initiate CodeBase for RPSDB&DOMNAME");		return false;	}	if(create){		domnamedb.create(codeBase, name.c_str(), f4domname, t4domname);		ERR_POST(Info<<"[OpenDOMNAME]: Creating new DomName table");	}	else {		domnamedb.open(codeBase, name.c_str());	}	if(!domnamedb.isValid()){		ERR_POST("[OpenDOMNAME]:failed to open "<<name);		return false;	}	pf4dnaccession.init(domnamedb,"ACCESSION");        pf4dnname.init(domnamedb,"NAME");        pf4dnpdbid.init(domnamedb,"PDBID");        pf4dnasn1.init(domnamedb,"ASN1");	tagdnaccession.init(domnamedb,"ACCESSION");        tagdnname.init(domnamedb,"NAME");        tagdnpdbid.init(domnamedb,"PDBID");	return true;}
开发者ID:iandonaldson,项目名称:slri,代码行数:35,


示例2: ERR_POST

void CMSPeak::ReadAndProcess(const CMSSpectrum& Spectrum,                        const CMSSearchSettings& Settings){	if(Read(Spectrum, Settings) != 0) {	    ERR_POST(Error << "omssa: unable to read spectrum into CMSPeak");	    return;	}    SetName().clear();	if(Spectrum.CanGetIds()) SetName() = Spectrum.GetIds();	if(Spectrum.CanGetNumber())	    SetNumber() = Spectrum.GetNumber();			SetPeakLists()[eMSPeakListOriginal]->Sort(eMSPeakListSortMZ);	SetComputedCharge(Settings.GetChargehandling(), Spectrum);	InitHitList(Settings.GetMinhit());	CullAll(Settings);    // this used to look at the filtered list.  changed to look at original    // to simplify the code.	if(GetPeakLists()[eMSPeakListOriginal]->GetNum() < Settings.GetMinspectra())	    {	    ERR_POST(Info << "omssa: not enough peaks in spectra");	    SetError(eMSHitError_notenuffpeaks);	}}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:27,


示例3: ERR_POST

voidCBlastScopeSource::x_InitBlastDatabaseDataLoader(CRef<CSeqDB> db_handle){    if ( !m_Config.m_UseBlastDbs ) {        return;    }    if (db_handle.Empty()) {        ERR_POST(Warning << "No BLAST database handle provided");    } else {        try {            m_BlastDbLoaderName = CBlastDbDataLoader::RegisterInObjectManager                    (*m_ObjMgr, db_handle, m_Config.m_UseFixedSizeSlices,                     CObjectManager::eNonDefault).GetLoader()->GetName();            _ASSERT( !m_BlastDbLoaderName.empty() );            _TRACE("Registered BLAST DB data loader '" << m_BlastDbLoaderName                    << "' as non-default");        } catch (const exception& e) {            // in case of error when initializing the BLAST database, just            // ignore the exception as the remote BLAST database data loader            // will be the fallback (just issue a warning)            ERR_POST(Warning << "Error initializing local BLAST database data "                             << "loader: '" << e.what() << "'");            const CBlastDbDataLoader::EDbType dbtype =                 db_handle->GetSequenceType() == CSeqDB::eProtein                ? CBlastDbDataLoader::eProtein                : CBlastDbDataLoader::eNucleotide;            try {                m_BlastDbLoaderName =                    CRemoteBlastDbDataLoader::RegisterInObjectManager                        (*m_ObjMgr, db_handle->GetDBNameList(), dbtype,                         m_Config.m_UseFixedSizeSlices,                         CObjectManager::eNonDefault,                         CObjectManager::kPriority_NotSet)                         .GetLoader()->GetName();                _ASSERT( !m_BlastDbLoaderName.empty() );                _TRACE("Registered BLAST DB data loader '" << m_BlastDbLoaderName                        << "' as non-default");            } catch (const CSeqDBException& e) {                ERR_POST(Warning << "Error initializing remote BLAST database "                              << "data loader: " << e.GetMsg());            }        }    }}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:48,


示例4: checksum

// If the client identification - client_node and/or client_session - breaks// the length limit then it should be 'normalized'. Basically it is shortening// the values in a special way embedding the MD5 checksum.// See CXX-2617string  CNSClientId::x_NormalizeNodeOrSession(const string &  val,                                              const string &  key){    if (val.size() < kMaxWorkerNodeIdSize)        return val;    // The limit is broken. Let's calculate the value MD5    CChecksum   checksum(CChecksum::eMD5);    string      checksum_as_string;    checksum.AddLine(val);    checksum_as_string = checksum.GetHexSum();    string      normalized;    if (checksum_as_string.size() >= kMaxWorkerNodeIdSize - 2) {        // Very defensive: if kMaxWorkerNodeIdSize is defined a way too small        normalized = checksum_as_string.substr(0, kMaxWorkerNodeIdSize - 1);    } else {        size_t      outer_lenght = ((kMaxWorkerNodeIdSize - 1) - // available                                    2 -                          // separators                                    checksum_as_string.size())   // md5                                   / 2;        normalized = val.substr(0, outer_lenght) + "/" +                     checksum_as_string + "/" +                     val.substr(val.size() - outer_lenght, outer_lenght);    }    ERR_POST("Client identification parameter " << key <<             " exceeds the max allowed length of " <<             kMaxWorkerNodeIdSize - 1 << " bytes. It will be replaced with " <<            normalized);    return normalized;}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:38,


示例5: SetTolerance

int CMSPeak::Read(const CMSSpectrum& Spectrum,                  const CMSSearchSettings& Settings){    try {        SetTolerance(Settings.GetMsmstol());        SetPrecursorTol(Settings.GetPeptol());        //  note that there are two scales -- input scale and computational scale        //  Precursormz = MSSCALE * (Spectrum.GetPrecursormz()/(double)MSSCALE);          // for now, we assume one scale        Precursormz = Spectrum.GetPrecursormz();          const CMSSpectrum::TMz& Mz = Spectrum.GetMz();        const CMSSpectrum::TAbundance& Abundance = Spectrum.GetAbundance();        SetPeakLists()[eMSPeakListOriginal]->CreateLists(Mz.size());        int i;        for (i = 0; i < SetPeakLists()[eMSPeakListOriginal]->GetNum(); i++) {            // for now, we assume one scale            SetPeakLists()[eMSPeakListOriginal]->GetMZI()[i].SetMZ() = Mz[i];            SetPeakLists()[eMSPeakListOriginal]->GetMZI()[i].SetIntensity() = Abundance[i];        }        SetPeakLists()[eMSPeakListOriginal]->Sort(eMSPeakListSortMZ);    }    catch (NCBI_NS_STD::exception& e) {        ERR_POST(Info << "Exception in CMSPeak::Read: " << e.what());        throw;    }    return 0;}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:30,


示例6: GetAtomInfo

 const AtomInfo * GetAtomInfo(int aID) const {     AtomInfoMap::const_iterator info=atomInfos.find(aID);     if (info != atomInfos.end()) return (*info).second;     ERR_POST(ncbi::Warning << "Residue #" << id << ": can't find atom #" << aID);     return NULL; }
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:7,


示例7: SetSum

void CMSHit::RecordMatchesScan(CLadder& Ladder,                               int& iHitInfo,                               CMSPeak *Peaks,                               EMSPeakListTypes Which,                               int NOffset,                               int COffset){    try {        SetSum() += Ladder.GetSum();        SetM() += Ladder.GetM();                // examine hits array        int i;        for(i = 0; i < Ladder.size(); i++) {            // if hit, add to hitlist            if(Ladder.GetHit()[i] > 0) {                SetHitInfo(iHitInfo).SetCharge() = (char) Ladder.GetCharge();                SetHitInfo(iHitInfo).SetIonSeries() = (char) Ladder.GetType();//                if(kIonDirection[Ladder.GetType()] == 1) SetHitInfo(iHitInfo).SetNumber() = (short) i + NOffset;//                else SetHitInfo(iHitInfo).SetNumber() = (short) i + COffset;                SetHitInfo(iHitInfo).SetNumber() = Ladder.GetLadderNumber()[i];                SetHitInfo(iHitInfo).SetIntensity() = Ladder.GetIntensity()[i];                //  for poisson test                SetHitInfo(iHitInfo).SetMZ() = Ladder[i];                SetHitInfo(iHitInfo).SetDelta() = Ladder.GetDelta()[i];                //                iHitInfo++;            }        }    } catch (NCBI_NS_STD::exception& e) {	ERR_POST(Info << "Exception caught in CMSHit::RecordMatchesScan: " << e.what());	throw;    }}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:35,


示例8: ERR_POST

bool SeqTreeAPI::makeTree(){	if (m_triedTreeMaking) //if already tried, don't try again		return m_seqTree != 0;	if (m_seqTree != 0)	{		delete m_seqTree;		m_seqTree = 0;		m_seqTree = new SeqTree;	}	if (!m_loadOnly)	{		if (m_ma.getFirstCD() == 0)			m_ma.setAlignment(*m_family);		if(!m_ma.isBlockAligned())		{			ERR_POST("Sequence tree is not made for " <<m_ma.getFirstCD()->GetAccession()				<<" because it does not have a consistent block alognment.");		}		else		{			if ((m_treeOptions.distMethod == eScoreBlastFoot) || (m_treeOptions.distMethod == eScoreBlastFull))				m_treeOptions.distMethod = eScoreAligned;			m_seqTree = TreeFactory::makeTree(&m_ma, m_treeOptions);		}		if (m_seqTree)			m_seqTree->fixRowName(m_ma, SeqTree::eGI);	}	m_triedTreeMaking = true;	return m_seqTree != 0;}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:31,


示例9: if

 double operator [] (unsigned int i) const {     if (i == 0) return x;     else if (i == 1) return y;     else if (i == 2) return z;     else ERR_POST(ncbi::Error << "Vector operator [] access out of range : " << i);     return 0.0; }
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:8,


示例10: ERR_POST

 double operator [] (unsigned int i) const {     if (i > 15) {         ERR_POST(ncbi::Error << "Matrix operator [] access out of range : " << i);         return 0.0;     }     return m[i]; }
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:8,


示例11: SetHTTPStatus

int CNetCacheBlobFetchApp::OnException(std::exception& e, CNcbiOstream& os){    union {        CArgException* arg_exception;        CNetCacheException* nc_exception;    };    string status_str;    string message;    if ((arg_exception = dynamic_cast<CArgException*>(&e)) != NULL) {        status_str = "400 Bad Request";        message = arg_exception->GetMsg();        SetHTTPStatus(CRequestStatus::e400_BadRequest);    } else if ((nc_exception = dynamic_cast<CNetCacheException*>(&e)) != NULL) {        switch (nc_exception->GetErrCode()) {        case CNetCacheException::eAccessDenied:            status_str = "403 Forbidden";            message = nc_exception->GetMsg();            SetHTTPStatus(CRequestStatus::e403_Forbidden);            break;        case CNetCacheException::eBlobNotFound:            status_str = "404 Not Found";            message = nc_exception->GetMsg();            SetHTTPStatus(CRequestStatus::e404_NotFound);            break;        default:            return CCgiApplication::OnException(e, os);        }    } else        return CCgiApplication::OnException(e, os);    // Don't try to write to a broken output    if (!os.good()) {        return -1;    }    try {        // HTTP header        os << "Status: " << status_str << HTTP_EOL <<                "Content-Type: text/plain" HTTP_EOL HTTP_EOL <<                "ERROR:  " << status_str << " " HTTP_EOL HTTP_EOL <<                message << HTTP_EOL;        // Check for problems in sending the response        if (!os.good()) {            ERR_POST("CNetCacheBlobFetchApp::OnException() "                    "failed to send error page back to the client");            return -1;        }    }    catch (exception& e) {        NCBI_REPORT_EXCEPTION("(CGI) CNetCacheBlobFetchApp::OnException", e);    }    return 0;}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:57,


示例12: ID

bool CStdAnnotTypes::LoadTypes(const string& iniFile){    static const string ID("id");    bool result = false;    int id;    int accessFlags = (IRegistry::fCaseFlags | IRegistry::fInternalSpaces);    int readFlags = (IRegistry::fCaseFlags | IRegistry::fInternalSpaces);    string value;    list<string> categories, names;    //  Use CMemoryRegistry simply to leverage registry file format parser.    CMemoryRegistry dummyRegistry;    auto_ptr<CNcbiIfstream> iniIn(new CNcbiIfstream(iniFile.c_str(), IOS_BASE::in | IOS_BASE::binary));    if (*iniIn) {        result = true;        ERR_POST(ncbi::Trace << "loading predefined annotation types " << iniFile);        dummyRegistry.Read(*iniIn, readFlags);        dummyRegistry.EnumerateSections(&categories, accessFlags);        //  Loop over all type categories        ITERATE (list<string>, cit, categories) {            if (*cit == kEmptyStr) continue;            //  reject 'id' if it equals m_invalidType; otherwise allow negative values            id = dummyRegistry.GetInt(*cit, ID, m_invalidType, accessFlags, CMemoryRegistry::eReturn);            if (id != m_invalidType) {                TTypeNamesPair& typeNamesPair = m_stdAnnotTypeData[id];                TTypeNames& values = typeNamesPair.second;                typeNamesPair.first = *cit;                //  Get all named fields for this section.                dummyRegistry.EnumerateEntries(*cit, &names, accessFlags);                //  Add value for each non-id named field; sort alphabetically on completion.                ITERATE (list<string>, eit, names) {                    if (*eit == ID || *eit == kEmptyStr) continue;                    value = dummyRegistry.GetString(*cit, *eit, kEmptyStr, accessFlags);                    NStr::TruncateSpacesInPlace(value);                    if (value != kEmptyStr) {                        values.push_back(value);                    }                }                sort(values.begin(), values.end());                /*cout << "/nTesting sort for " << *cit << endl;                ITERATE (vector<string>, vit, values) {                    cout << *vit << endl;                }*/            }        }    }
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:56,


示例13: OpenRPSDB

/*Open RPSDB table*/bool OpenRPSDB(const char* tableName, bool create ){	if(tableName==NULL)	{		ERR_POST("[OpenRPSDB]: No table name given");		return false;	}	if(!IsCodeBaseInit() && !InitCodeBase()){		ERR_POST(Fatal<<"[OpenRPSDB]:Cannot initiate CodeBase for RPSDB&DOMNAME");		return false;	}	if (create)        {                rpsdb.create(codeBase, tableName, f4rpsdb, t4rpsdb);        }	else{		rpsdb.open(codeBase, tableName);	}	if(!rpsdb.isValid()){		ERR_POST("[OpenRPSDB]: failed to open "<<tableName);		return false;	}        pf4rpsgi.init(rpsdb,"GI");        pf4rpsdomid.init(rpsdb,"DOMID");	pf4rpsfrom.init(rpsdb,"FROM");        pf4rpsalignlen.init(rpsdb,"ALIGN_LEN");        pf4rpsevalue.init(rpsdb,"EVALUE");        pf4rpsmisN.init(rpsdb,"MISSING_N");        pf4rpsmisC.init(rpsdb,"MISSING_C");        pf4rpsnumdom.init(rpsdb,"NUMDOM");	pf4rpscddid.init(rpsdb,"CDDID");	tagrpscddid.init(rpsdb, "CDDID");	pf4rpsbitscore.init(rpsdb,"BITSCORE");	pf4rpsscore.init(rpsdb,"SCORE");	tagrpsgi.init(rpsdb,"GI");        tagrpsdomid.init(rpsdb, "DOMID");        tagrpslen.init(rpsdb,"ALIGN_LEN");        tagrpsnumdom.init(rpsdb, "NUMDOM");        return true;}
开发者ID:iandonaldson,项目名称:slri,代码行数:44,


示例14: ERR_POST

bool CCSRATestApp::TestApp_Exit(void){    if ( m_ErrorCount ) {        ERR_POST("Errors found: "<<m_ErrorCount);    }    else {        LOG_POST("Done.");    }    return !m_ErrorCount;}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:10,


示例15: SearchDOMNAME

/* search domname for domain label by accession */string SearchDOMNAME(string accession){	int rc=-20;	if(accession.empty())	{		ERR_POST("[SearchDOMNAME]: empty string");		return NULL;	}	domnamedb.select(tagdnaccession);	domnamedb.top();	rc=domnamedb.seek(accession.c_str());	if(rc!=r4success){		ERR_POST(Info<<"[SearchDOMNAME]: no record found for "<<accession);		return NULL;	}	Str4large strfield;	strfield.assign(pf4dnname);	strfield.trim();	string s=strfield.str();	return s;}
开发者ID:iandonaldson,项目名称:slri,代码行数:22,


示例16: Run

    int Run(void)    {        CONNECT_Init(&CNcbiApplication::Instance()->GetConfig());                const CNcbiArguments& app_args = GetArguments();        m_Seed = app_args.Size() > 1 ?                (unsigned int)atoi(app_args[1].c_str()) : (unsigned int)time(0);        // Set error posting and tracing on maximum        SetDiagTrace(eDT_Enable);        SetDiagPostLevel(eDiag_Info);        SetDiagPostAllFlags(SetDiagPostAllFlags(eDPF_Default)            | eDPF_All | eDPF_OmitInfoSev);        UnsetDiagPostFlag(eDPF_Line);        UnsetDiagPostFlag(eDPF_File);        UnsetDiagPostFlag(eDPF_Location);        UnsetDiagPostFlag(eDPF_LongFilename);        SetDiagTraceAllFlags(SetDiagPostAllFlags(eDPF_Default));        string host = "www.ncbi.nlm.nih.gov";        string path = "/Service/bounce.cgi";        string args = kEmptyStr;        string uhdr = kEmptyStr;        ERR_POST(Info << "Seed = " << m_Seed);        srand(m_Seed);        ERR_POST(Info << "Creating HTTP connection to "            "http://" + host + path + &"?"[args.empty() ? 1 : 0] + args);        CConn_HttpStream ios(host, path, args, uhdr);        int n = TEST_StreamPushback(ios, false/*no rewind*/);        // Manual CONNECT_UnInit (for implicit CONNECT_Init() by HTTP stream ctor)        CORE_SetREG(0);        CORE_SetLOG(0);        CORE_SetLOCK(0);        return n;    }
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:39,


示例17: guard

void CStdPoolOfThreads::KillAllThreads(TKillFlags flags){    TACValue n, old_max;    bool queuing_was_forbidden;    {{        CMutexGuard guard(m_Mutex);        old_max = m_MaxThreads;        queuing_was_forbidden = m_QueuingForbidden;        m_MaxThreads = 0;  // Forbid spawning new threads        m_QueuingForbidden = false; // Always queue normally here.        n = m_ThreadCount.Get(); // Capture for use without mutex    }}    {{        TACValue n2 = TACValue(m_Threads.size());        if (n != n2) {            ERR_POST(Warning << "Registered " << n2 << " threads but expected "                     << n);            if (n < n2) {                n = n2;            }        }    }}    CRef<CStdRequest> poison(new CFatalRequest);    for (TACValue i = 0;  i < n;  ) {        try {            WaitForRoom();            AcceptRequest(poison);            ++i;        } catch (CBlockingQueueException&) { // guard against races            continue;        }    }    NON_CONST_ITERATE(TThreads, it, m_Threads) {        if ((flags & fKill_Wait) != 0) {            (*it)->Join();        } else {            (*it)->Detach();        }    }    m_Threads.clear();    CMutexGuard guard(m_Mutex);    m_QueuingForbidden = queuing_was_forbidden;    if ((flags & fKill_Reopen) != 0) {        m_MaxThreads = old_max;    }}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:49,


示例18: _ASSERT

voidCBlastScopeSource::x_InitBlastDatabaseDataLoader(const string& dbname,                                                 EDbType dbtype){    if ( !m_Config.m_UseBlastDbs ) {        return;    }    try {        m_BlastDbLoaderName = CBlastDbDataLoader::RegisterInObjectManager                (*m_ObjMgr, dbname, dbtype, m_Config.m_UseFixedSizeSlices,                 CObjectManager::eNonDefault, CObjectManager::kPriority_NotSet)                 .GetLoader()->GetName();        _ASSERT( !m_BlastDbLoaderName.empty() );    } catch (const CSeqDBException& e) {        // if the database isn't found, ignore the exception as the        // remote BLAST database data loader will be tried next        if (e.GetMsg().find("No alias or index file found ") != NPOS) {            ERR_POST(Warning << "Error initializing local BLAST database "                          << "data loader: '" << e.GetMsg() << "'");            _TRACE("Error initializing local BLAST database "                          << "data loader: '" << e.GetMsg() << "'");        }        try {            m_BlastDbLoaderName = CRemoteBlastDbDataLoader::RegisterInObjectManager                    (*m_ObjMgr, dbname, dbtype, m_Config.m_UseFixedSizeSlices,                     CObjectManager::eNonDefault, CObjectManager::kPriority_NotSet)                     .GetLoader()->GetName();            _ASSERT( !m_BlastDbLoaderName.empty() );        } catch (const CSeqDBException& e) {            ERR_POST(Warning << "Error initializing remote BLAST database "                          << "data loader: " << e.GetMsg());            _TRACE("Error initializing remote BLAST database "                          << "data loader: '" << e.GetMsg() << "'");        }    }}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:36,



注:本文中的ERR_POST函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ERR_PRINT函数代码示例
C++ ERR_MSG函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。