CMS 3D CMS Logo

Public Member Functions | Public Attributes

evf::iDie::commonLsStat Class Reference

List of all members.

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_, i, ls_, nbMachines, and rateVec_.

                                                           {
        for (size_t i=0;i<classes;i++) {
          rateVec_.push_back(0.);
          busyVec_.push_back(0.);
          busyCPUVec_.push_back(0.);
          busyVecTheor_.push_back(0.);
          busyCPUVecTheor_.push_back(0.);
          nbMachines.push_back(0);
        }
        ls_=lsid;
      }

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

                                                                                 {
        double sum=0;
        double sumMachines=0;
        for (size_t i=0;i<busyVec_.size();i++) {
          if (!procstat)
            sum+=machineWeightInst[i]*nbMachines.at(i)*busyVec_[i];
          else
            sum+=machineWeightInst[i]*nbMachines.at(i)*busyCPUVec_[i];
          sumMachines+=machineWeightInst[i]*nbMachines.at(i);
        }
        if (sumMachines>0)
          return float(sum/sumMachines);
        else return 0.;
      }
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().

                                                                                  {
        float sum=0;
        float sumMachines=0;
        for (size_t i=0;i<busyVecTheor_.size() && i<nbMachines.size();i++) {
          if (!procstat)
            sum+=machineWeight[i]*nbMachines[i]*busyVecTheor_[i];
          else
            sum+=machineWeight[i]*nbMachines[i]*busyCPUVecTheor_[i];
          sumMachines+=machineWeight[i]*nbMachines[i];
        }
        if (sumMachines>0)
          return sum/sumMachines;
        else return 0.;
      }
unsigned int evf::iDie::commonLsStat::getNReports ( ) [inline]

Definition at line 426 of file iDie.h.

References i, and nbMachines.

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

                                 {
        unsigned int sum=0;
        for (size_t i=0;i<nbMachines.size();i++) sum+=nbMachines[i];
        return sum;
      }
float evf::iDie::commonLsStat::getTotalRate ( ) [inline]

Definition at line 390 of file iDie.h.

References i, and rateVec_.

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

                           {
        float totRate=0;
        for (size_t i=0;i<rateVec_.size();i++) totRate+=rateVec_[i];
        return totRate;
      } 
std::string evf::iDie::commonLsStat::printInfo ( ) [inline]

Definition at line 432 of file iDie.h.

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

                            {
        std::ostringstream info;
        for (size_t i=0;i<rateVec_.size();i++) {
          info << i << "/r:" << rateVec_[i] <<"/b:"<<busyVec_[i]<<"/n:"<<nbMachines[i]<<"; ";
        }
        return info.str();
      }
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, RPCpg::rate(), and rateVec_.

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

                                                                                                                                                         {
        rateVec_[classIdx]=rate;
        busyVec_[classIdx]=busy;
        busyCPUVec_[classIdx]=busyCPU;
        busyVecTheor_[classIdx]=busyTheor;
        busyCPUVecTheor_[classIdx]=busyCPUTheor;
        nbMachines[classIdx]=nMachineReports;
      }

Member Data Documentation

Definition at line 363 of file iDie.h.

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

Definition at line 365 of file iDie.h.

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

Definition at line 362 of file iDie.h.

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

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

Definition at line 360 of file iDie.h.

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

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

Definition at line 361 of file iDie.h.

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