CMS 3D CMS Logo

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

#include <ValueQuantity.h>

Inheritance diagram for hcaldqm::quantity::ValueQuantity:
hcaldqm::quantity::Quantity hcaldqm::quantity::EventNumber hcaldqm::quantity::EventType hcaldqm::quantity::FlagQuantity hcaldqm::quantity::LumiSection hcaldqm::quantity::LumiSectionCoarse hcaldqm::quantity::RunNumber

Public Member Functions

double getValue (double x) override
 
int getValue (int x) override
 
ValueQuantitymakeCopy () override
 
double max () override
 
double min () override
 
int nbins () 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 (double)
 
virtual uint32_t getBin (HcalDetId const &)
 
virtual uint32_t getBin (HcalElectronicsId const &)
 
virtual uint32_t getBin (HcalTrigTowerDetId const &)
 
virtual uint32_t getBin (int)
 
virtual std::vector< std::string > getLabels ()
 
virtual int getValue (HcalDetId const &)
 
virtual int getValue (HcalElectronicsId const &)
 
virtual int getValue (HcalTrigTowerDetId const &)
 
virtual bool isCoordinate ()
 
virtual bool isLog ()
 
virtual std::string name ()
 
 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

ValueQuantityType _type
 
- Protected Attributes inherited from hcaldqm::quantity::Quantity
AxisType _axistype
 
bool _isLog
 
std::string _name
 
bool _showOverflow
 

Detailed Description

Definition at line 319 of file ValueQuantity.h.

Constructor & Destructor Documentation

◆ ValueQuantity() [1/2]

hcaldqm::quantity::ValueQuantity::ValueQuantity ( )
inline

Definition at line 321 of file ValueQuantity.h.

321 : _type() {}

Referenced by makeCopy().

◆ ValueQuantity() [2/2]

hcaldqm::quantity::ValueQuantity::ValueQuantity ( ValueQuantityType  type,
bool  isLog = false 
)
inline

Definition at line 322 of file ValueQuantity.h.

322 : Quantity(name_value.at(type), isLog), _type(type) {}

◆ ~ValueQuantity()

hcaldqm::quantity::ValueQuantity::~ValueQuantity ( )
inlineoverride

Definition at line 323 of file ValueQuantity.h.

323 {}

Member Function Documentation

◆ getValue() [1/2]

double hcaldqm::quantity::ValueQuantity::getValue ( double  x)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 339 of file ValueQuantity.h.

339  {
340  double ret_x = x;
341  if (_showOverflow) {
342  if (x < min()) {
343  ret_x = min();
344  } else if (x > max()) {
345  ret_x = max();
346  }
347  }
348  return ret_x;
349  }

References hcaldqm::quantity::Quantity::_showOverflow, max(), and min().

◆ getValue() [2/2]

int hcaldqm::quantity::ValueQuantity::getValue ( int  x)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Reimplemented in hcaldqm::quantity::EventType, hcaldqm::quantity::RunNumber, hcaldqm::quantity::LumiSectionCoarse, hcaldqm::quantity::LumiSection, and hcaldqm::quantity::FlagQuantity.

Definition at line 328 of file ValueQuantity.h.

328  {
329  int ret_x = x;
330  if (_showOverflow) {
331  if (x < min()) {
332  ret_x = min();
333  } else if (x > max()) {
334  ret_x = max();
335  }
336  }
337  return ret_x;
338  }

References hcaldqm::quantity::Quantity::_showOverflow, max(), and min().

◆ makeCopy()

ValueQuantity* hcaldqm::quantity::ValueQuantity::makeCopy ( )
inlineoverridevirtual

◆ max()

double hcaldqm::quantity::ValueQuantity::max ( )
inlineoverridevirtual

◆ min()

double hcaldqm::quantity::ValueQuantity::min ( )
inlineoverridevirtual

◆ nbins()

int hcaldqm::quantity::ValueQuantity::nbins ( )
inlineoverridevirtual

◆ setBits()

void hcaldqm::quantity::ValueQuantity::setBits ( TH1 *  o)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 357 of file ValueQuantity.h.

357  {
359  setLS(o);
360  }

References EcalTangentSkim_cfg::o, hcaldqm::quantity::Quantity::setBits(), and setLS().

◆ setLS()

virtual void hcaldqm::quantity::ValueQuantity::setLS ( TH1 *  o)
inlinevirtual

Definition at line 361 of file ValueQuantity.h.

361  {
362  if (_type == fLS) {
363  // for LS axis - set the bit
364  // set extendable axes.
366  // o->SetCanExtend(TH1::kXaxis);
367  }
368  }

References _type, hcaldqm::constants::BIT_AXIS_LS, hcaldqm::constants::BIT_OFFSET, hcaldqm::quantity::fLS, and EcalTangentSkim_cfg::o.

Referenced by setBits().

◆ type()

QuantityType hcaldqm::quantity::ValueQuantity::type ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 352 of file ValueQuantity.h.

352 { return fValueQuantity; }

References hcaldqm::quantity::fValueQuantity.

Member Data Documentation

◆ _type

ValueQuantityType hcaldqm::quantity::ValueQuantity::_type
protected

Definition at line 371 of file ValueQuantity.h.

Referenced by makeCopy(), max(), min(), nbins(), SequenceTypes.ExpandVisitor::result(), and setLS().

hcaldqm::quantity::ValueQuantity::setLS
virtual void setLS(TH1 *o)
Definition: ValueQuantity.h:361
hcaldqm::quantity::ValueQuantity::min
double min() override
Definition: ValueQuantity.h:354
hcaldqm::quantity::ValueQuantity::_type
ValueQuantityType _type
Definition: ValueQuantity.h:371
hcaldqm::quantity::Quantity::setBits
virtual void setBits(TH1 *o)
Definition: Quantity.h:51
DDAxes::x
hcaldqm::constants::BIT_OFFSET
const int BIT_OFFSET
Definition: Constants.h:282
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
hcaldqm::quantity::Quantity::isLog
virtual bool isLog()
Definition: Quantity.h:35
hcaldqm::quantity::Quantity::_showOverflow
bool _showOverflow
Definition: Quantity.h:74
hcaldqm::quantity::fValueQuantity
Definition: Quantity.h:19
hcaldqm::quantity::min_value
const std::map< ValueQuantityType, double > min_value
Definition: ValueQuantity.h:134
hcaldqm::quantity::name_value
const std::map< ValueQuantityType, std::string > name_value
Definition: ValueQuantity.h:72
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
hcaldqm::quantity::Quantity::Quantity
Quantity()
Definition: Quantity.h:29
hcaldqm::quantity::ValueQuantity::max
double max() override
Definition: ValueQuantity.h:355
hcaldqm::constants::BIT_AXIS_LS
const int BIT_AXIS_LS
Definition: Constants.h:286
hcaldqm::quantity::ValueQuantity::ValueQuantity
ValueQuantity()
Definition: ValueQuantity.h:321
hcaldqm::quantity::Quantity::_isLog
bool _isLog
Definition: Quantity.h:72
hcaldqm::quantity::fLS
Definition: ValueQuantity.h:23
hcaldqm::quantity::max_value
const std::map< ValueQuantityType, double > max_value
Definition: ValueQuantity.h:196
hcaldqm::quantity::nbins_value
const std::map< ValueQuantityType, int > nbins_value
Definition: ValueQuantity.h:258