CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
hcaldqm::quantity::RunNumber Class Reference

#include <ValueQuantity.h>

Inheritance diagram for hcaldqm::quantity::RunNumber:
hcaldqm::quantity::ValueQuantity hcaldqm::quantity::Quantity

Public Member Functions

uint32_t getBin (int run) override
 
std::vector< std::string > getLabels () override
 
int getValue (int run) override
 
double max () override
 
double min () override
 
std::string name () override
 
int nbins () override
 
 RunNumber ()
 
 RunNumber (std::vector< int > runs)
 
 ~RunNumber () override
 
- Public Member Functions inherited from hcaldqm::quantity::ValueQuantity
double getValue (double x) override
 
ValueQuantitymakeCopy () override
 
void setBits (TH1 *o) override
 
virtual void setLS (TH1 *o)
 
QuantityType type () override
 
 ValueQuantity ()
 
 ValueQuantity (ValueQuantityType type, bool isLog=false)
 
 ~ValueQuantity () override
 
- Public Member Functions inherited from hcaldqm::quantity::Quantity
virtual uint32_t getBin (HcalDetId const &)
 
virtual uint32_t getBin (HcalElectronicsId const &)
 
virtual uint32_t getBin (HcalTrigTowerDetId const &)
 
virtual uint32_t getBin (double)
 
virtual int getValue (HcalDetId const &)
 
virtual int getValue (HcalElectronicsId const &)
 
virtual int getValue (HcalTrigTowerDetId const &)
 
virtual bool isCoordinate ()
 
virtual bool isLog ()
 
 Quantity ()
 
 Quantity (std::string const &name, bool isLog)
 
virtual void setAxisType (AxisType at)
 
virtual void setLog (TH1 *o)
 
virtual void setMax (double)
 
virtual void setMin (double)
 
virtual void setNbins (int)
 
virtual void showOverflow (bool showOverflow)
 
virtual int wofnbins ()
 
virtual ~Quantity ()
 

Protected Attributes

std::vector< int > _runs
 
- Protected Attributes inherited from hcaldqm::quantity::ValueQuantity
ValueQuantityType _type
 
- Protected Attributes inherited from hcaldqm::quantity::Quantity
AxisType _axistype
 
bool _isLog
 
std::string _name
 
bool _showOverflow
 

Detailed Description

Definition at line 447 of file ValueQuantity.h.

Constructor & Destructor Documentation

hcaldqm::quantity::RunNumber::RunNumber ( )
inline

Definition at line 450 of file ValueQuantity.h.

Referenced by PopulateDB.PopulateDB::run().

450 {}
hcaldqm::quantity::RunNumber::RunNumber ( std::vector< int >  runs)
inline

Definition at line 451 of file ValueQuantity.h.

Referenced by PopulateDB.PopulateDB::run().

451  :
452  _runs(runs)
453  {}
std::vector< int > _runs
hcaldqm::quantity::RunNumber::~RunNumber ( )
inlineoverride

Definition at line 454 of file ValueQuantity.h.

454 {}

Member Function Documentation

uint32_t hcaldqm::quantity::RunNumber::getBin ( int  run)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 488 of file ValueQuantity.h.

References hcaldqm::quantity::ValueQuantity::getValue().

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl().

489  {
490  return (this->getValue(run)+1);
491  }
int getValue(int run) override
std::vector<std::string> hcaldqm::quantity::RunNumber::getLabels ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 460 of file ValueQuantity.h.

References mps_fire::i, tablePrinter::labels, and hcaldqm::quantity::Quantity::name().

461  {
462  char name[10];
463  std::vector<std::string> labels;
464  for (uint32_t i=0; i<_runs.size(); i++)
465  {
466  sprintf(name, "%d", _runs[i]);
467  labels.push_back(name);
468  }
469  return labels;
470  }
std::vector< int > _runs
std::string name() override
int hcaldqm::quantity::RunNumber::getValue ( int  run)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 471 of file ValueQuantity.h.

References Exception, mps_fire::i, createfilelist::int, and findQualityFiles::run.

472  {
473  int ir = -1;
474  for (uint32_t i=0; i<_runs.size(); i++)
475  if (_runs[i]==run)
476  {
477  ir = (int)i;
478  break;
479  }
480 
481  if (ir==-1)
482  throw cms::Exception("HCALDQM")
483  << "run number doens't exist " << run;
484 
485  return ir;
486  }
std::vector< int > _runs
double hcaldqm::quantity::RunNumber::max ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 459 of file ValueQuantity.h.

459 {return _runs.size();}
std::vector< int > _runs
double hcaldqm::quantity::RunNumber::min ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 458 of file ValueQuantity.h.

458 {return 0;}
std::string hcaldqm::quantity::RunNumber::name ( void  )
inlineoverridevirtual
int hcaldqm::quantity::RunNumber::nbins ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 457 of file ValueQuantity.h.

457 {return _runs.size();}
std::vector< int > _runs

Member Data Documentation

std::vector<int> hcaldqm::quantity::RunNumber::_runs
protected

Definition at line 494 of file ValueQuantity.h.