CMS 3D CMS Logo

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

Public Member Functions

 commonLsStat (unsigned int lsid, unsigned int classes)
 
float getBusyTotalFrac (bool procstat, std::vector< float > &machineWeightInst)
 
float getBusyTotalFracTheor (bool procstat, std::vector< float > &machineWeight)
 
unsigned int getNReports ()
 
float getTotalRate ()
 
std::string printInfo ()
 
void setBusyForClass (unsigned int classIdx, float rate, float busy, float busyTheor, float busyCPU, float busyCPUTheor, unsigned int nMachineReports)
 

Public Attributes

std::vector< float > busyCPUVec_
 
std::vector< float > busyCPUVecTheor_
 
std::vector< float > busyVec_
 
std::vector< float > busyVecTheor_
 
std::vector< unsigned int > datasetCounts_
 
std::vector< unsigned int > endPathCounts_
 
unsigned int ls_
 
std::vector< unsigned int > nbMachines
 
std::vector< float > rateVec_
 

Detailed Description

Definition at line 357 of file iDie.h.

Constructor & Destructor Documentation

evf::iDie::commonLsStat::commonLsStat ( unsigned int  lsid,
unsigned int  classes 
)
inline

Definition at line 369 of file iDie.h.

References busyCPUVec_, busyCPUVecTheor_, busyVec_, busyVecTheor_, MainPageGenerator::classes, i, ls_, nbMachines, and rateVec_.

369  {
370  for (size_t i=0;i<classes;i++) {
371  rateVec_.push_back(0.);
372  busyVec_.push_back(0.);
373  busyCPUVec_.push_back(0.);
374  busyVecTheor_.push_back(0.);
375  busyCPUVecTheor_.push_back(0.);
376  nbMachines.push_back(0);
377  }
378  ls_=lsid;
379  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > busyCPUVec_
Definition: iDie.h:363
std::vector< float > rateVec_
Definition: iDie.h:361
std::vector< float > busyCPUVecTheor_
Definition: iDie.h:365
std::vector< float > busyVecTheor_
Definition: iDie.h:364
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
std::vector< float > busyVec_
Definition: iDie.h:362
unsigned int ls_
Definition: iDie.h:360

Member Function Documentation

float evf::iDie::commonLsStat::getBusyTotalFrac ( bool  procstat,
std::vector< float > &  machineWeightInst 
)
inline

Definition at line 396 of file iDie.h.

References busyCPUVec_, busyVec_, i, and nbMachines.

Referenced by evf::iDie::updateRollingHistos().

396  {
397  double sum=0;
398  double sumMachines=0;
399  for (size_t i=0;i<busyVec_.size();i++) {
400  if (!procstat)
402  else
404  sumMachines+=machineWeightInst[i]*nbMachines.at(i);
405  }
406  if (sumMachines>0)
407  return float(sum/sumMachines);
408  else return 0.;
409  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > busyCPUVec_
Definition: iDie.h:363
std::vector< float > machineWeightInst
Definition: iDie.h:352
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
std::vector< float > busyVec_
Definition: iDie.h:362
float evf::iDie::commonLsStat::getBusyTotalFracTheor ( bool  procstat,
std::vector< float > &  machineWeight 
)
inline

Definition at line 411 of file iDie.h.

References busyCPUVecTheor_, busyVecTheor_, i, and nbMachines.

Referenced by evf::iDie::updateRollingHistos().

411  {
412  float sum=0;
413  float sumMachines=0;
414  for (size_t i=0;i<busyVecTheor_.size() && i<nbMachines.size();i++) {
415  if (!procstat)
417  else
419  sumMachines+=machineWeight[i]*nbMachines[i];
420  }
421  if (sumMachines>0)
422  return sum/sumMachines;
423  else return 0.;
424  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > busyCPUVecTheor_
Definition: iDie.h:365
std::vector< float > busyVecTheor_
Definition: iDie.h:364
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
std::vector< float > machineWeight
Definition: iDie.h:351
unsigned int evf::iDie::commonLsStat::getNReports ( )
inline

Definition at line 426 of file iDie.h.

References i, and nbMachines.

Referenced by evf::iDie::updateRollingHistos().

426  {
427  unsigned int sum=0;
428  for (size_t i=0;i<nbMachines.size();i++) sum+=nbMachines[i];
429  return sum;
430  }
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
float evf::iDie::commonLsStat::getTotalRate ( )
inline

Definition at line 390 of file iDie.h.

References i, and rateVec_.

Referenced by evf::iDie::updateRollingHistos().

390  {
391  float totRate=0;
392  for (size_t i=0;i<rateVec_.size();i++) totRate+=rateVec_[i];
393  return totRate;
394  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > rateVec_
Definition: iDie.h:361
std::string evf::iDie::commonLsStat::printInfo ( )
inline

Definition at line 432 of file iDie.h.

References busyVec_, i, info, nbMachines, and rateVec_.

432  {
433  std::ostringstream info;
434  for (size_t i=0;i<rateVec_.size();i++) {
435  info << i << "/r:" << rateVec_[i] <<"/b:"<<busyVec_[i]<<"/n:"<<nbMachines[i]<<"; ";
436  }
437  return info.str();
438  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > rateVec_
Definition: iDie.h:361
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
std::vector< float > busyVec_
Definition: iDie.h:362
void evf::iDie::commonLsStat::setBusyForClass ( unsigned int  classIdx,
float  rate,
float  busy,
float  busyTheor,
float  busyCPU,
float  busyCPUTheor,
unsigned int  nMachineReports 
)
inline

Definition at line 381 of file iDie.h.

References busyCPUVec_, busyCPUVecTheor_, busyVec_, busyVecTheor_, nbMachines, scaleCards::rate, and rateVec_.

Referenced by evf::iDie::updateRollingHistos().

381  {
382  rateVec_[classIdx]=rate;
383  busyVec_[classIdx]=busy;
384  busyCPUVec_[classIdx]=busyCPU;
385  busyVecTheor_[classIdx]=busyTheor;
386  busyCPUVecTheor_[classIdx]=busyCPUTheor;
387  nbMachines[classIdx]=nMachineReports;
388  }
std::vector< float > busyCPUVec_
Definition: iDie.h:363
std::vector< float > rateVec_
Definition: iDie.h:361
std::vector< float > busyCPUVecTheor_
Definition: iDie.h:365
std::vector< float > busyVecTheor_
Definition: iDie.h:364
list rate
Definition: scaleCards.py:77
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
std::vector< float > busyVec_
Definition: iDie.h:362

Member Data Documentation

std::vector<float> evf::iDie::commonLsStat::busyCPUVec_

Definition at line 363 of file iDie.h.

Referenced by commonLsStat(), getBusyTotalFrac(), and setBusyForClass().

std::vector<float> evf::iDie::commonLsStat::busyCPUVecTheor_

Definition at line 365 of file iDie.h.

Referenced by commonLsStat(), getBusyTotalFracTheor(), and setBusyForClass().

std::vector<float> evf::iDie::commonLsStat::busyVec_

Definition at line 362 of file iDie.h.

Referenced by commonLsStat(), getBusyTotalFrac(), printInfo(), and setBusyForClass().

std::vector<float> evf::iDie::commonLsStat::busyVecTheor_

Definition at line 364 of file iDie.h.

Referenced by commonLsStat(), getBusyTotalFracTheor(), and setBusyForClass().

std::vector<unsigned int> evf::iDie::commonLsStat::datasetCounts_

Definition at line 368 of file iDie.h.

Referenced by evf::iDie::parsePathHisto(), and evf::iDie::updateDatasetHistos().

std::vector<unsigned int> evf::iDie::commonLsStat::endPathCounts_

Definition at line 367 of file iDie.h.

Referenced by evf::iDie::parsePathHisto(), and evf::iDie::updateStreamHistos().

unsigned int evf::iDie::commonLsStat::ls_

Definition at line 360 of file iDie.h.

Referenced by commonLsStat(), and evf::iDie::parsePathHisto().

std::vector<unsigned int> evf::iDie::commonLsStat::nbMachines
std::vector<float> evf::iDie::commonLsStat::rateVec_

Definition at line 361 of file iDie.h.

Referenced by commonLsStat(), getTotalRate(), printInfo(), and setBusyForClass().