CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HLTScalersClient::CountLSFifo_t Class Reference

#include <HLTScalersClient.h>

Inheritance diagram for HLTScalersClient::CountLSFifo_t:

Public Member Functions

 CountLSFifo_t (unsigned int sz=3)
 
double getCount (int ls)
 
unsigned int targetSize () const
 
void update (const CountLS_t &T)
 

Private Member Functions

void trim_ ()
 

Private Attributes

bool accumulate_
 
unsigned int targetSize_
 

Detailed Description

Definition at line 74 of file HLTScalersClient.h.

Constructor & Destructor Documentation

HLTScalersClient::CountLSFifo_t::CountLSFifo_t ( unsigned int  sz = 3)
inline

Definition at line 81 of file HLTScalersClient.h.

81 : std::deque<CountLS_t>(), targetSize_(sz) {}

Member Function Documentation

double HLTScalersClient::CountLSFifo_t::getCount ( int  ls)
inline

Definition at line 83 of file HLTScalersClient.h.

References begin, end, spr::find(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by HLTScalersClient::endLuminosityBlock().

83  {
84  CountLSFifo_t::iterator p = std::find(this->begin(), this->end(), ls);
85  if (p != end())
86  return p->second;
87  else
88  return -1;
89  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
#define end
Definition: vmac.h:39
def ls(path, rec=False)
Definition: eostools.py:349
#define begin
Definition: vmac.h:32
unsigned int HLTScalersClient::CountLSFifo_t::targetSize ( ) const
inline

Definition at line 82 of file HLTScalersClient.h.

Referenced by HLTScalersClient::getSlope_().

82 { return targetSize_; };
void HLTScalersClient::CountLSFifo_t::trim_ ( )
inlineprivate

Definition at line 103 of file HLTScalersClient.h.

References begin, end, HLTScalersClient::HLTScalersClient(), and findQualityFiles::size.

103  {
104  if (this->size() > targetSize_) {
105  std::sort(begin(), end());
106  while (size() > targetSize_) {
107  pop_front();
108  }
109  }
110  }
size
Write out results.
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
void HLTScalersClient::CountLSFifo_t::update ( const CountLS_t T)
inline

Definition at line 91 of file HLTScalersClient.h.

References begin, end, spr::find(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), HLTScalersClient::endLuminosityBlock(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

91  {
92  // do we already have data for this LS?
93  CountLSFifo_t::iterator p = std::find(this->begin(), this->end(), T.first);
94  if (p != this->end()) { // we already have data for this LS
95  p->second = T.second;
96  } else { // new data
97  this->push_back(T);
98  }
99  trim_();
100  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
long double T

Member Data Documentation

bool HLTScalersClient::CountLSFifo_t::accumulate_
private

Definition at line 77 of file HLTScalersClient.h.

unsigned int HLTScalersClient::CountLSFifo_t::targetSize_
private

Definition at line 76 of file HLTScalersClient.h.