CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Attributes
hcaldqm::DQClient Class Reference

#include <DQClient.h>

Inheritance diagram for hcaldqm::DQClient:
hcaldqm::DQModule hcaldqm::DigiRunSummary hcaldqm::PedestalRunSummary hcaldqm::RawRunSummary hcaldqm::RecoRunSummary hcaldqm::TPRunSummary

Classes

struct  LSSummary
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

virtual void beginLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &lb, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQClient (std::string const &, std::string const &, edm::ParameterSet const &, edm::ConsumesCollector &iC)
 
virtual std::vector< flag::FlagendJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual void endLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
 ~DQClient () override
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule () noexcept(false)
 

Protected Attributes

HcalElectronicsMap const * _emap
 
int _maxProcessedLS
 
std::string _taskname
 
int _totalLS
 
std::vector< uint32_t > _vcdaqEids
 
std::vector< int > _vCrates
 
std::vector< int > _vFEDs
 
std::vector< uint32_t > _vhashCrates
 
std::vector< uint32_t > _vhashFEDs
 
ContainerXXX< uint32_t > _xQuality
 
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcdhcalChannelQualityToken_
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbServiceToken_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
int _maxLS
 
ModuleType _mtype
 
std::string _name
 
ProcessingType _ptype
 
std::string _runkeyName
 
int _runkeyVal
 
std::string _subsystem
 

Additional Inherited Members

- Static Public Member Functions inherited from hcaldqm::DQModule
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Detailed Description

Definition at line 23 of file DQClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 26 of file DQClient.h.

◆ MonitorElement

Definition at line 25 of file DQClient.h.

Constructor & Destructor Documentation

◆ DQClient()

hcaldqm::DQClient::DQClient ( std::string const &  name,
std::string const &  taskname,
edm::ParameterSet const &  ps,
edm::ConsumesCollector iC 
)

Definition at line 5 of file DQClient.cc.

References hcaldqm::DQModule::_name, and Skims_PA_cff::name.

9  : DQModule(ps),
10  _taskname(taskname),
11  _totalLS(0),
12  _maxProcessedLS(0),
17  edm::ESInputTag("", "withTopo"))) {
18  // - SET THE TASK NAME YOU REFER TO
19  // - SET THE CLIENT'S NAME AS WELL - RUN SUMMARY PLOTS
20  // WILL BE GENERATED UNDER THAT FOLDER
21  _name = name;
22  }
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: DQClient.h:59
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQClient.h:58
std::string _taskname
Definition: DQClient.h:50
std::string _name
Definition: DQModule.h:42
DQModule(edm::ParameterSet const &)
Definition: DQModule.cc:5
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: DQClient.h:57

◆ ~DQClient()

hcaldqm::DQClient::~DQClient ( )
inlineoverride

Definition at line 29 of file DQClient.h.

29 {}

Member Function Documentation

◆ beginLuminosityBlock()

void hcaldqm::DQClient::beginLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
virtual

Definition at line 84 of file DQClient.cc.

References _xQuality, HcalGenericDetId::genericSubdet(), HcalCondObjectContainer< Item >::getAllChannels(), edm::EventSetup::getData(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalChannelQualityToken_, HcalGenericDetId::HcalGenUnknown, HcalGenericDetId::isHcalDetId(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, hcaldqm::ContainerXXX< STDTYPE >::push(), and hcaldqm::ContainerXXX< STDTYPE >::reset().

87  {
88  // get the Channel Quality masks
89  _xQuality.reset();
90  const HcalChannelQuality *cq = &es.getData(hcalChannelQualityToken_);
91  std::vector<DetId> detids = cq->getAllChannels();
92  for (std::vector<DetId>::const_iterator it = detids.begin(); it != detids.end(); ++it) {
94  continue;
95 
96  if (HcalGenericDetId(*it).isHcalDetId()) {
97  HcalDetId did(*it);
98  uint32_t mask = (cq->getValues(did))->getValue();
99  if (mask != 0)
100  _xQuality.push(did, mask);
101  }
102  }
103  }
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: DQClient.h:59
virtual void push(HcalDetId const &, STDTYPE)
Definition: ContainerXXX.h:228
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:71
virtual void reset()
Definition: ContainerXXX.h:293
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool isHcalDetId() const
std::vector< DetId > getAllChannels() const
HcalGenericSubdetector genericSubdet() const
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found

◆ beginRun()

void hcaldqm::DQClient::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented in hcaldqm::DigiRunSummary, hcaldqm::PedestalRunSummary, hcaldqm::RawRunSummary, hcaldqm::RecoRunSummary, and hcaldqm::TPRunSummary.

Definition at line 24 of file DQClient.cc.

References _emap, hcaldqm::DQModule::_ptype, _vcdaqEids, _vCrates, _vFEDs, _vhashCrates, _vhashFEDs, _xQuality, createIOVlist::dbs, hcaldqm::hashfunctions::fDChannel, hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MAX, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::fOffline, hcaldqm::utilities::getCrateHashMap(), hcaldqm::utilities::getCrateList(), edm::EventSetup::getData(), hcaldqm::utilities::getFEDList(), edm::EventSetup::getHandle(), hcalDbServiceToken_, hcaldqm::ContainerXXX< STDTYPE >::initialize(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, FEDNumbering::MAXHCALuTCAFEDID, nano_mu_digi_cff::rawId, HcalElectronicsId::rawId(), submitPVValidationJobs::runInfo, runInfoToken_, hcaldqm::constants::SLOT_uTCA_MIN, hcaldqm::constants::SPIGOT_MIN, and edm::EventSetup::tryToGet().

Referenced by hcaldqm::PedestalRunSummary::beginRun(), hcaldqm::TPRunSummary::beginRun(), hcaldqm::RecoRunSummary::beginRun(), hcaldqm::RawRunSummary::beginRun(), and hcaldqm::DigiRunSummary::beginRun().

24  {
25  // TEMPORARY
26  _vhashFEDs.clear();
27  _vcdaqEids.clear();
28  _vhashCrates.clear();
29 
30  // get various FED lists
32  _emap = dbs->getHcalMapping();
33 
34  if (_ptype != fOffline) { // hidefed2crate
36  for (std::vector<int>::const_iterator it = _vFEDs.begin(); it != _vFEDs.end(); ++it) {
37  //
38  // FIXME
39  // until there exists a map of FED2Crate and Crate2FED,
40  // all the unknown Crates will be mapped to 0...
41  //
42  if (*it == 0) {
44  continue;
45  }
46 
47  if (*it > FED_VME_MAX) {
48  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
49  _vhashFEDs.push_back(
50  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
51  } else
53  }
54 
55  // get FEDs registered @cDAQ
56  if (auto runInfoRec = es.tryToGet<RunInfoRcd>()) {
57  const RunInfo &runInfo = es.getData(runInfoToken_);
58  std::vector<int> vfeds = runInfo.m_fed_in;
59  for (std::vector<int>::const_iterator it = vfeds.begin(); it != vfeds.end(); ++it) {
60  if (*it >= constants::FED_VME_MIN && *it <= FED_VME_MAX)
61  _vcdaqEids.push_back(
63  .rawId());
65  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
66  _vcdaqEids.push_back(
67  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
68  }
69  }
70  }
71  } else {
73  std::map<int, uint32_t> crateHashMap = utilities::getCrateHashMap(_emap);
74  for (auto &it_crate : _vCrates) {
75  _vhashCrates.push_back(crateHashMap[it_crate]);
76  }
77  }
78 
79  // Initialize channel quality masks, but do not load (changed for 10_4_X,
80  // moving to LS granularity)
82  }
std::vector< uint32_t > _vcdaqEids
Definition: DQClient.h:74
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
dbs
Find files in dataset.
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:68
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQClient.h:58
int const SPIGOT_MIN
Definition: Constants.h:124
HcalElectronicsMap const * _emap
Definition: DQClient.h:60
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:71
int const FIBER_VME_MIN
Definition: Constants.h:129
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:64
int const FED_uTCA_MIN
Definition: Constants.h:91
int const FIBERCH_MIN
Definition: Constants.h:138
std::vector< int > _vCrates
Definition: DQClient.h:63
ProcessingType _ptype
Definition: DQModule.h:44
int const FED_VME_MIN
Definition: Constants.h:86
int const FIBER_uTCA_MIN1
Definition: Constants.h:132
std::map< int, uint32_t > getCrateHashMap(HcalElectronicsMap const *emap)
Definition: Utilities.cc:80
std::vector< int > getCrateList(HcalElectronicsMap const *emap)
Definition: Utilities.cc:66
std::vector< int > _vFEDs
Definition: DQClient.h:67
constexpr uint32_t rawId() const
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:97
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:82
int const FED_VME_MAX
Definition: Constants.h:87
Readout chain identification for Hcal.
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: DQClient.h:57
int const SLOT_uTCA_MIN
Definition: Constants.h:111

◆ endJob()

std::vector< flag::Flag > hcaldqm::DQClient::endJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
virtual

Reimplemented in hcaldqm::DigiRunSummary, hcaldqm::PedestalRunSummary, hcaldqm::RawRunSummary, hcaldqm::RecoRunSummary, and hcaldqm::TPRunSummary.

Definition at line 115 of file DQClient.cc.

115  {
116  return std::vector<flag::Flag>();
117  }

◆ endLuminosityBlock()

void hcaldqm::DQClient::endLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &   
)
virtual

Member Data Documentation

◆ _emap

HcalElectronicsMap const* hcaldqm::DQClient::_emap
protected

◆ _maxProcessedLS

int hcaldqm::DQClient::_maxProcessedLS
protected

◆ _taskname

std::string hcaldqm::DQClient::_taskname
protected

◆ _totalLS

int hcaldqm::DQClient::_totalLS
protected

Definition at line 53 of file DQClient.h.

Referenced by endLuminosityBlock().

◆ _vcdaqEids

std::vector<uint32_t> hcaldqm::DQClient::_vcdaqEids
protected

Definition at line 74 of file DQClient.h.

Referenced by beginRun(), and hcaldqm::RawRunSummary::endLuminosityBlock().

◆ _vCrates

std::vector<int> hcaldqm::DQClient::_vCrates
protected

Definition at line 63 of file DQClient.h.

Referenced by beginRun().

◆ _vFEDs

std::vector<int> hcaldqm::DQClient::_vFEDs
protected

Definition at line 67 of file DQClient.h.

Referenced by beginRun(), and hcaldqm::RawRunSummary::endJob().

◆ _vhashCrates

std::vector<uint32_t> hcaldqm::DQClient::_vhashCrates
protected

◆ _vhashFEDs

std::vector<uint32_t> hcaldqm::DQClient::_vhashFEDs
protected

◆ _xQuality

ContainerXXX<uint32_t> hcaldqm::DQClient::_xQuality
protected

Definition at line 71 of file DQClient.h.

Referenced by beginLuminosityBlock(), and beginRun().

◆ hcalChannelQualityToken_

edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> hcaldqm::DQClient::hcalChannelQualityToken_
protected

Definition at line 59 of file DQClient.h.

Referenced by beginLuminosityBlock().

◆ hcalDbServiceToken_

edm::ESGetToken<HcalDbService, HcalDbRecord> hcaldqm::DQClient::hcalDbServiceToken_
protected

Definition at line 57 of file DQClient.h.

Referenced by beginRun().

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> hcaldqm::DQClient::runInfoToken_
protected

Definition at line 58 of file DQClient.h.

Referenced by beginRun().