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 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 25 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 6 of file DQClient.cc.

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

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

Definition at line 30 of file DQClient.h.

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

30 {}

Member Function Documentation

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 16 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, edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), hcaldqm::fOffline, HcalGenericDetId::genericSubdet(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), hcaldqm::utilities::getCrateHashMap(), hcaldqm::utilities::getCrateList(), hcaldqm::utilities::getFEDList(), HcalDbService::getHcalMapping(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), HcalGenericDetId::HcalGenUnknown, hcaldqm::ContainerXXX< STDTYPE >::initialize(), HcalGenericDetId::isHcalDetId(), RunInfo::m_fed_in, RecoTauDiscriminantConfiguration::mask, FEDNumbering::MAXHCALuTCAFEDID, edm::ESHandle< T >::product(), hcaldqm::ContainerXXX< STDTYPE >::push(), HcalElectronicsId::rawId(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

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

18  {
19  // TEMPORARY
20  _vhashFEDs.clear(); _vcdaqEids.clear();
21 
22  // get various FED lists
24  es.get<HcalDbRecord>().get(dbs);
25  _emap = dbs->getHcalMapping();
26 
27  if (_ptype != fOffline) { // hidefed2crate
29  for (std::vector<int>::const_iterator it=_vFEDs.begin();
30  it!=_vFEDs.end(); ++it)
31  {
32  //
33  // FIXME
34  // until there exists a map of FED2Crate and Crate2FED,
35  // all the unknown Crates will be mapped to 0...
36  //
37  if (*it==0)
38  {
39  _vhashFEDs.push_back(HcalElectronicsId(
41  FIBERCH_MIN, false).rawId());
42  continue;
43  }
44 
45  if (*it>FED_VME_MAX)
46  {
47  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
48  _vhashFEDs.push_back(HcalElectronicsId(
49  cspair.first, cspair.second, FIBER_uTCA_MIN1,
50  FIBERCH_MIN, false).rawId());
51  }
52  else
54  FIBER_VME_MIN, SPIGOT_MIN, (*it)-FED_VME_MIN).rawId());
55  }
56 
57  // get FEDs registered @cDAQ
60  "RunInfoRcd"));
61  if (es.find(recordKey))
62  {
64  es.get<RunInfoRcd>().get(ri);
65  std::vector<int> vfeds=ri->m_fed_in;
66  for (std::vector<int>::const_iterator it=vfeds.begin();
67  it!=vfeds.end(); ++it)
68  {
69  if (*it>=constants::FED_VME_MIN && *it<=FED_VME_MAX)
70  _vcdaqEids.push_back(HcalElectronicsId(
73  (*it)-FED_VME_MIN).rawId());
74  else if (*it>=constants::FED_uTCA_MIN &&
76  {
77  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
78  _vcdaqEids.push_back(HcalElectronicsId(
79  cspair.first, cspair.second,
80  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
81  }
82  }
83  }
84  } else {
86  std::map<int, uint32_t> crateHashMap = utilities::getCrateHashMap(_emap);
87  for (auto& it_crate : _vCrates) {
88  _vhashCrates.push_back(crateHashMap[it_crate]);
89  }
90  }
91 
92  // get the Channel Quality masks
95  es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
96  const HcalChannelQuality *cq = hcq.product();
97  std::vector<DetId> detids = cq->getAllChannels();
98  for (std::vector<DetId>::const_iterator it=detids.begin();
99  it!=detids.end(); ++it)
100  {
101  if (HcalGenericDetId(*it).genericSubdet()==
103  continue;
104 
105  if (HcalGenericDetId(*it).isHcalDetId())
106  {
107  HcalDetId did(*it);
108  uint32_t mask=(cq->getValues(did))->getValue();
109  if (mask!=0)
110  _xQuality.push(did, mask);
111  }
112  }
113  }
std::vector< uint32_t > _vcdaqEids
Definition: DQClient.h:68
constexpr uint32_t rawId() const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:12
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:62
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
int const SPIGOT_MIN
Definition: Constants.h:136
virtual void push(HcalDetId const &, STDTYPE)
Definition: ContainerXXX.h:283
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
ContainerXXX< uint32_t > _xQuality
Definition: DQClient.h:65
const Item * getValues(DetId fId, bool throwOnFail=true) const
int const FIBER_VME_MIN
Definition: Constants.h:141
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:58
int const FED_uTCA_MIN
Definition: Constants.h:103
int const FIBERCH_MIN
Definition: Constants.h:151
std::vector< int > _vCrates
Definition: DQClient.h:57
ProcessingType _ptype
Definition: DQModule.h:59
int const FED_VME_MIN
Definition: Constants.h:98
std::vector< DetId > getAllChannels() const
std::vector< int > m_fed_in
Definition: RunInfo.h:26
int const FIBER_uTCA_MIN1
Definition: Constants.h:144
std::map< int, uint32_t > getCrateHashMap(HcalElectronicsMap const *emap)
Definition: Utilities.cc:77
bool isHcalDetId() const
std::vector< int > getCrateList(HcalElectronicsMap const *emap)
Definition: Utilities.cc:63
std::vector< int > _vFEDs
Definition: DQClient.h:61
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:95
const HcalElectronicsMap * getHcalMapping() const
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:89
HcalGenericSubdetector genericSubdet() const
int const FED_VME_MAX
Definition: Constants.h:99
T const * product() const
Definition: ESHandle.h:86
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:123
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 125 of file DQClient.cc.

Referenced by ~DQClient().

127  {
128  return std::vector<flag::Flag>();
129  }
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 50 of file DQClient.h.

Referenced by endLuminosityBlock().

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

Definition at line 68 of file DQClient.h.

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

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

Definition at line 57 of file DQClient.h.

Referenced by beginRun().

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

Definition at line 61 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 65 of file DQClient.h.

Referenced by beginRun().