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

const HcalElectronicsMap_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.

9  : DQModule(ps),
10  _taskname(taskname),
11  _maxProcessedLS(0),
16  edm::ESInputTag("", "withTopo"))) {
17  // - SET THE TASK NAME YOU REFER TO
18  // - SET THE CLIENT'S NAME AS WELL - RUN SUMMARY PLOTS
19  // WILL BE GENERATED UNDER THAT FOLDER
20  _name = name;
21  }

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

◆ ~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 83 of file DQClient.cc.

86  {
87  // get the Channel Quality masks
88  _xQuality.reset();
89  const HcalChannelQuality *cq = &es.getData(hcalChannelQualityToken_);
90  std::vector<DetId> detids = cq->getAllChannels();
91  for (std::vector<DetId>::const_iterator it = detids.begin(); it != detids.end(); ++it) {
93  continue;
94 
95  if (HcalGenericDetId(*it).isHcalDetId()) {
96  HcalDetId did(*it);
97  uint32_t mask = (cq->getValues(did))->getValue();
98  if (mask != 0)
99  _xQuality.push(did, mask);
100  }
101  }
102  }

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

◆ 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 23 of file DQClient.cc.

23  {
24  // TEMPORARY
25  _vhashFEDs.clear();
26  _vcdaqEids.clear();
27  _vhashCrates.clear();
28 
29  // get various FED lists
31  _emap = dbs->getHcalMapping();
32 
33  if (_ptype != fOffline) { // hidefed2crate
35  for (std::vector<int>::const_iterator it = _vFEDs.begin(); it != _vFEDs.end(); ++it) {
36  //
37  // FIXME
38  // until there exists a map of FED2Crate and Crate2FED,
39  // all the unknown Crates will be mapped to 0...
40  //
41  if (*it == 0) {
43  continue;
44  }
45 
46  if (*it > FED_VME_MAX) {
47  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
48  _vhashFEDs.push_back(
49  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
50  } else
52  }
53 
54  // get FEDs registered @cDAQ
55  if (auto runInfoRec = es.tryToGet<RunInfoRcd>()) {
56  const RunInfo &runInfo = es.getData(runInfoToken_);
57  std::vector<int> vfeds = runInfo.m_fed_in;
58  for (std::vector<int>::const_iterator it = vfeds.begin(); it != vfeds.end(); ++it) {
59  if (*it >= constants::FED_VME_MIN && *it <= FED_VME_MAX)
60  _vcdaqEids.push_back(
62  .rawId());
63  else if (*it >= constants::FED_uTCA_MIN && *it <= FEDNumbering::MAXHCALuTCAFEDID) {
64  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
65  _vcdaqEids.push_back(
66  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
67  }
68  }
69  }
70  } else {
72  std::map<int, uint32_t> crateHashMap = utilities::getCrateHashMap(_emap);
73  for (auto &it_crate : _vCrates) {
74  _vhashCrates.push_back(crateHashMap[it_crate]);
75  }
76  }
77 
78  // Initialize channel quality masks, but do not load (changed for 10_4_X,
79  // moving to LS granularity)
81  }

References _emap, hcaldqm::DQModule::_ptype, _vcdaqEids, _vCrates, _vFEDs, _vhashCrates, _vhashFEDs, _xQuality, 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(), HcalDbService::getHcalMapping(), hcalDbServiceToken_, hcaldqm::ContainerXXX< STDTYPE >::initialize(), FEDNumbering::MAXHCALuTCAFEDID, 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().

◆ 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 114 of file DQClient.cc.

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

◆ endLuminosityBlock()

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

Member Data Documentation

◆ _emap

const HcalElectronicsMap* 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().

hcaldqm::constants::FED_VME_MIN
const int FED_VME_MIN
Definition: Constants.h:82
hcaldqm::DQClient::_vcdaqEids
std::vector< uint32_t > _vcdaqEids
Definition: DQClient.h:74
hcaldqm::ContainerXXX::initialize
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:81
hcaldqm::DQClient::_xQuality
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:71
hcaldqm::utilities::getCrateHashMap
std::map< int, uint32_t > getCrateHashMap(HcalElectronicsMap const *emap)
Definition: Utilities.cc:80
edm::ESInputTag
Definition: ESInputTag.h:87
HcalGenericDetId
Definition: HcalGenericDetId.h:15
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
hcaldqm::DQClient::_vhashFEDs
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:68
hcaldqm::constants::SPIGOT_MIN
const int SPIGOT_MIN
Definition: Constants.h:120
hcaldqm::utilities::getCrateList
std::vector< int > getCrateList(HcalElectronicsMap const *emap)
Definition: Utilities.cc:66
hcaldqm::constants::SLOT_uTCA_MIN
const int SLOT_uTCA_MIN
Definition: Constants.h:107
hcaldqm::constants::FIBER_uTCA_MIN1
const int FIBER_uTCA_MIN1
Definition: Constants.h:128
FEDNumbering::MAXHCALuTCAFEDID
Definition: FEDNumbering.h:104
HcalChannelQuality
Definition: HcalChannelQuality.h:17
hcaldqm::DQModule::_ptype
ProcessingType _ptype
Definition: DQModule.h:44
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
hcaldqm::DQClient::_vFEDs
std::vector< int > _vFEDs
Definition: DQClient.h:67
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
hcaldqm::utilities::getFEDList
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:97
HcalDbService::getHcalMapping
const HcalElectronicsMap * getHcalMapping() const
Definition: HcalDbService.cc:343
hcaldqm::DQClient::hcalChannelQualityToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: DQClient.h:59
RunInfo
Definition: RunInfo.h:18
hcaldqm::DQClient::_taskname
std::string _taskname
Definition: DQClient.h:50
hcaldqm::DQClient::_totalLS
int _totalLS
Definition: DQClient.h:53
hcaldqm::DQModule::_currentLS
int _currentLS
Definition: DQModule.h:53
hcaldqm::ContainerXXX::push
virtual void push(HcalDetId const &, STDTYPE)
Definition: ContainerXXX.h:227
HcalGenericDetId::HcalGenUnknown
Definition: HcalGenericDetId.h:27
hcaldqm::ContainerXXX::reset
virtual void reset()
Definition: ContainerXXX.h:292
hcaldqm::constants::FIBER_VME_MIN
const int FIBER_VME_MIN
Definition: Constants.h:125
edm::ESHandle< HcalDbService >
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
hcaldqm::DQModule::_name
std::string _name
Definition: DQModule.h:42
hcaldqm::constants::FIBERCH_MIN
const int FIBERCH_MIN
Definition: Constants.h:134
edm::Transition::BeginLuminosityBlock
hcaldqm::DQClient::_maxProcessedLS
int _maxProcessedLS
Definition: DQClient.h:54
RunInfoRcd
Definition: RunSummaryRcd.h:26
hcaldqm::hashfunctions::fDChannel
Definition: HashFunctions.h:143
hcaldqm::constants::FED_uTCA_MIN
const int FED_uTCA_MIN
Definition: Constants.h:87
hcaldqm::DQClient::hcalDbServiceToken_
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: DQClient.h:57
HcalCondObjectContainer::getAllChannels
std::vector< DetId > getAllChannels() const
Definition: HcalCondObjectContainer.h:312
reco::JetExtendedAssociation::getValue
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Definition: JetExtendedAssociation.cc:50
hcaldqm::constants::FED_VME_MAX
const int FED_VME_MAX
Definition: Constants.h:83
HcalDetId
Definition: HcalDetId.h:12
hcaldqm::DQClient::_vhashCrates
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:64
HcalDbService
Definition: HcalDbService.h:23
HcalGenericDetId::isHcalDetId
bool isHcalDetId() const
Definition: HcalGenericDetId.cc:64
hcaldqm::DQModule::DQModule
DQModule(edm::ParameterSet const &)
Definition: DQModule.cc:5
hcaldqm::DQClient::_emap
const HcalElectronicsMap * _emap
Definition: DQClient.h:60
HcalGenericDetId::genericSubdet
HcalGenericSubdetector genericSubdet() const
Definition: HcalGenericDetId.cc:21
edm::Transition::BeginRun
HcalElectronicsId::rawId
constexpr uint32_t rawId() const
Definition: HcalElectronicsId.h:59
hcaldqm::utilities::fed2crate
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
HcalDbRecord
Definition: HcalDbRecord.h:30
hcaldqm::DQClient::runInfoToken_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQClient.h:58
hcaldqm::DQClient::_vCrates
std::vector< int > _vCrates
Definition: DQClient.h:63
hcaldqm::fOffline
Definition: DQModule.h:26