CMS 3D CMS Logo

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

#include <ElectronicsQuantity.h>

Inheritance diagram for hcaldqm::quantity::FEDQuantity:
hcaldqm::quantity::ElectronicsQuantity hcaldqm::quantity::Quantity

Public Member Functions

 FEDQuantity ()
 
 FEDQuantity (std::vector< int > const &vFEDs)
 
uint32_t getBin (HcalElectronicsId const &) override
 
std::vector< std::string > getLabels () override
 
int getValue (HcalElectronicsId const &) override
 
FEDQuantitymakeCopy () override
 
double max () override
 
double min () override
 
int nbins () override
 
virtual void setup (std::vector< int > const &vFEDs)
 
 ~FEDQuantity () override
 
- Public Member Functions inherited from hcaldqm::quantity::ElectronicsQuantity
 ElectronicsQuantity ()
 
 ElectronicsQuantity (ElectronicsQuantityType type, bool isLog=false)
 
bool isCoordinate () override
 
QuantityType type () override
 
 ~ElectronicsQuantity () override
 
- Public Member Functions inherited from hcaldqm::quantity::Quantity
virtual uint32_t getBin (HcalDetId const &)
 
virtual uint32_t getBin (HcalTrigTowerDetId const &)
 
virtual uint32_t getBin (int)
 
virtual uint32_t getBin (double)
 
virtual int getValue (HcalDetId const &)
 
virtual int getValue (HcalTrigTowerDetId const &)
 
virtual int getValue (int x)
 
virtual double getValue (double x)
 
virtual bool isLog ()
 
virtual std::string name ()
 
 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 int wofnbins ()
 
virtual ~Quantity ()
 

Protected Types

typedef boost::unordered_map< int, uint32_t > FEDMap
 

Protected Attributes

FEDMap _feds
 
- Protected Attributes inherited from hcaldqm::quantity::ElectronicsQuantity
ElectronicsQuantityType _type
 
- Protected Attributes inherited from hcaldqm::quantity::Quantity
AxisType _axistype
 
bool _isLog
 
std::string _name
 
bool _showOverflow
 

Detailed Description

Definition at line 367 of file ElectronicsQuantity.h.

Member Typedef Documentation

typedef boost::unordered_map<int, uint32_t> hcaldqm::quantity::FEDQuantity::FEDMap
protected

Definition at line 386 of file ElectronicsQuantity.h.

Constructor & Destructor Documentation

hcaldqm::quantity::FEDQuantity::FEDQuantity ( )
inline

Definition at line 370 of file ElectronicsQuantity.h.

370 {}
hcaldqm::quantity::FEDQuantity::FEDQuantity ( std::vector< int > const &  vFEDs)
inline

Definition at line 371 of file ElectronicsQuantity.h.

References GeneralSetup::setup().

371  :
372  ElectronicsQuantity(fFED, false)
373  {this->setup(vFEDs);}
virtual void setup(std::vector< int > const &vFEDs)
hcaldqm::quantity::FEDQuantity::~FEDQuantity ( )
inlineoverride

Member Function Documentation

uint32_t hcaldqm::quantity::FEDQuantity::getBin ( HcalElectronicsId const &  eid)
overridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 766 of file ElectronicsQuantity.cc.

References reco::JetExtendedAssociation::getValue().

Referenced by BTagWeightCalculator.BTagWeightCalculator::calcJetWeightImpl().

767  {
768  return getValue(eid)+1;
769  }
int getValue(HcalElectronicsId const &) override
std::vector< std::string > hcaldqm::quantity::FEDQuantity::getLabels ( )
overridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 771 of file ElectronicsQuantity.cc.

References tablePrinter::labels, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, and findQualityFiles::v.

772  {
773  std::vector<std::string> labels(_feds.size());
774  char name[5];
775  BOOST_FOREACH(FEDMap::value_type &v, _feds)
776  {
777  sprintf(name, "%d", v.first);
778  labels[v.second] = std::string(name);
779  }
780 
781  return labels;
782  }
virtual std::string name()
Definition: Quantity.h:47
int hcaldqm::quantity::FEDQuantity::getValue ( HcalElectronicsId const &  eid)
overridevirtual
FEDQuantity* hcaldqm::quantity::FEDQuantity::makeCopy ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 390 of file ElectronicsQuantity.h.

References AlCaHLTBitMon_ParallelJobs::p.

391  {
392  std::vector<int> vfeds;
393  BOOST_FOREACH(FEDMap::value_type &p, _feds)
394  {
395  vfeds.push_back(p.first);
396  }
397 
398  // MUST SORT BEFORE EXITING!
399  std::sort(vfeds.begin(), vfeds.end());
400  return new FEDQuantity(vfeds);
401  }
double hcaldqm::quantity::FEDQuantity::max ( )
inlineoverridevirtual
double hcaldqm::quantity::FEDQuantity::min ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 381 of file ElectronicsQuantity.h.

381 {return 0;}
int hcaldqm::quantity::FEDQuantity::nbins ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 380 of file ElectronicsQuantity.h.

380 {return _feds.size();}
void hcaldqm::quantity::FEDQuantity::setup ( std::vector< int > const &  vFEDs)
virtual

Definition at line 753 of file ElectronicsQuantity.cc.

References mps_fire::i.

754  {
755  for (uint32_t i=0; i<vFEDs.size(); i++)
756  _feds.insert(std::make_pair(vFEDs[i], i));
757  }

Member Data Documentation

FEDMap hcaldqm::quantity::FEDQuantity::_feds
protected

Definition at line 387 of file ElectronicsQuantity.h.