CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
hcaldqm::DQTask Class Referenceabstract

#include <DQTask.h>

Inheritance diagram for hcaldqm::DQTask:
DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > > hcaldqm::DQModule edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper DigiTask HcalGPUComparisonTask HcalMLTask HFRaddamTask LaserTask LEDTask NoCQTask PedestalTask PFHcalGPUComparisonTask QIE10Task QIE11Task RawTask RecHitTask TPTask UMNioTask

Public Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQTask (edm::ParameterSet const &)
 
std::shared_ptr< hcaldqm::CacheglobalBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const override
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ~DQTask () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule () noexcept(false)
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &des)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from hcaldqm::DQModule
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 

Protected Member Functions

virtual int _getCalibType (edm::Event const &)
 
virtual bool _isApplicable (edm::Event const &)
 
virtual void _process (edm::Event const &, edm::EventSetup const &)=0
 
virtual void _resetMonitors (UpdateFreq)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Protected Attributes

ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
edm::ESHandle< HcalDbService_dbService
 
HcalElectronicsMap const * _emap = nullptr
 
int _procLSs
 
edm::InputTag _tagRaw
 
edm::EDGetTokenT< FEDRawDataCollection_tokRaw
 
std::vector< uint32_t > _vcdaqEids
 
ContainerXXX< uint32_t > _xQuality
 
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcdhcalChannelQualityToken_
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbServiceToken_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
edm::EDPutTokenT< DQMTokenrunToken_
 
- 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

- Public Types inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Detailed Description

Definition at line 33 of file DQTask.h.

Constructor & Destructor Documentation

◆ DQTask()

hcaldqm::DQTask::DQTask ( edm::ParameterSet const &  ps)

Definition at line 8 of file DQTask.cc.

References _tagRaw, _tokRaw, edm::ParameterSet::getUntrackedParameter(), and ProducerED_cfi::InputTag.

9  : DQModule(ps),
10  _cEvsTotal(_name, "EventsTotal"),
11  _cEvsPerLS(_name, "EventsPerLS"),
12  _cRunKeyVal(_name, "RunKeyValue"),
13  _cRunKeyName(_name, "RunKeyName"),
14  _cProcessingTypeName(_name, "ProcessingType"),
15  _procLSs(0),
16  hcalDbServiceToken_(esConsumes<HcalDbService, HcalDbRecord, edm::Transition::BeginRun>()),
17  runInfoToken_(esConsumes<RunInfo, RunInfoRcd, edm::Transition::BeginRun>()),
19  esConsumes<HcalChannelQuality, HcalChannelQualityRcd, edm::Transition::BeginLuminosityBlock>(
20  edm::ESInputTag("", "withTopo"))) {
21  // tags and Tokens
22  _tagRaw = ps.getUntrackedParameter<edm::InputTag>("tagRaw", edm::InputTag("rawDataCollector"));
23  _tokRaw = consumes<FEDRawDataCollection>(_tagRaw);
24  }
ContainerI _cEvsTotal
Definition: DQTask.h:56
ContainerS _cRunKeyName
Definition: DQTask.h:59
edm::InputTag _tagRaw
Definition: DQTask.h:72
edm::EDGetTokenT< FEDRawDataCollection > _tokRaw
Definition: DQTask.h:73
ContainerI _cEvsPerLS
Definition: DQTask.h:57
int _procLSs
Definition: DQTask.h:63
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQTask.h:77
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: DQTask.h:76
std::string _name
Definition: DQModule.h:42
ContainerS _cProcessingTypeName
Definition: DQTask.h:60
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: DQTask.h:78
ContainerI _cRunKeyVal
Definition: DQTask.h:58
DQModule(edm::ParameterSet const &)
Definition: DQModule.cc:5

◆ ~DQTask()

hcaldqm::DQTask::~DQTask ( )
inlineoverride

Definition at line 37 of file DQTask.h.

37 {}

Member Function Documentation

◆ _getCalibType()

int hcaldqm::DQTask::_getCalibType ( edm::Event const &  e)
protectedvirtual

Definition at line 160 of file DQTask.cc.

References hcaldqm::DQModule::_logger, _tagRaw, _tokRaw, Logger::dqmthrow(), MillePedeFileConverter_cfg::e, ztee::fd, hcaldqm::constants::FED_uTCA_MAX, hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MAX, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FED_VME_NUM, FEDRawDataCollection::FEDData(), mps_fire::i, edm::InputTag::instance(), createfilelist::int, edm::InputTag::label(), SiStripPI::max, to_string(), and Logger::warn().

160  {
161  int calibType = 0;
162 
164  if (!e.getByToken(_tokRaw, craw))
165  _logger.dqmthrow("Collection FEDRawDataCollection isn't available " + _tagRaw.label() + " " + _tagRaw.instance());
166 
167  int badFEDs = 0;
168  std::vector<int> types(8, 0);
169  for (int i = FED_VME_MIN; i <= FED_VME_MAX; i++) {
170  FEDRawData const &fd = craw->FEDData(i);
171  if (fd.size() < 24) {
172  badFEDs++;
173  continue;
174  }
175  int cval = (int)((HcalDCCHeader const *)(fd.data()))->getCalibType();
176  if (cval > 7)
177  _logger.warn("Unexpected Calib Type in FED " + std::to_string(i));
178  types[cval]++;
179  }
180  for (int i = FED_uTCA_MIN; i <= FED_uTCA_MAX; i++) {
181  FEDRawData const &fd = craw->FEDData(i);
182  if (fd.size() < 24) {
183  badFEDs++;
184  continue;
185  }
186  int cval = (int)((HcalDCCHeader const *)(fd.data()))->getCalibType();
187  if (cval > 7)
188  _logger.warn("Unexpected Calib Type in FED " + std::to_string(i));
189  types[cval]++;
190  }
191 
192  int max = 0;
193  for (unsigned int ic = 0; ic < 8; ic++) {
194  if (types[ic] > max) {
195  max = types[ic];
196  calibType = ic;
197  }
198  }
199  if (max != (FED_VME_NUM + (FED_uTCA_MAX - FED_uTCA_MIN + 1) - badFEDs))
200  _logger.warn("Conflicting Calibration Types found. Assigning " + std::to_string(calibType));
201 
202  return calibType;
203  }
edm::InputTag _tagRaw
Definition: DQTask.h:72
std::string const & instance() const
Definition: InputTag.h:37
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
edm::EDGetTokenT< FEDRawDataCollection > _tokRaw
Definition: DQTask.h:73
std::string const & label() const
Definition: InputTag.h:36
int const FED_uTCA_MIN
Definition: Constants.h:91
static std::string to_string(const XMLCh *ch)
int const FED_uTCA_MAX
Definition: Constants.h:93
int const FED_VME_MIN
Definition: Constants.h:86
void warn(std::string const &msg) const
Definition: Logger.h:13
Logger _logger
Definition: DQModule.h:55
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
int const FED_VME_NUM
Definition: Constants.h:89
int const FED_VME_MAX
Definition: Constants.h:87
fd
Definition: ztee.py:136

◆ _isApplicable()

virtual bool hcaldqm::DQTask::_isApplicable ( edm::Event const &  )
inlineprotectedvirtual

Reimplemented in LaserTask, LEDTask, PedestalTask, QIE11Task, and HFRaddamTask.

Definition at line 52 of file DQTask.h.

Referenced by analyze().

52 { return true; }

◆ _process()

virtual void hcaldqm::DQTask::_process ( edm::Event const &  ,
edm::EventSetup const &   
)
protectedpure virtual

◆ _resetMonitors()

void hcaldqm::DQTask::_resetMonitors ( UpdateFreq  uf)
protectedvirtual

Reimplemented in PFHcalGPUComparisonTask, HcalMLTask, LaserTask, DigiTask, LEDTask, RecHitTask, RawTask, PedestalTask, HcalGPUComparisonTask, TPTask, QIE11Task, QIE10Task, and NoCQTask.

Definition at line 141 of file DQTask.cc.

References hcaldqm::DQModule::_evsPerLS, hcaldqm::f100LS, hcaldqm::f10LS, hcaldqm::f1LS, hcaldqm::f50LS, and hcaldqm::fEvent.

Referenced by analyze(), and dqmBeginRun().

141  {
142  // reset per event
143  switch (uf) {
144  case fEvent:
145  break;
146  case f1LS:
147  _evsPerLS = 0;
148  break;
149  case f10LS:
150  break;
151  case f50LS:
152  break;
153  case f100LS:
154  break;
155  default:
156  break;
157  }
158  }

◆ analyze()

void hcaldqm::DQTask::analyze ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >.

Definition at line 37 of file DQTask.cc.

References _cEvsPerLS, _cEvsTotal, hcaldqm::DQModule::_evsPerLS, hcaldqm::DQModule::_evsTotal, _isApplicable(), hcaldqm::DQModule::_logger, hcaldqm::DQModule::_name, _process(), _resetMonitors(), Logger::debug(), MillePedeFileConverter_cfg::e, hcaldqm::fEvent, and hcaldqm::ContainerI::fill().

37  {
38  this->_resetMonitors(fEvent);
39  _logger.debug(_name + " processing");
40  if (!this->_isApplicable(e))
41  return;
42 
43  _evsTotal++;
45 
46  auto lumiCache = luminosityBlockCache(e.getLuminosityBlock().index());
47  lumiCache->EvtCntLS++;
48  _evsPerLS = lumiCache->EvtCntLS;
50 
51  this->_process(e, es);
52  }
ContainerI _cEvsTotal
Definition: DQTask.h:56
ContainerI _cEvsPerLS
Definition: DQTask.h:57
virtual bool _isApplicable(edm::Event const &)
Definition: DQTask.h:52
virtual void _process(edm::Event const &, edm::EventSetup const &)=0
void debug(STDTYPE const &msg) const
Definition: Logger.h:20
virtual void fill(int x)
Definition: ContainerI.h:19
Logger _logger
Definition: DQModule.h:55
std::string _name
Definition: DQModule.h:42
virtual void _resetMonitors(UpdateFreq)
Definition: DQTask.cc:141

◆ bookHistograms()

void hcaldqm::DQTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >.

Reimplemented in PFHcalGPUComparisonTask, HcalMLTask, DigiTask, RecHitTask, LaserTask, RawTask, UMNioTask, LEDTask, QIE10Task, QIE11Task, TPTask, HcalGPUComparisonTask, PedestalTask, HFRaddamTask, and NoCQTask.

Definition at line 54 of file DQTask.cc.

References _cEvsPerLS, _cEvsTotal, _cProcessingTypeName, _cRunKeyName, _cRunKeyVal, _dbService, _emap, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_runkeyName, hcaldqm::DQModule::_runkeyVal, hcaldqm::DQModule::_subsystem, _vcdaqEids, _xQuality, hcaldqm::ContainerI::book(), hcaldqm::ContainerS::book(), 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::ContainerI::fill(), hcaldqm::ContainerS::fill(), edm::EventSetup::getData(), edm::EventSetup::getHandle(), HcalDbService::getHcalMapping(), hcalDbServiceToken_, cuy::ib, hcaldqm::ContainerXXX< STDTYPE >::initialize(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, FEDNumbering::MAXHCALuTCAFEDID, hcaldqm::pTypeNames, nano_mu_digi_cff::rawId, HcalElectronicsId::rawId(), submitPVValidationJobs::runInfo, runInfoToken_, hcaldqm::constants::SPIGOT_MIN, and edm::EventSetup::tryToGet().

54  {
55  // initialize some containers to be used by all modules
57 
58  // get the run info FEDs - FEDs registered at cDAQ
59  // and determine if there are any HCAL FEDs in.
60  // push them as ElectronicsIds into the vector
61  if (auto runInfoRec = es.tryToGet<RunInfoRcd>()) {
62  const RunInfo &runInfo = es.getData(runInfoToken_);
63  std::vector<int> vfeds = runInfo.m_fed_in;
64  for (std::vector<int>::const_iterator it = vfeds.begin(); it != vfeds.end(); ++it) {
65  if (*it >= constants::FED_VME_MIN && *it <= FED_VME_MAX)
66  _vcdaqEids.push_back(
68  .rawId());
70  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
71  _vcdaqEids.push_back(
72  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
73  }
74  }
75  }
76 
77  // book some base guys
83 
84  // fill what you can now
88 
89  // Load conditions and emap
90  _dbService = es.getHandle(hcalDbServiceToken_);
92  }
ContainerI _cEvsTotal
Definition: DQTask.h:56
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
ContainerS _cRunKeyName
Definition: DQTask.h:59
ContainerI _cEvsPerLS
Definition: DQTask.h:57
int const SPIGOT_MIN
Definition: Constants.h:124
const HcalElectronicsMap * getHcalMapping() const
int const FIBER_VME_MIN
Definition: Constants.h:129
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQTask.h:77
int const FED_uTCA_MIN
Definition: Constants.h:91
int const FIBERCH_MIN
Definition: Constants.h:138
ProcessingType _ptype
Definition: DQModule.h:44
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: DQTask.h:76
virtual void fill(std::string const &x)
Definition: ContainerS.h:20
ContainerXXX< uint32_t > _xQuality
Definition: DQTask.h:66
int const FED_VME_MIN
Definition: Constants.h:86
virtual void book(DQMStore::IBooker &ib, std::string subsystem="Hcal", std::string aux="")
Definition: ContainerI.h:21
int const FIBER_uTCA_MIN1
Definition: Constants.h:132
virtual void fill(int x)
Definition: ContainerI.h:19
virtual void book(DQMStore::IBooker &ib, std::string subsystem="Hcal", std::string aux="")
Definition: ContainerS.h:22
HcalElectronicsMap const * _emap
Definition: DQTask.h:81
constexpr uint32_t rawId() const
edm::ESHandle< HcalDbService > _dbService
Definition: DQTask.h:80
std::string _subsystem
Definition: DQModule.h:49
std::string _runkeyName
Definition: DQModule.h:48
ContainerS _cProcessingTypeName
Definition: DQTask.h:60
std::vector< uint32_t > _vcdaqEids
Definition: DQTask.h:69
std::string const pTypeNames[nProcessingType]
Definition: DQModule.h:28
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:82
int const FED_VME_MAX
Definition: Constants.h:87
ContainerI _cRunKeyVal
Definition: DQTask.h:58
Readout chain identification for Hcal.
ib
Definition: cuy.py:661

◆ dqmBeginRun()

void hcaldqm::DQTask::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< hcaldqm::Cache > >.

Reimplemented in HcalMLTask.

Definition at line 94 of file DQTask.cc.

References _resetMonitors(), hcaldqm::f100LS, hcaldqm::f10LS, hcaldqm::f1LS, hcaldqm::f50LS, and hcaldqm::fEvent.

94  {
95  this->_resetMonitors(fEvent);
96  this->_resetMonitors(f1LS);
97  this->_resetMonitors(f10LS);
98  this->_resetMonitors(f50LS);
99  this->_resetMonitors(f100LS);
100  }
virtual void _resetMonitors(UpdateFreq)
Definition: DQTask.cc:141

◆ fillPSetDescription()

void hcaldqm::DQTask::fillPSetDescription ( edm::ParameterSetDescription des)
static

Definition at line 26 of file DQTask.cc.

References submitPVResolutionJobs::desc, hcaldqm::DQModule::fillPSetDescription(), and ProducerED_cfi::InputTag.

Referenced by QIE11Task::fillDescriptions().

26  {
27  //from class inheritance
29 
30  desc.addUntracked<edm::InputTag>("tagRaw", edm::InputTag("rawDataCollector"));
31  }
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: DQModule.cc:30

◆ globalBeginLuminosityBlock()

std::shared_ptr< hcaldqm::Cache > hcaldqm::DQTask::globalBeginLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
) const
override

Definition at line 102 of file DQTask.cc.

References ztail::d, hcaldqm::hashfunctions::fDChannel, HcalGenericDetId::genericSubdet(), HcalCondObjectContainer< Item >::getAllChannels(), edm::EventSetup::getData(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalChannelQualityToken_, HcalGenericDetId::HcalGenUnknown, HcalGenericDetId::isHcalDetId(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, edm::LuminosityBlockBase::luminosityBlock(), and ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask.

103  {
104  auto d = std::make_shared<hcaldqm::Cache>();
105  d->currentLS = lb.luminosityBlock();
106  d->EvtCntLS = 0;
107 
108  /* //// these resets were not useful anymore
109  this->_resetMonitors(f1LS);
110  if (_procLSs % 10 == 0)
111  this->_resetMonitors(f10LS);
112  if (_procLSs % 50 == 0)
113  this->_resetMonitors(f50LS);
114  if (_procLSs % 100 == 0)
115  this->_resetMonitors(f100LS);
116 */
117 
118  // get the Channel Quality Status for all the channels
119  d->xQuality.initialize(hashfunctions::fDChannel);
120  d->xQuality.reset();
121  const HcalChannelQuality &cq = es.getData(hcalChannelQualityToken_);
122  std::vector<DetId> detids = cq.getAllChannels();
123  for (std::vector<DetId>::const_iterator it = detids.begin(); it != detids.end(); ++it) {
124  // if unknown skip
126  continue;
127 
128  if (HcalGenericDetId(*it).isHcalDetId()) {
129  HcalDetId did(*it);
130  uint32_t mask = (cq.getValues(did))->getValue();
131  if (mask != 0) {
132  d->xQuality.push(did, mask);
133  }
134  }
135  }
136  return d;
137  }
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool isHcalDetId() const
std::vector< DetId > getAllChannels() const
d
Definition: ztail.py:151
HcalGenericSubdetector genericSubdet() const
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > hcalChannelQualityToken_
Definition: DQTask.h:78

◆ globalEndLuminosityBlock()

void hcaldqm::DQTask::globalEndLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
override

Definition at line 139 of file DQTask.cc.

References _procLSs.

139 { _procLSs++; }
int _procLSs
Definition: DQTask.h:63

Member Data Documentation

◆ _cEvsPerLS

ContainerI hcaldqm::DQTask::_cEvsPerLS
protected

Definition at line 57 of file DQTask.h.

Referenced by analyze(), and bookHistograms().

◆ _cEvsTotal

ContainerI hcaldqm::DQTask::_cEvsTotal
protected

Definition at line 56 of file DQTask.h.

Referenced by analyze(), and bookHistograms().

◆ _cProcessingTypeName

ContainerS hcaldqm::DQTask::_cProcessingTypeName
protected

Definition at line 60 of file DQTask.h.

Referenced by bookHistograms().

◆ _cRunKeyName

ContainerS hcaldqm::DQTask::_cRunKeyName
protected

Definition at line 59 of file DQTask.h.

Referenced by bookHistograms().

◆ _cRunKeyVal

ContainerI hcaldqm::DQTask::_cRunKeyVal
protected

Definition at line 58 of file DQTask.h.

Referenced by bookHistograms().

◆ _dbService

edm::ESHandle<HcalDbService> hcaldqm::DQTask::_dbService
protected

◆ _emap

HcalElectronicsMap const* hcaldqm::DQTask::_emap = nullptr
protected

◆ _procLSs

int hcaldqm::DQTask::_procLSs
protected

Definition at line 63 of file DQTask.h.

Referenced by globalEndLuminosityBlock().

◆ _tagRaw

edm::InputTag hcaldqm::DQTask::_tagRaw
protected

Definition at line 72 of file DQTask.h.

Referenced by _getCalibType(), and DQTask().

◆ _tokRaw

edm::EDGetTokenT<FEDRawDataCollection> hcaldqm::DQTask::_tokRaw
protected

Definition at line 73 of file DQTask.h.

Referenced by _getCalibType(), and DQTask().

◆ _vcdaqEids

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

◆ _xQuality

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

◆ hcalChannelQualityToken_

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

Definition at line 78 of file DQTask.h.

Referenced by globalBeginLuminosityBlock().

◆ hcalDbServiceToken_

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

Definition at line 76 of file DQTask.h.

Referenced by bookHistograms().

◆ runInfoToken_

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

Definition at line 77 of file DQTask.h.

Referenced by bookHistograms().