CMS 3D CMS Logo

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

int getValue (int x) override
 
double getValue (double 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 (HcalDetId const &)
 
virtual uint32_t getBin (HcalElectronicsId const &)
 
virtual uint32_t getBin (HcalTrigTowerDetId const &)
 
virtual uint32_t getBin (int)
 
virtual uint32_t getBin (double)
 
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 324 of file ValueQuantity.h.

Constructor & Destructor Documentation

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

Definition at line 326 of file ValueQuantity.h.

Referenced by makeCopy().

326 : _type() {}
hcaldqm::quantity::ValueQuantity::ValueQuantity ( ValueQuantityType  type,
bool  isLog = false 
)
inline

Definition at line 327 of file ValueQuantity.h.

327 : Quantity(name_value.at(type), isLog), _type(type) {}
const std::map< ValueQuantityType, std::string > name_value
Definition: ValueQuantity.h:73
virtual bool isLog()
Definition: Quantity.h:35
hcaldqm::quantity::ValueQuantity::~ValueQuantity ( )
inlineoverride

Definition at line 328 of file ValueQuantity.h.

328 {}

Member Function Documentation

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 333 of file ValueQuantity.h.

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

333  {
334  int ret_x = x;
335  if (_showOverflow) {
336  if (x < min()) {
337  ret_x = min();
338  } else if (x > max()) {
339  ret_x = max();
340  }
341  }
342  return ret_x;
343  }
double hcaldqm::quantity::ValueQuantity::getValue ( double  x)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 344 of file ValueQuantity.h.

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

344  {
345  double ret_x = x;
346  if (_showOverflow) {
347  if (x < min()) {
348  ret_x = min();
349  } else if (x > max()) {
350  ret_x = max();
351  }
352  }
353  return ret_x;
354  }
ValueQuantity* hcaldqm::quantity::ValueQuantity::makeCopy ( )
inlineoverridevirtual
double hcaldqm::quantity::ValueQuantity::max ( )
inlineoverridevirtual
double hcaldqm::quantity::ValueQuantity::min ( )
inlineoverridevirtual
int hcaldqm::quantity::ValueQuantity::nbins ( )
inlineoverridevirtual
void hcaldqm::quantity::ValueQuantity::setBits ( TH1 *  o)
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 362 of file ValueQuantity.h.

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

362  {
364  setLS(o);
365  }
virtual void setBits(TH1 *o)
Definition: Quantity.h:51
virtual void hcaldqm::quantity::ValueQuantity::setLS ( TH1 *  o)
inlinevirtual

Definition at line 366 of file ValueQuantity.h.

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

Referenced by setBits().

366  {
367  if (_type == fLS) {
368  // for LS axis - set the bit
369  // set extendable axes.
371  // o->SetCanExtend(TH1::kXaxis);
372  }
373  }
int const BIT_OFFSET
Definition: Constants.h:282
int const BIT_AXIS_LS
Definition: Constants.h:286
QuantityType hcaldqm::quantity::ValueQuantity::type ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::Quantity.

Definition at line 357 of file ValueQuantity.h.

References hcaldqm::quantity::fValueQuantity.

Member Data Documentation

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

Definition at line 376 of file ValueQuantity.h.

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