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 std::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

◆ FEDMap

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

Definition at line 372 of file ElectronicsQuantity.h.

Constructor & Destructor Documentation

◆ FEDQuantity() [1/2]

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

Definition at line 358 of file ElectronicsQuantity.h.

Referenced by makeCopy().

358 {}

◆ FEDQuantity() [2/2]

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

Definition at line 359 of file ElectronicsQuantity.h.

References setup().

◆ ~FEDQuantity()

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

Definition at line 360 of file ElectronicsQuantity.h.

360 {}

Member Function Documentation

◆ getBin()

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

◆ getLabels()

std::vector< std::string > hcaldqm::quantity::FEDQuantity::getLabels ( )
overridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 560 of file ElectronicsQuantity.cc.

References SummaryClient_cfi::labels, Skims_PA_cff::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

◆ getValue()

int hcaldqm::quantity::FEDQuantity::getValue ( HcalElectronicsId const &  eid)
overridevirtual

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 553 of file ElectronicsQuantity.cc.

References hcaldqm::utilities::crate2fed(), runTauDisplay::eid, and hcaldqm::constants::FED_VME_MIN.

553  {
554  int fed = eid.isVMEid() ? eid.dccid() + FED_VME_MIN : utilities::crate2fed(eid.crateId(), eid.slot());
555  return _feds[fed];
556  }
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:29
int const FED_VME_MIN
Definition: Constants.h:86

◆ makeCopy()

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

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 376 of file ElectronicsQuantity.h.

References _feds, FEDQuantity(), 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  }

◆ max()

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

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 368 of file ElectronicsQuantity.h.

References _feds.

368 { return _feds.size(); }

◆ min()

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

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 367 of file ElectronicsQuantity.h.

367 { return 0; }

◆ nbins()

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

Reimplemented from hcaldqm::quantity::ElectronicsQuantity.

Definition at line 366 of file ElectronicsQuantity.h.

References _feds.

366 { return _feds.size(); }

◆ setup()

void hcaldqm::quantity::FEDQuantity::setup ( std::vector< int > const &  vFEDs)
virtual

Definition at line 548 of file ElectronicsQuantity.cc.

References mps_fire::i.

Referenced by FEDQuantity().

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

Member Data Documentation

◆ _feds

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

Definition at line 373 of file ElectronicsQuantity.h.

Referenced by makeCopy(), max(), and nbins().