CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual uint32_t getBin (int run)
 
virtual std::vector< std::string > getLabels ()
 
virtual int getValue (int run)
 
virtual double max ()
 
virtual double min ()
 
virtual std::string name ()
 
virtual int nbins ()
 
 RunNumber ()
 
 RunNumber (std::vector< int > runs)
 
virtual ~RunNumber ()
 
- Public Member Functions inherited from hcaldqm::quantity::ValueQuantity
virtual double getValue (double x)
 
virtual ValueQuantitymakeCopy ()
 
virtual void setBits (TH1 *o)
 
virtual void setLS (TH1 *o)
 
virtual QuantityType type ()
 
 ValueQuantity ()
 
 ValueQuantity (ValueQuantityType type, bool isLog=false)
 
virtual ~ValueQuantity ()
 
- 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 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
 

Detailed Description

Definition at line 186 of file ValueQuantity.h.

Constructor & Destructor Documentation

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

Definition at line 189 of file ValueQuantity.h.

Referenced by PopulateDB.PopulateDB::run().

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

Definition at line 190 of file ValueQuantity.h.

Referenced by PopulateDB.PopulateDB::run().

190  :
191  _runs(runs)
192  {}
std::vector< int > _runs
tuple runs
Definition: gather_cfg.py:87
virtual hcaldqm::quantity::RunNumber::~RunNumber ( )
inlinevirtual

Definition at line 193 of file ValueQuantity.h.

193 {}

Member Function Documentation

virtual uint32_t hcaldqm::quantity::RunNumber::getBin ( int  run)
inlinevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 227 of file ValueQuantity.h.

References getValue().

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl().

228  {
229  return (this->getValue(run)+1);
230  }
virtual int getValue(int run)
virtual std::vector<std::string> hcaldqm::quantity::RunNumber::getLabels ( )
inlinevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 199 of file ValueQuantity.h.

References _runs, i, HLT_25ns10e33_v2_cff::labels, and name().

200  {
201  char name[10];
202  std::vector<std::string> labels;
203  for (uint32_t i=0; i<_runs.size(); i++)
204  {
205  sprintf(name, "%d", _runs[i]);
206  labels.push_back(name);
207  }
208  return labels;
209  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > _runs
virtual std::string name()
virtual int hcaldqm::quantity::RunNumber::getValue ( int  run)
inlinevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 210 of file ValueQuantity.h.

References _runs, Exception, i, and DTTTrigCorrFirst::run.

Referenced by getBin().

211  {
212  int ir = -1;
213  for (uint32_t i=0; i<_runs.size(); i++)
214  if (_runs[i]==run)
215  {
216  ir = (int)i;
217  break;
218  }
219 
220  if (ir==-1)
221  throw cms::Exception("HCALDQM")
222  << "run number doens't exist " << run;
223 
224  return ir;
225  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > _runs
virtual double hcaldqm::quantity::RunNumber::max ( )
inlinevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 198 of file ValueQuantity.h.

References _runs.

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

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 197 of file ValueQuantity.h.

197 {return 0;}
virtual std::string hcaldqm::quantity::RunNumber::name ( void  )
inlinevirtual
virtual int hcaldqm::quantity::RunNumber::nbins ( )
inlinevirtual

Reimplemented from hcaldqm::quantity::ValueQuantity.

Definition at line 196 of file ValueQuantity.h.

References _runs.

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

Member Data Documentation

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

Definition at line 233 of file ValueQuantity.h.

Referenced by getLabels(), getValue(), max(), and nbins().