CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
evf::AsciiRollingChart Class Reference

#include <AsciiRollingChart.h>

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.

14  : h_(title,nbins,0.,float(nbins)), roll_(nbins,0.)
15  {
16 
17  }
std::deque< float > roll_

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(), and Vispa.Gui.PortConnection.PointToPointConnection::paintEvent().

28 {return h_.draw();}
std::string & draw()
Definition: AsciiHisto.h:56
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().

18  {
19  if(ind==1){for(unsigned int i = 0; i < roll_.size(); i++) roll_[i]=0.;}
20  if(ind<roll_.size())roll_[ind]=x;
21  else{
22  roll_.pop_front();
23  roll_.push_back(x);
24  }
25  //h_.fill(&(roll_.front()));
27  }
void fillDeque(std::deque< float > &cont)
Definition: AsciiHisto.h:38
int i
Definition: DBlmapReader.cc:9
std::deque< float > roll_
Definition: DDAxes.h:10

Member Data Documentation

AsciiHisto evf::AsciiRollingChart::h_
private

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().