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 356 of file ElectronicsQuantity.h.

Member Typedef Documentation

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

Definition at line 372 of file ElectronicsQuantity.h.

Constructor & Destructor Documentation

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

Definition at line 358 of file ElectronicsQuantity.h.

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

Definition at line 359 of file ElectronicsQuantity.h.

References GeneralSetup::setup().

hcaldqm::quantity::FEDQuantity::~FEDQuantity ( )
inlineoverride

Member Function Documentation

uint32_t hcaldqm::quantity::FEDQuantity::getBin ( HcalElectronicsId const &  eid)
overridevirtual
std::vector< std::string > hcaldqm::quantity::FEDQuantity::getLabels ( )
overridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 560 of file ElectronicsQuantity.cc.

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

560  {
561  std::vector<std::string> labels(_feds.size());
562  char name[5];
563  for (auto const &v : _feds) {
564  sprintf(name, "%d", v.first);
565  labels[v.second] = std::string(name);
566  }
567 
568  return labels;
569  }
virtual std::string name()
Definition: Quantity.h:34
int hcaldqm::quantity::FEDQuantity::getValue ( HcalElectronicsId const &  eid)
overridevirtual
FEDQuantity* hcaldqm::quantity::FEDQuantity::makeCopy ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 376 of file ElectronicsQuantity.h.

References AlCaHLTBitMon_ParallelJobs::p, and jetUpdater_cfi::sort.

376  {
377  std::vector<int> vfeds;
378  for (auto const &p : _feds) {
379  vfeds.push_back(p.first);
380  }
381 
382  // MUST SORT BEFORE EXITING!
383  std::sort(vfeds.begin(), vfeds.end());
384  return new FEDQuantity(vfeds);
385  }
double hcaldqm::quantity::FEDQuantity::max ( )
inlineoverridevirtual
double hcaldqm::quantity::FEDQuantity::min ( )
inlineoverridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 367 of file ElectronicsQuantity.h.

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

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 366 of file ElectronicsQuantity.h.

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

Definition at line 548 of file ElectronicsQuantity.cc.

References mps_fire::i.

548  {
549  for (uint32_t i = 0; i < vFEDs.size(); i++)
550  _feds.insert(std::make_pair(vFEDs[i], i));
551  }

Member Data Documentation

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

Definition at line 373 of file ElectronicsQuantity.h.