CMS 3D CMS Logo

List of all members | Classes | 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 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 &)
 
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 ()(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
 
- 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
 

Detailed Description

Definition at line 23 of file DQClient.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file DQClient.cc.

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

6  : DQModule(ps), _taskname(taskname), _maxProcessedLS(0) {
7  // - SET THE TASK NAME YOU REFER TO
8  // - SET THE CLIENT'S NAME AS WELL - RUN SUMMARY PLOTS
9  // WILL BE GENERATED UNDER THAT FOLDER
10  _name = name;
11  }
std::string _taskname
Definition: DQClient.h:46
std::string _name
Definition: DQModule.h:41
DQModule(edm::ParameterSet const &)
Definition: DQModule.cc:5
hcaldqm::DQClient::~DQClient ( )
inlineoverride

Definition at line 26 of file DQClient.h.

References beginLuminosityBlock(), beginRun(), endJob(), and endLuminosityBlock().

26 {}

Member Function Documentation

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

Definition at line 75 of file DQClient.cc.

References _xQuality, HcalGenericDetId::genericSubdet(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), HcalGenericDetId::HcalGenUnknown, HcalGenericDetId::isHcalDetId(), RecoTauDiscriminantConfiguration::mask, edm::ESHandle< T >::product(), hcaldqm::ContainerXXX< STDTYPE >::push(), and hcaldqm::ContainerXXX< STDTYPE >::reset().

Referenced by ~DQClient().

78  {
79  // get the Channel Quality masks
80  _xQuality.reset();
82  es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
83  const HcalChannelQuality *cq = hcq.product();
84  std::vector<DetId> detids = cq->getAllChannels();
85  for (std::vector<DetId>::const_iterator it = detids.begin(); it != detids.end(); ++it) {
87  continue;
88 
89  if (HcalGenericDetId(*it).isHcalDetId()) {
90  HcalDetId did(*it);
91  uint32_t mask = (cq->getValues(did))->getValue();
92  if (mask != 0)
93  _xQuality.push(did, mask);
94  }
95  }
96  }
virtual void push(HcalDetId const &, STDTYPE)
Definition: ContainerXXX.h:227
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:64
const Item * getValues(DetId fId, bool throwOnFail=true) const
virtual void reset()
Definition: ContainerXXX.h:292
std::vector< DetId > getAllChannels() const
bool isHcalDetId() const
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
HcalGenericSubdetector genericSubdet() const
T const * product() const
Definition: ESHandle.h:86
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 13 of file DQClient.cc.

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, edm::EventSetup::get(), hcaldqm::utilities::getCrateHashMap(), hcaldqm::utilities::getCrateList(), hcaldqm::utilities::getFEDList(), HcalDbService::getHcalMapping(), hcaldqm::ContainerXXX< STDTYPE >::initialize(), RunInfo::m_fed_in, FEDNumbering::MAXHCALuTCAFEDID, HcalElectronicsId::rawId(), hcaldqm::constants::SLOT_uTCA_MIN, hcaldqm::constants::SPIGOT_MIN, and edm::EventSetup::tryToGet().

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

13  {
14  // TEMPORARY
15  _vhashFEDs.clear();
16  _vcdaqEids.clear();
17  _vhashCrates.clear();
18 
19  // get various FED lists
21  es.get<HcalDbRecord>().get(dbs);
22  _emap = dbs->getHcalMapping();
23 
24  if (_ptype != fOffline) { // hidefed2crate
26  for (std::vector<int>::const_iterator it = _vFEDs.begin(); it != _vFEDs.end(); ++it) {
27  //
28  // FIXME
29  // until there exists a map of FED2Crate and Crate2FED,
30  // all the unknown Crates will be mapped to 0...
31  //
32  if (*it == 0) {
34  continue;
35  }
36 
37  if (*it > FED_VME_MAX) {
38  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
39  _vhashFEDs.push_back(
40  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
41  } else
43  }
44 
45  // get FEDs registered @cDAQ
46  if (auto runInfoRec = es.tryToGet<RunInfoRcd>()) {
48  runInfoRec->get(ri);
49  std::vector<int> vfeds = ri->m_fed_in;
50  for (std::vector<int>::const_iterator it = vfeds.begin(); it != vfeds.end(); ++it) {
51  if (*it >= constants::FED_VME_MIN && *it <= FED_VME_MAX)
52  _vcdaqEids.push_back(
54  .rawId());
55  else if (*it >= constants::FED_uTCA_MIN && *it <= FEDNumbering::MAXHCALuTCAFEDID) {
56  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
57  _vcdaqEids.push_back(
58  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
59  }
60  }
61  }
62  } else {
64  std::map<int, uint32_t> crateHashMap = utilities::getCrateHashMap(_emap);
65  for (auto &it_crate : _vCrates) {
66  _vhashCrates.push_back(crateHashMap[it_crate]);
67  }
68  }
69 
70  // Initialize channel quality masks, but do not load (changed for 10_4_X,
71  // moving to LS granularity)
73  }
std::vector< uint32_t > _vcdaqEids
Definition: DQClient.h:67
constexpr uint32_t rawId() const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:61
int const SPIGOT_MIN
Definition: Constants.h:116
HcalElectronicsMap const * _emap
Definition: DQClient.h:53
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:64
int const FIBER_VME_MIN
Definition: Constants.h:121
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:57
int const FED_uTCA_MIN
Definition: Constants.h:83
int const FIBERCH_MIN
Definition: Constants.h:130
std::vector< int > _vCrates
Definition: DQClient.h:56
ProcessingType _ptype
Definition: DQModule.h:43
int const FED_VME_MIN
Definition: Constants.h:78
std::vector< int > m_fed_in
Definition: RunInfo.h:26
int const FIBER_uTCA_MIN1
Definition: Constants.h:124
std::map< int, uint32_t > getCrateHashMap(HcalElectronicsMap const *emap)
Definition: Utilities.cc:66
std::vector< int > getCrateList(HcalElectronicsMap const *emap)
Definition: Utilities.cc:52
std::vector< int > _vFEDs
Definition: DQClient.h:60
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:83
const HcalElectronicsMap * getHcalMapping() const
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:81
int const FED_VME_MAX
Definition: Constants.h:79
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:103
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 108 of file DQClient.cc.

Referenced by ~DQClient().

108  {
109  return std::vector<flag::Flag>();
110  }
void hcaldqm::DQClient::endLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &   
)
virtual

Member Data Documentation

HcalElectronicsMap const* hcaldqm::DQClient::_emap
protected
int hcaldqm::DQClient::_maxProcessedLS
protected
std::string hcaldqm::DQClient::_taskname
protected
int hcaldqm::DQClient::_totalLS
protected

Definition at line 49 of file DQClient.h.

Referenced by endLuminosityBlock().

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

Definition at line 67 of file DQClient.h.

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

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

Definition at line 56 of file DQClient.h.

Referenced by beginRun().

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

Definition at line 60 of file DQClient.h.

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

std::vector<uint32_t> hcaldqm::DQClient::_vhashCrates
protected
std::vector<uint32_t> hcaldqm::DQClient::_vhashFEDs
protected
ContainerXXX<uint32_t> hcaldqm::DQClient::_xQuality
protected

Definition at line 64 of file DQClient.h.

Referenced by beginLuminosityBlock(), and beginRun().