CMS 3D CMS Logo

Public Member Functions | Private Attributes

evf::AsciiRollingChart Class Reference

#include <AsciiRollingChart.h>

List of all members.

Public Member Functions

 AsciiRollingChart (std::string title, int nbins)
std::string & draw ()
void flip (unsigned int ind, float x)

Private Attributes

AsciiHisto h_
std::deque< float > roll_

Detailed Description

Definition at line 11 of file AsciiRollingChart.h.


Constructor & Destructor Documentation

evf::AsciiRollingChart::AsciiRollingChart ( std::string  title,
int  nbins 
) [inline]

Definition at line 14 of file AsciiRollingChart.h.

                                                  : h_(title,nbins,0.,float(nbins)), roll_(nbins,0.)
    {
      
    }

Member Function Documentation

std::string& evf::AsciiRollingChart::draw ( ) [inline]

Definition at line 28 of file AsciiRollingChart.h.

References evf::AsciiHisto::draw(), and h_.

Referenced by evf::CPUStat::getChart().

{return h_.draw();}
void evf::AsciiRollingChart::flip ( unsigned int  ind,
float  x 
) [inline]

Definition at line 18 of file AsciiRollingChart.h.

References evf::AsciiHisto::fillDeque(), h_, i, and roll_.

Referenced by evf::CPUStat::sendStat().

                                        {
      if(ind==1){for(unsigned int i = 0; i < roll_.size(); i++) roll_[i]=0.;}
      if(ind<roll_.size())roll_[ind]=x;
      else{
        roll_.pop_front();
        roll_.push_back(x);
      }
      //h_.fill(&(roll_.front()));
      h_.fillDeque(roll_);
    }

Member Data Documentation

Definition at line 31 of file AsciiRollingChart.h.

Referenced by draw(), and flip().

std::deque<float> evf::AsciiRollingChart::roll_ [private]

Definition at line 32 of file AsciiRollingChart.h.

Referenced by flip().