当前位置: 首页>>代码示例>>C++>>正文


C++ Messenger::run_message方法代码示例

本文整理汇总了C++中Messenger::run_message方法的典型用法代码示例。如果您正苦于以下问题:C++ Messenger::run_message方法的具体用法?C++ Messenger::run_message怎么用?C++ Messenger::run_message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Messenger的用法示例。


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

示例1: if


//.........这里部分代码省略.........
                        ss.str("");
                    }
                    return;
                } else if ( retval == 0 ) {
                    // empty buffers are regular in Rev. D data
                    // cout << " EMPTY BUFFER" << endl;
                    nWords += lenRec + 1;
                    lastVsn = vsn;
                    continue;
                } else if ( retval > 0 ) {
                    /* increment the total number of events observed */
                    numEvents += retval;
                }
                /* Update the variables that are keeping track of what has been
                   analyzed and increment the location in the current buffer
                */
                    lastVsn = vsn;
                    nWords += lenRec+1; // one extra word for delimiter
            } else {
                // bail out if we have lost our place,
                //   (bad vsn) and process events
                if (vsn != 9999 && vsn != pixie::clockVsn) {
#ifdef VERBOSE
                    ss << "UNEXPECTED VSN " << vsn;
                    messenger.warning(ss.str());
                    ss.str("");
#endif
                }
                break;
            }
        } // while still have words
        if (nWords > nhw[0] / 2 - 6) {
            ss << "This actually happens!";
            messenger.run_message(ss.str());
            ss.str("");
        }

        /* If the vsn is 9999 this is the end of a spill, signal this buffer
           for processing and determine if the buffer is split between spills.
        */
            if ( vsn == 9999 || vsn == pixie::clockVsn ) {
                fullSpill = true;
                nWords += 3;//skip it
                if (lbuf[nWords+1] != pixie::U_DELIMITER) {
                    ss << "this actually happens!";
                    messenger.warning(ss.str());
                    ss.str("");
                    multSpill = true;
                }
                lastVsn=pixie::U_DELIMITER;
            }

            /* if there are events to process, continue */
            if( numEvents > 0 ) {
                if (fullSpill) { 	  // if full spill process events
                    // sort the vector of pointers eventlist according to time
                    double lastTimestamp = (*(eventList.rbegin()))->GetTime();

                    sort(eventList.begin(),eventList.end(),CompareTime);
                    driver->CorrelateClock(lastTimestamp, theTime);

                    /* once the vector of pointers eventlist is sorted
                     * based on time, begin the event processing in ScanList()
                    */
                    ScanList(eventList, rawev);
开发者ID:kmiernik,项目名称:pixie_scan,代码行数:66,代码来源:PixieStd.cpp


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