CMS 3D CMS Logo

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

#include <Quantity.h>

Inheritance diagram for hcaldqm::quantity::Quantity:
hcaldqm::quantity::DetectorQuantity hcaldqm::quantity::ElectronicsQuantity hcaldqm::quantity::TrigTowerQuantity hcaldqm::quantity::ValueQuantity hcaldqm::quantity::CrateQuantity hcaldqm::quantity::FEDQuantity hcaldqm::quantity::EventNumber hcaldqm::quantity::EventType hcaldqm::quantity::FlagQuantity hcaldqm::quantity::LumiSection hcaldqm::quantity::LumiSectionCoarse hcaldqm::quantity::RunNumber

Public Member Functions

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 int getValue (int x)
 
virtual double getValue (double x)
 
virtual bool isCoordinate ()
 
virtual bool isLog ()
 
virtual QuantitymakeCopy ()
 
virtual double max ()
 
virtual double min ()
 
virtual std::string name ()
 
virtual int nbins ()
 
 Quantity ()
 
 Quantity (std::string const &name, bool isLog)
 
virtual void setAxisType (AxisType at)
 
virtual void setBits (TH1 *o)
 
virtual void setLog (TH1 *o)
 
virtual void setMax (double)
 
virtual void setMin (double)
 
virtual void setNbins (int)
 
virtual void showOverflow (bool showOverflow)
 
virtual QuantityType type ()
 
virtual int wofnbins ()
 
virtual ~Quantity ()
 

Protected Attributes

AxisType _axistype
 
bool _isLog
 
std::string _name
 
bool _showOverflow
 

Detailed Description

Definition at line 27 of file Quantity.h.

Constructor & Destructor Documentation

◆ Quantity() [1/2]

hcaldqm::quantity::Quantity::Quantity ( )
inline

Definition at line 29 of file Quantity.h.

Referenced by makeCopy().

29 : _name("Quantity"), _isLog(false), _showOverflow(false) {}

◆ Quantity() [2/2]

hcaldqm::quantity::Quantity::Quantity ( std::string const &  name,
bool  isLog 
)
inline

Definition at line 30 of file Quantity.h.

◆ ~Quantity()

virtual hcaldqm::quantity::Quantity::~Quantity ( )
inlinevirtual

Definition at line 31 of file Quantity.h.

31 {}

Member Function Documentation

◆ getBin() [1/5]

virtual uint32_t hcaldqm::quantity::Quantity::getBin ( HcalDetId const &  )
inlinevirtual

◆ getBin() [2/5]

virtual uint32_t hcaldqm::quantity::Quantity::getBin ( HcalElectronicsId const &  )
inlinevirtual

◆ getBin() [3/5]

virtual uint32_t hcaldqm::quantity::Quantity::getBin ( HcalTrigTowerDetId const &  )
inlinevirtual

Reimplemented in hcaldqm::quantity::TrigTowerQuantity.

Definition at line 41 of file Quantity.h.

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl().

41 { return 1; }

◆ getBin() [4/5]

virtual uint32_t hcaldqm::quantity::Quantity::getBin ( int  )
inlinevirtual

◆ getBin() [5/5]

virtual uint32_t hcaldqm::quantity::Quantity::getBin ( double  )
inlinevirtual

Definition at line 43 of file Quantity.h.

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl().

43 { return 1; }

◆ getLabels()

virtual std::vector<std::string> hcaldqm::quantity::Quantity::getLabels ( )
inlinevirtual

◆ getValue() [1/5]

virtual int hcaldqm::quantity::Quantity::getValue ( HcalDetId const &  )
inlinevirtual

◆ getValue() [2/5]

virtual int hcaldqm::quantity::Quantity::getValue ( HcalElectronicsId const &  )
inlinevirtual

Reimplemented in hcaldqm::quantity::CrateQuantity, hcaldqm::quantity::FEDQuantity, and hcaldqm::quantity::ElectronicsQuantity.

Definition at line 46 of file Quantity.h.

46 { return 0; }

◆ getValue() [3/5]

virtual int hcaldqm::quantity::Quantity::getValue ( HcalTrigTowerDetId const &  )
inlinevirtual

Reimplemented in hcaldqm::quantity::TrigTowerQuantity.

Definition at line 47 of file Quantity.h.

47 { return 0; }

◆ getValue() [4/5]

virtual int hcaldqm::quantity::Quantity::getValue ( int  x)
inlinevirtual

◆ getValue() [5/5]

virtual double hcaldqm::quantity::Quantity::getValue ( double  x)
inlinevirtual

Reimplemented in hcaldqm::quantity::ValueQuantity.

Definition at line 49 of file Quantity.h.

References x.

49 { return x; }

◆ isCoordinate()

virtual bool hcaldqm::quantity::Quantity::isCoordinate ( )
inlinevirtual

◆ isLog()

virtual bool hcaldqm::quantity::Quantity::isLog ( )
inlinevirtual

Definition at line 35 of file Quantity.h.

References _isLog.

35 { return _isLog; }

◆ makeCopy()

virtual Quantity* hcaldqm::quantity::Quantity::makeCopy ( )
inlinevirtual

◆ max()

virtual double hcaldqm::quantity::Quantity::max ( )
inlinevirtual

◆ min()

virtual double hcaldqm::quantity::Quantity::min ( )
inlinevirtual

◆ name()

virtual std::string hcaldqm::quantity::Quantity::name ( void  )
inlinevirtual

◆ nbins()

virtual int hcaldqm::quantity::Quantity::nbins ( )
inlinevirtual

◆ setAxisType()

virtual void hcaldqm::quantity::Quantity::setAxisType ( AxisType  at)
inlinevirtual

◆ setBits()

virtual void hcaldqm::quantity::Quantity::setBits ( TH1 *  o)
inlinevirtual

◆ setLog()

virtual void hcaldqm::quantity::Quantity::setLog ( TH1 *  o)
inlinevirtual

Definition at line 52 of file Quantity.h.

References _axistype, _isLog, hcaldqm::constants::BIT_OFFSET, and EcalTangentSkim_cfg::o.

Referenced by setBits().

52  {
53  if (_isLog)
54  o->SetBit(BIT(constants::BIT_OFFSET + _axistype));
55  }
int const BIT_OFFSET
Definition: Constants.h:282

◆ setMax()

virtual void hcaldqm::quantity::Quantity::setMax ( double  )
inlinevirtual

◆ setMin()

virtual void hcaldqm::quantity::Quantity::setMin ( double  )
inlinevirtual

Definition at line 65 of file Quantity.h.

65 {}

◆ setNbins()

virtual void hcaldqm::quantity::Quantity::setNbins ( int  )
inlinevirtual

Definition at line 66 of file Quantity.h.

66 {}

◆ showOverflow()

virtual void hcaldqm::quantity::Quantity::showOverflow ( bool  showOverflow)
inlinevirtual

◆ type()

virtual QuantityType hcaldqm::quantity::Quantity::type ( )
inlinevirtual

◆ wofnbins()

virtual int hcaldqm::quantity::Quantity::wofnbins ( )
inlinevirtual

Definition at line 58 of file Quantity.h.

References nbins().

Referenced by hcaldqm::Container2D::getBinEntries(), and hcaldqm::ContainerSingle2D::getBinEntries().

58 { return nbins() + 2; }

Member Data Documentation

◆ _axistype

AxisType hcaldqm::quantity::Quantity::_axistype
protected

Definition at line 73 of file Quantity.h.

Referenced by setAxisType(), and setLog().

◆ _isLog

bool hcaldqm::quantity::Quantity::_isLog
protected

◆ _name

std::string hcaldqm::quantity::Quantity::_name
protected

Definition at line 71 of file Quantity.h.

Referenced by plotting.Subtract::__str__(), plotting.Transform::__str__(), plotting.FakeDuplicate::__str__(), plotting.CutEfficiency::__str__(), plotting.AggregateBins::__str__(), plotting.AggregateHistos::__str__(), plotting.ROC::__str__(), trackingPlots.TimePerEventPlot::__str__(), trackingPlots.TimePerTrackPlot::__str__(), SequenceTypes.SequencePlaceholder::_clonesequence(), trackingPlots.TimePerEventPlot::_create(), plotting.PlotGroup::_drawSeparate(), plotting.PlotGroup::_save(), SequenceTypes.SequencePlaceholder::copy(), SequenceTypes._TaskBasePlaceholder::copy(), plotting.Subtract::create(), plotting.Transform::create(), plotting.FakeDuplicate::create(), plotting.CutEfficiency::create(), plotting.AggregateBins::create(), plotting.AggregateHistos::create(), trackingPlots.TimePerTrackPlot::create(), plotting.Plot::create(), plotting.PlotGroup::draw(), SequenceTypes.SequencePlaceholder::dumpPython(), SequenceTypes._TaskBasePlaceholder::dumpPython(), SequenceTypes.SequencePlaceholder::dumpSequenceConfig(), SequenceTypes.SequencePlaceholder::dumpSequencePython(), SequenceTypes._TaskBasePlaceholder::dumpSequencePython(), plotting.Plot::getName(), plotting.PlotGroup::getName(), plotting.PlotterFolder::getName(), plotting.PlotterItem::getName(), plotting.PlotterFolder::getSelectionNameIterator(), SequenceTypes.SequencePlaceholder::insertInto(), SequenceTypes._TaskBasePlaceholder::insertInto(), makeCopy(), name(), validation.SimpleSample::name(), trackingPlots.Iteration::name(), plotting.PlotterItem::readDirs(), plotting.PlotGroup::remove(), SequenceTypes.SequencePlaceholder::resolve(), SequenceTypes._TaskBasePlaceholder::resolve(), and plotting.Plot::setName().

◆ _showOverflow

bool hcaldqm::quantity::Quantity::_showOverflow
protected

Definition at line 74 of file Quantity.h.

Referenced by hcaldqm::quantity::ValueQuantity::getValue(), and showOverflow().