CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
RawTask Class Reference

#include <RawTask.h>

Inheritance diagram for RawTask:
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

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
std::shared_ptr< hcaldqm::CacheglobalBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const override
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 RawTask (edm::ParameterSet const &)
 
 ~RawTask () override
 
- Public Member Functions inherited from hcaldqm::DQTask
void analyze (edm::Event 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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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)
 

Protected Types

enum  RawFlag {
  fEvnMsm = 0, fBcnMsm = 1, fOrnMsm = 2, fBadQ = 3,
  nRawFlag = 4
}
 

Protected Member Functions

void _process (edm::Event const &, edm::EventSetup const &) override
 
void _resetMonitors (hcaldqm::UpdateFreq) override
 
- Protected Member Functions inherited from hcaldqm::DQTask
virtual int _getCalibType (edm::Event const &)
 
virtual bool _isApplicable (edm::Event const &)
 
- 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

bool _calibProcessing
 
hcaldqm::ContainerSingle2D _cBadQ_FEDvsLSmod10
 
hcaldqm::Container2D _cBadQuality_depth
 
hcaldqm::Container2D _cBadQuality_FEDuTCA
 
hcaldqm::Container2D _cBadQualityLS_depth
 
hcaldqm::ContainerSingleProf1D _cBadQualityvsBX
 
hcaldqm::ContainerSingleProf1D _cBadQualityvsLS
 
hcaldqm::Container2D _cBcnMsm_ElectronicsuTCA
 
hcaldqm::ContainerProf1D _cDataSizevsLS_FED
 
hcaldqm::Container2D _cEvnMsm_ElectronicsuTCA
 
hcaldqm::Container2D _cOrnMsm_ElectronicsuTCA
 
hcaldqm::ContainerSingle2D _cSummaryvsLS
 
hcaldqm::Container2D _cSummaryvsLS_FED
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
hcaldqm::filter::HashFilter _filter_FEDsuTCA
 
hcaldqm::filter::HashFilter _filter_FEDsVME
 
hcaldqm::filter::HashFilter _filter_uTCA
 
hcaldqm::filter::HashFilter _filter_VME
 
int _NBadQEvent
 
edm::InputTag _tagFEDs
 
edm::InputTag _tagReport
 
int _thresh_calib_nbadq
 
edm::EDGetTokenT< FEDRawDataCollection_tokFEDs
 
edm::EDGetTokenT< HcalUnpackerReport_tokReport
 
std::vector< hcaldqm::flag::Flag_vflags
 
std::vector< uint32_t > _vhashFEDs
 
hcaldqm::ContainerXXX< uint32_t > _xBadQLS
 
hcaldqm::ContainerXXX< uint32_t > _xBcnMsmLS
 
hcaldqm::ContainerXXX< uint32_t > _xEvnMsmLS
 
hcaldqm::ContainerXXX< uint32_t > _xOrnMsmLS
 
edm::ESGetToken< HcalDbService, HcalDbRecordhcalDbServiceToken_
 
- Protected Attributes inherited from hcaldqm::DQTask
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
 
- Static Public Member Functions inherited from hcaldqm::DQTask
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)
 

Detailed Description

file: Author: Description:

Definition at line 24 of file RawTask.h.

Member Enumeration Documentation

◆ RawFlag

enum RawTask::RawFlag
protected
Enumerator
fEvnMsm 
fBcnMsm 
fOrnMsm 
fBadQ 
nRawFlag 

Definition at line 46 of file RawTask.h.

Constructor & Destructor Documentation

◆ RawTask()

RawTask::RawTask ( edm::ParameterSet const &  ps)

Definition at line 6 of file RawTask.cc.

References _calibProcessing, _NBadQEvent, _tagFEDs, _tagReport, _thresh_calib_nbadq, _tokFEDs, _tokReport, _vflags, fBadQ, fBcnMsm, fEvnMsm, nanoDQM_cfi::Flag, fOrnMsm, edm::ParameterSet::getUntrackedParameter(), ProducerED_cfi::InputTag, and nRawFlag.

7  : DQTask(ps), hcalDbServiceToken_(esConsumes<HcalDbService, HcalDbRecord, edm::Transition::BeginRun>()) {
8  _tagFEDs = ps.getUntrackedParameter<edm::InputTag>("tagFEDs", edm::InputTag("rawDataCollector"));
9  _tagReport = ps.getUntrackedParameter<edm::InputTag>("tagReport", edm::InputTag("hcalDigis"));
10  _calibProcessing = ps.getUntrackedParameter<bool>("calibProcessing", false);
11  _thresh_calib_nbadq = ps.getUntrackedParameter<int>("thresh_calib_nbadq", 5000);
12 
13  _tokFEDs = consumes<FEDRawDataCollection>(_tagFEDs);
14  _tokReport = consumes<HcalUnpackerReport>(_tagReport);
15 
16  _vflags.resize(nRawFlag);
17  _vflags[fEvnMsm] = flag::Flag("EvnMsm");
18  _vflags[fBcnMsm] = flag::Flag("BcnMsm");
19  _vflags[fBadQ] = flag::Flag("BadQ");
20  _vflags[fOrnMsm] = flag::Flag("OrnMsm");
21  _NBadQEvent = 0;
22 }
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: RawTask.h:42
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:8
bool _calibProcessing
Definition: RawTask.h:52
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: RawTask.h:41
edm::EDGetTokenT< FEDRawDataCollection > _tokFEDs
Definition: RawTask.h:40
int _thresh_calib_nbadq
Definition: RawTask.h:53
edm::InputTag _tagFEDs
Definition: RawTask.h:38
std::vector< hcaldqm::flag::Flag > _vflags
Definition: RawTask.h:45
int _NBadQEvent
Definition: RawTask.h:54
edm::InputTag _tagReport
Definition: RawTask.h:39

◆ ~RawTask()

RawTask::~RawTask ( )
inlineoverride

Definition at line 27 of file RawTask.h.

27 {}

Member Function Documentation

◆ _process()

void RawTask::_process ( edm::Event const &  e,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements hcaldqm::DQTask.

Definition at line 201 of file RawTask.cc.

References _calibProcessing, _cBadQuality_depth, _cBadQuality_FEDuTCA, _cBadQualityvsBX, _cBadQualityvsLS, _cBcnMsm_ElectronicsuTCA, _cDataSizevsLS_FED, _cEvnMsm_ElectronicsuTCA, _cOrnMsm_ElectronicsuTCA, hcaldqm::DQModule::_currentLS, _ehashmap, _filter_FEDsuTCA, _filter_FEDsVME, hcaldqm::DQModule::_logger, _NBadQEvent, hcaldqm::DQModule::_ptype, _tagFEDs, _tagReport, _thresh_calib_nbadq, _tokFEDs, _tokReport, _xBadQLS, _xBcnMsmLS, _xEvnMsmLS, _xOrnMsmLS, hcaldqm::DQTask::_xQuality, hcal::AMC13Header::AMCId(), hcal::AMC13Header::AMCPayload(), hcal::AMC13Header::AMCSize(), hcal::AMC13Header::AMCSlot(), HcalUnpackerReport::bad_quality_begin(), HcalUnpackerReport::bad_quality_end(), HcalUnpackerReport::badQualityDigis(), hcal::AMC13Header::bunchId(), nano_mu_digi_cff::bx, HcalHTRData::check(), FCDTask_cfi::crate, callgraph::cs, FEDRawData::data(), ecaldqm::dccId(), Logger::dqmthrow(), MillePedeFileConverter_cfg::e, runTauDisplay::eid, hcaldqm::ContainerXXX< STDTYPE >::exists(), hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_VME_MIN, FEDRawDataCollection::FEDData(), hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::ContainerSingle1D::fill(), hcaldqm::Container2D::fill(), hcaldqm::Container1D::fill(), hcaldqm::filter::HashFilter::filter(), hcaldqm::fOffline, hcaldqm::fOnline, hcaldqm::ContainerXXX< STDTYPE >::get(), HcalDCCHeader::getBunchId(), HcalHTRData::getBunchNumber(), HcalDCCHeader::getDCCEventNumber(), HcalHTRData::getL1ANumber(), HcalDCCHeader::getOrbitNumber(), HcalHTRData::getOrbitNumber(), HcalDCCHeader::getSourceId(), HcalDCCHeader::getSpigotData(), HcalChannelStatus::HcalCellDead, HcalChannelStatus::HcalCellMask, edm::InputTag::instance(), HcalGenericDetId::isHcalDetId(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, hcal::AMC13Header::l1aNumber(), HcalUHTRData::l1ANumber(), edm::InputTag::label(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXHCALuTCAFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINHCALuTCAFEDID, hcal::AMC13Header::NAMC(), groupFilesInBlocks::nn, hcal::AMC13Header::orbitNumber(), alignCSCRings::r, hcaldqm::constants::RAW_EMPTY, hcaldqm::ContainerXXX< STDTYPE >::reset(), FEDRawData::size(), FCDTask_cfi::slot, HcalDCCHeader::SPIGOT_COUNT, hcaldqm::constants::SPIGOT_MAX, and hcaldqm::constants::SPIGOT_MIN.

201  {
204  if (!e.getByToken(_tokFEDs, craw))
205  _logger.dqmthrow("Collection FEDRawDataCollection isn't available" + _tagFEDs.label() + " " + _tagFEDs.instance());
206  if (!e.getByToken(_tokReport, creport))
207  _logger.dqmthrow("Collection HcalUnpackerReport isn't available" + _tagReport.label() + " " +
208  _tagReport.instance());
209 
210  // extract some info
211  int bx = e.bunchCrossing();
212 
213  auto lumiCache = luminosityBlockCache(e.getLuminosityBlock().index());
214  _currentLS = lumiCache->currentLS;
215  _xQuality.reset();
216  _xQuality = lumiCache->xQuality;
217 
218  /*
219  * For Calibration/Abort Gap Processing
220  * check if the #channels taht are bad from the unpacker
221  * is > 5000. If it is skip...
222  */
223  if (_calibProcessing) {
224  int nbadq = creport->badQualityDigis();
225  if (nbadq >= _thresh_calib_nbadq)
226  return;
227  }
228 
229  int nn = 0;
230  // loop thru and fill the detIds with bad quality
231  // NOTE: Calibration Channels are skipped!
232  // TODO: Include for Online Calibration Channels marked as bad
233  // a comment below is left on purpose!
234  //_cBadQualityvsBX.fill(bx, creport->badQualityDigis());
235  int Nbadq = creport->badQualityDigis();
236  if (lumiCache->EvtCntLS == 1)
237  _NBadQEvent = 0; // Reset at the beginning of each new LS
238  if (Nbadq > 0)
239  _NBadQEvent++;
240  //std::cout << " Nbadq "<< Nbadq << " NBadQEvent " <<_NBadQEvent<< std::endl;
241  for (std::vector<DetId>::const_iterator it = creport->bad_quality_begin(); it != creport->bad_quality_end(); ++it) {
242  // skip non HCAL det ids
243  if (!HcalGenericDetId(*it).isHcalDetId())
244  continue;
245 
246  // skip those that are of bad quality from conditions
247  // Masked or Dead
248  if (_xQuality.exists(HcalDetId(*it))) {
251  continue;
252  }
253 
254  nn++;
257  // ONLINE ONLY!
258  if (_ptype == fOnline)
259  //Number of BadQualityDigis
260  _xBadQLS.get(eid)++;
261  //std::cout << " event _xBadQLS "<< double(_xBadQLS.get(eid)) << std::endl;
262  if (_ptype != fOffline) { // hidefed2crate
263  if (!eid.isVMEid()) {
265  continue;
267  }
268  }
269  }
272 
273  if (_ptype != fOffline) { // hidefed2crate
274  for (int fed = FEDNumbering::MINHCALFEDID; fed <= FEDNumbering::MAXHCALuTCAFEDID; fed++) {
275  // skip nonHCAL FEDs
278  continue;
279  FEDRawData const& raw = craw->FEDData(fed);
280  if (raw.size() < constants::RAW_EMPTY)
281  continue;
282 
283  if (fed <= FEDNumbering::MAXHCALFEDID) // VME
284  {
285  HcalDCCHeader const* hdcc = (HcalDCCHeader const*)(raw.data());
286  if (!hdcc)
287  continue;
288 
289  uint32_t bcn = hdcc->getBunchId();
290  uint32_t orn = hdcc->getOrbitNumber() & 0x1F; // LS 5 bits only
291  uint32_t evn = hdcc->getDCCEventNumber();
292  int dccId = hdcc->getSourceId() - constants::FED_VME_MIN;
293 
294  /* online only */
295  if (_ptype == fOnline) {
299  continue;
300  _cDataSizevsLS_FED.fill(eid, _currentLS, double(raw.size()) / 1024.);
301  }
302 
303  // iterate over spigots
304  HcalHTRData htr;
305  for (int is = 0; is < HcalDCCHeader::SPIGOT_COUNT; is++) {
306  int r = hdcc->getSpigotData(is, htr, raw.size());
307  if (r != 0 || !htr.check())
308  continue;
311  continue;
312 
313  uint32_t htr_evn = htr.getL1ANumber();
314  uint32_t htr_orn = htr.getOrbitNumber();
315  uint32_t htr_bcn = htr.getBunchNumber();
316  bool qevn = (htr_evn != evn);
317  bool qbcn = (htr_bcn != bcn);
318  bool qorn = (htr_orn != orn);
319  if (qevn) {
320  if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
321  _xEvnMsmLS.get(eid)++;
322  }
323  if (qorn) {
324  if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
325  _xOrnMsmLS.get(eid)++;
326  }
327  if (qbcn) {
328  if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
329  _xBcnMsmLS.get(eid)++;
330  }
331  }
332  } else // uTCA
333  {
334  hcal::AMC13Header const* hamc13 = (hcal::AMC13Header const*)raw.data();
335  if (!hamc13)
336  continue;
337 
338  /* online only */
339  if (_ptype == fOnline) {
340  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
341  HcalElectronicsId eid = HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false);
343  continue;
344  _cDataSizevsLS_FED.fill(eid, _currentLS, double(raw.size()) / 1024.);
345  }
346 
347  uint32_t bcn = hamc13->bunchId();
348  uint32_t orn = hamc13->orbitNumber() & 0xFFFF; // LS 16bits only
349  uint32_t evn = hamc13->l1aNumber();
350  int namc = hamc13->NAMC();
351 
352  for (int iamc = 0; iamc < namc; iamc++) {
353  int slot = hamc13->AMCSlot(iamc);
354  int crate = hamc13->AMCId(iamc) & 0xFF;
357  continue;
358  HcalUHTRData uhtr(hamc13->AMCPayload(iamc), hamc13->AMCSize(iamc));
359 
360  uint32_t uhtr_evn = uhtr.l1ANumber();
361  uint32_t uhtr_bcn = uhtr.bunchNumber();
362  uint32_t uhtr_orn = uhtr.orbitNumber();
363  bool qevn = (uhtr_evn != evn);
364  bool qbcn = (uhtr_bcn != bcn);
365  bool qorn = (uhtr_orn != orn);
366  if (qevn) {
368 
369  if (_ptype == fOnline)
370  _xEvnMsmLS.get(eid)++;
371  }
372  if (qorn) {
374 
375  if (_ptype == fOnline)
376  _xOrnMsmLS.get(eid)++;
377  }
378  if (qbcn) {
380 
381  if (_ptype == fOnline)
382  _xBcnMsmLS.get(eid)++;
383  }
384  }
385  }
386  }
387  }
388 }
int const RAW_EMPTY
Definition: Constants.h:254
virtual bool exists(HcalDetId const &)
Definition: ContainerXXX.h:213
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
bool _calibProcessing
Definition: RawTask.h:52
const uint64_t * AMCPayload(int i) const
Definition: AMC13Header.cc:4
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: RawTask.h:49
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
hcaldqm::Container2D _cOrnMsm_ElectronicsuTCA
Definition: RawTask.h:75
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:48
int const SPIGOT_MIN
Definition: Constants.h:124
DetIdVector::const_iterator bad_quality_begin() const
hcaldqm::ContainerXXX< uint32_t > _xEvnMsmLS
Definition: RawTask.h:76
virtual void reset()
Definition: ContainerXXX.h:293
std::string const & label() const
Definition: InputTag.h:36
int const FIBER_VME_MIN
Definition: Constants.h:129
int const FIBERCH_MIN
Definition: Constants.h:138
int const SPIGOT_MAX
Definition: Constants.h:125
unsigned int getOrbitNumber() const
Definition: HcalDCCHeader.h:47
hcaldqm::Container2D _cBadQuality_depth
Definition: RawTask.h:66
int bunchId() const
Definition: AMC13Header.h:17
int getBunchId() const
Definition: HcalDCCHeader.h:35
int AMCSlot(int i) const
Definition: AMC13Header.h:33
hcaldqm::ContainerXXX< uint32_t > _xBcnMsmLS
Definition: RawTask.h:76
ProcessingType _ptype
Definition: DQModule.h:44
virtual void fill(uint32_t)
Definition: Container1D.cc:73
bool isHcalDetId() const
hcaldqm::filter::HashFilter _filter_FEDsuTCA
Definition: RawTask.h:62
ContainerXXX< uint32_t > _xQuality
Definition: DQTask.h:66
int const FED_VME_MIN
Definition: Constants.h:86
int getSourceId() const
Definition: HcalDCCHeader.h:33
unsigned int getBunchNumber() const
Get the HTR bunch number.
Definition: HcalHTRData.h:122
int const FIBER_uTCA_MIN1
Definition: Constants.h:132
int AMCSize(int i) const
Definition: AMC13Header.h:37
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
hcaldqm::ContainerXXX< uint32_t > _xOrnMsmLS
Definition: RawTask.h:76
Logger _logger
Definition: DQModule.h:55
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: RawTask.h:41
int l1aNumber() const
Definition: AMC13Header.h:19
edm::EDGetTokenT< FEDRawDataCollection > _tokFEDs
Definition: RawTask.h:40
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
hcaldqm::Container2D _cBadQuality_FEDuTCA
Definition: RawTask.h:65
hcaldqm::Container2D _cEvnMsm_ElectronicsuTCA
Definition: RawTask.h:73
unsigned int getL1ANumber() const
Get the HTR event number.
Definition: HcalHTRData.h:120
int _thresh_calib_nbadq
Definition: RawTask.h:53
unsigned int orbitNumber() const
Definition: AMC13Header.h:23
hcaldqm::ContainerXXX< uint32_t > _xBadQLS
Definition: RawTask.h:76
unsigned int getOrbitNumber() const
Get the HTR orbit number.
Definition: HcalHTRData.cc:345
int NAMC() const
Definition: AMC13Header.h:25
uint32_t l1ANumber() const
Get the HTR event number.
Definition: HcalUHTRData.h:87
unsigned long getDCCEventNumber() const
Definition: HcalDCCHeader.h:37
int badQualityDigis() const
hcaldqm::filter::HashFilter _filter_FEDsVME
Definition: RawTask.h:61
hcaldqm::ContainerSingleProf1D _cBadQualityvsLS
Definition: RawTask.h:68
edm::InputTag _tagFEDs
Definition: RawTask.h:38
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:20
hcaldqm::Container2D _cBcnMsm_ElectronicsuTCA
Definition: RawTask.h:74
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:198
hcaldqm::ContainerProf1D _cDataSizevsLS_FED
Definition: RawTask.h:70
int _NBadQEvent
Definition: RawTask.h:54
void fill(HcalDetId const &) override
Definition: Container2D.cc:52
uint16_t AMCId(int i) const
Definition: AMC13Header.h:31
virtual bool filter(HcalDetId const &) const
Definition: HashFilter.cc:24
edm::InputTag _tagReport
Definition: RawTask.h:39
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
hcaldqm::ContainerSingleProf1D _cBadQualityvsBX
Definition: RawTask.h:69
Readout chain identification for Hcal.
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
Definition: HcalHTRData.cc:63
DetIdVector::const_iterator bad_quality_end() const

◆ _resetMonitors()

void RawTask::_resetMonitors ( hcaldqm::UpdateFreq  uf)
overrideprotectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 196 of file RawTask.cc.

196  {
197  // base reset
198  DQTask::_resetMonitors(uf);
199 }

◆ bookHistograms()

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

Reimplemented from hcaldqm::DQTask.

Definition at line 24 of file RawTask.cc.

References _cBadQ_FEDvsLSmod10, _cBadQuality_depth, _cBadQuality_FEDuTCA, _cBadQualityvsBX, _cBadQualityvsLS, _cBcnMsm_ElectronicsuTCA, _cDataSizevsLS_FED, _cEvnMsm_ElectronicsuTCA, _cOrnMsm_ElectronicsuTCA, _cSummaryvsLS, _cSummaryvsLS_FED, _ehashmap, hcaldqm::DQTask::_emap, _filter_FEDsuTCA, _filter_FEDsVME, _filter_uTCA, _filter_VME, hcaldqm::DQModule::_maxLS, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_subsystem, _vflags, _vhashFEDs, _xBadQLS, _xBcnMsmLS, _xEvnMsmLS, _xOrnMsmLS, hcaldqm::ContainerXXX< STDTYPE >::book(), hcaldqm::ContainerSingleProf1D::book(), hcaldqm::ContainerProf1D::book(), hcaldqm::ContainerSingle2D::book(), hcaldqm::Container2D::book(), bookHistograms(), hcaldqm::constants::CRATE_uTCA_MIN, hcaldqm::constants::CRATE_VME_MIN, createIOVlist::dbs, hcaldqm::quantity::fBX, hcaldqm::hashfunctions::fCrate, hcaldqm::electronicsmap::fD2EHashMap, hcaldqm::quantity::fDataSize, hcaldqm::hashfunctions::fdepth, hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_VME_MIN, hcaldqm::hashfunctions::fElectronics, hcaldqm::hashfunctions::fFED, hcaldqm::quantity::fFiberuTCA, hcaldqm::filter::fFilter, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::quantity::fieta, hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, hcaldqm::quantity::fN_m0to10000, hcaldqm::fOffline, hcaldqm::fOnline, hcaldqm::filter::fPreserver, hcaldqm::quantity::fSlotuTCA, hcaldqm::quantity::fState, hcaldqm::utilities::getFEDList(), hcaldqm::utilities::getFEDuTCAList(), hcaldqm::utilities::getFEDVMEList(), edm::EventSetup::getHandle(), hcalDbServiceToken_, cuy::ib, hcaldqm::ContainerProf1D::initialize(), hcaldqm::ContainerSingleProf1D::initialize(), hcaldqm::ContainerXXX< STDTYPE >::initialize(), hcaldqm::filter::HashFilter::initialize(), hcaldqm::Container2D::initialize(), hcaldqm::ContainerSingle2D::initialize(), hcaldqm::electronicsmap::ElectronicsMap::initialize(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, alignCSCRings::r, nano_mu_digi_cff::rawId, HcalElectronicsId::rawId(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

24  {
26 
27  // GET WHAT YOU NEED
29  _emap = dbs->getHcalMapping();
30  std::vector<uint32_t> vVME;
31  std::vector<uint32_t> vuTCA;
32  vVME.push_back(
37 
39  "BadQualityvsLS",
42  0);
44  "BadQualityvsBX",
47  0);
49  "BadQuality",
54  0);
55 
56  // FED-based plots
57  if (_ptype != fOffline) { // hidefed2crate
58  std::vector<int> vFEDs = hcaldqm::utilities::getFEDList(_emap);
59  std::vector<int> vFEDsVME = hcaldqm::utilities::getFEDVMEList(_emap);
60  std::vector<int> vFEDsuTCA = hcaldqm::utilities::getFEDuTCAList(_emap);
61 
62  std::vector<uint32_t> vhashFEDsVME;
63  std::vector<uint32_t> vhashFEDsuTCA;
64 
65  for (std::vector<int>::const_iterator it = vFEDsVME.begin(); it != vFEDsVME.end(); ++it) {
66  vhashFEDsVME.push_back(
69  .rawId());
70  _vhashFEDs.push_back(
73  .rawId());
74  }
75  for (std::vector<int>::const_iterator it = vFEDsuTCA.begin(); it != vFEDsuTCA.end(); ++it) {
76  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
77  vhashFEDsuTCA.push_back(
78  HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
79  _vhashFEDs.push_back(HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
80  }
83 
84  // INITIALIZE FIRST
86  "EvnMsm",
88  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
91  0);
93  "BcnMsm",
95  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
98  0);
100  "OrnMsm",
102  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
105  0);
106 
107  // Bad Quality
109  "BadQuality",
114  0);
115 
116  // Online only
117  if (_ptype == fOnline) {
123  "SummaryvsLS",
128  0);
130  "SummaryvsLS",
134  0);
136  "BadQ_FEDvsLSmod10",
140  0);
141  // FED Size vs LS
143  "DataSizevsLS",
147  0);
148  }
149  }
150 
151  // BOOK HISTOGRAMS
152  if (_ptype != fOffline) {
156 
158  }
159  if (_ptype == fOffline) {
160  auto scope = DQMStore::IBooker::UseLumiScope(ib);
162  } else {
164  }
167 
168  // BOOK HISTOGRAMS to be used in ONLINE ONLY!
169  if (_ptype == fOnline) {
178  }
179 
180  // FOR OFFLINE PROCESSING MARK THESE HISTOGRAMS AS LUMI BASED
181  //if (_ptype == fOffline) {
182  //if (_ptype != fOffline) { // hidefed2crate
183  // Note that this is deliberately contradictory for the fed2crate fix, so it can be reversed if fed2crate is ever fixed properly,
184  // TODO: set LUMI scope while booking.
185  // _cEvnMsm_ElectronicsVME.setLumiFlag();
186  // _cBcnMsm_ElectronicsVME.setLumiFlag();
187  // _cEvnMsm_ElectronicsuTCA.setLumiFlag();
188  // _cBcnMsm_ElectronicsuTCA.setLumiFlag();
189  //}
190  //}
191 
192  // initialize hash map
194 }
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
Definition: RawTask.h:42
hcaldqm::Container2D _cSummaryvsLS_FED
Definition: RawTask.h:78
int const CRATE_VME_MIN
Definition: Constants.h:99
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
dbs
Find files in dataset.
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: RawTask.h:49
hcaldqm::Container2D _cOrnMsm_ElectronicsuTCA
Definition: RawTask.h:75
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
int const SPIGOT_MIN
Definition: Constants.h:124
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerXXX< uint32_t > _xEvnMsmLS
Definition: RawTask.h:76
int const FIBER_VME_MIN
Definition: Constants.h:129
void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0) override
int const FIBERCH_MIN
Definition: Constants.h:138
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< int > getFEDVMEList(HcalElectronicsMap const *)
Definition: Utilities.cc:115
hcaldqm::Container2D _cBadQuality_depth
Definition: RawTask.h:66
hcaldqm::ContainerSingle2D _cSummaryvsLS
Definition: RawTask.h:79
hcaldqm::ContainerXXX< uint32_t > _xBcnMsmLS
Definition: RawTask.h:76
ProcessingType _ptype
Definition: DQModule.h:44
hcaldqm::filter::HashFilter _filter_FEDsuTCA
Definition: RawTask.h:62
std::vector< uint32_t > _vhashFEDs
Definition: RawTask.h:56
int const FED_VME_MIN
Definition: Constants.h:86
int const FIBER_uTCA_MIN1
Definition: Constants.h:132
hcaldqm::ContainerXXX< uint32_t > _xOrnMsmLS
Definition: RawTask.h:76
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
Definition: DQMStore.h:549
std::string _name
Definition: DQModule.h:42
HcalElectronicsMap const * _emap
Definition: DQTask.h:81
hcaldqm::Container2D _cBadQuality_FEDuTCA
Definition: RawTask.h:65
int const CRATE_uTCA_MIN
Definition: Constants.h:104
hcaldqm::Container2D _cEvnMsm_ElectronicsuTCA
Definition: RawTask.h:73
hcaldqm::filter::HashFilter _filter_uTCA
Definition: RawTask.h:60
hcaldqm::ContainerXXX< uint32_t > _xBadQLS
Definition: RawTask.h:76
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:88
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:25
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
constexpr uint32_t rawId() const
hcaldqm::filter::HashFilter _filter_FEDsVME
Definition: RawTask.h:61
hcaldqm::ContainerSingleProf1D _cBadQualityvsLS
Definition: RawTask.h:68
std::vector< hcaldqm::flag::Flag > _vflags
Definition: RawTask.h:45
hcaldqm::Container2D _cBcnMsm_ElectronicsuTCA
Definition: RawTask.h:74
hcaldqm::ContainerProf1D _cDataSizevsLS_FED
Definition: RawTask.h:70
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:97
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
Definition: Utilities.cc:135
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:17
std::string _subsystem
Definition: DQModule.h:49
hcaldqm::ContainerSingle2D _cBadQ_FEDvsLSmod10
Definition: RawTask.h:80
hcaldqm::filter::HashFilter _filter_VME
Definition: RawTask.h:59
hcaldqm::ContainerSingleProf1D _cBadQualityvsBX
Definition: RawTask.h:69
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:82
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:567
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:111
ib
Definition: cuy.py:661

◆ globalBeginLuminosityBlock()

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

Definition at line 390 of file RawTask.cc.

391  {
392  return DQTask::globalBeginLuminosityBlock(lb, es);
393  // _cBadQualityvsLS.extendAxisRange(_currentLS);
394  // _cSummaryvsLS_FED.extendAxisRange(_currentLS);
395  // _cSummaryvsLS.extendAxisRange(_currentLS);
396 }

◆ globalEndLuminosityBlock()

void RawTask::globalEndLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
override

Definition at line 398 of file RawTask.cc.

References _cBadQ_FEDvsLSmod10, _cSummaryvsLS, _cSummaryvsLS_FED, hcaldqm::DQModule::_currentLS, hcaldqm::DQModule::_evsPerLS, _NBadQEvent, hcaldqm::DQModule::_ptype, hcaldqm::flag::Flag::_state, hcaldqm::DQTask::_vcdaqEids, _vflags, _vhashFEDs, _xBadQLS, _xBcnMsmLS, _xEvnMsmLS, _xOrnMsmLS, hcaldqm::utilities::crate2fed(), runTauDisplay::eid, hcaldqm::flag::fBAD, fBadQ, fBcnMsm, fEvnMsm, hcaldqm::flag::fGOOD, spr::find(), hcaldqm::flag::fNCDAQ, hcaldqm::fOnline, fOrnMsm, hcaldqm::flag::fPROBLEMATIC, hcaldqm::ContainerXXX< STDTYPE >::get(), edm::LuminosityBlock::index(), hcaldqm::utilities::isFEDHBHE(), hcaldqm::utilities::isFEDHF(), hcaldqm::utilities::isFEDHO(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, hcaldqm::flag::Flag::reset(), hcaldqm::ContainerXXX< STDTYPE >::reset(), hcaldqm::ContainerSingle2D::setBinContent(), and hcaldqm::Container2D::setBinContent().

398  {
399  auto lumiCache = luminosityBlockCache(lb.index());
400  _currentLS = lumiCache->currentLS;
401  _evsPerLS = lumiCache->EvtCntLS;
402 
403  if (_ptype != fOnline)
404  return;
405 
406  //
407  // GENERATE STATUS ONLY FOR ONLINE!
408  //
409  for (std::vector<uint32_t>::const_iterator it = _vhashFEDs.begin(); it != _vhashFEDs.end(); ++it) {
410  flag::Flag fSum("RAW");
412  int fed = hcaldqm::utilities::crate2fed(eid.crateId(), eid.slot());
413  std::vector<uint32_t>::const_iterator cit = std::find(_vcdaqEids.begin(), _vcdaqEids.end(), *it);
414  if (cit == _vcdaqEids.end()) {
415  // not @cDAQ
416  for (uint32_t iflag = 0; iflag < _vflags.size(); iflag++)
419  if (!hcaldqm::utilities::isFEDHO(eid) && fed != 1136)
421  continue;
422  }
423 
424  // FED is @cDAQ
426  if (_xEvnMsmLS.get(eid) > 0)
427  _vflags[fEvnMsm]._state = flag::fBAD;
428  else
429  _vflags[fEvnMsm]._state = flag::fGOOD;
430  if (_xBcnMsmLS.get(eid) > 0)
431  _vflags[fBcnMsm]._state = flag::fBAD;
432  else
433  _vflags[fBcnMsm]._state = flag::fGOOD;
434  if (_xOrnMsmLS.get(eid) > 0)
435  _vflags[fOrnMsm]._state = flag::fBAD;
436  else
437  _vflags[fOrnMsm]._state = flag::fGOOD;
438  if (double(_xBadQLS.get(eid)) > double(12 * _evsPerLS))
439  _vflags[fBadQ]._state = flag::fBAD;
440  //else if (_xBadQLS.get(eid) > 0){
441  // Following line added due to https://gitlab.cern.ch/cmshcal/docs/-/issues/233
442  // BadQ > (5%) of number of events in this LS.
443  else if (double(_xBadQLS.get(eid)) > 0 && double(_NBadQEvent) > double(0.05 * _evsPerLS)) {
444  _vflags[fBadQ]._state = flag::fPROBLEMATIC;
445 
446  } else
447  _vflags[fBadQ]._state = flag::fGOOD;
448  }
449 
450  int iflag = 0;
451  // iterate over all flags:
452  // - sum them all up in summary flag for this FED
453  // - reset each flag right after using it
454  for (std::vector<flag::Flag>::iterator ft = _vflags.begin(); ft != _vflags.end(); ++ft) {
455  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag), ft->_state);
456 
457  if (ft->_name == "BadQ") {
458  if (!hcaldqm::utilities::isFEDHO(eid) && fed != 1136 && ft->_state != 3) {
459  _cBadQ_FEDvsLSmod10.setBinContent(eid, _currentLS % 10, (double(_NBadQEvent) / double(_evsPerLS)) * 100);
460  }
461  }
462  fSum += (*ft);
463  iflag++;
464 
465  // this is the MUST! We don't keep flags per FED, reset
466  // each one of them after using
467  ft->reset();
468  }
469  _cSummaryvsLS.setBinContent(eid, _currentLS, fSum._state);
470  }
471 
472  // reset...
473  _xOrnMsmLS.reset();
474  _xEvnMsmLS.reset();
475  _xBcnMsmLS.reset();
476  _xBadQLS.reset();
477 
478  // in the end always do the DQTask::endLumi
479  DQTask::globalEndLuminosityBlock(lb, es);
480 }
hcaldqm::Container2D _cSummaryvsLS_FED
Definition: RawTask.h:78
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:29
hcaldqm::ContainerXXX< uint32_t > _xEvnMsmLS
Definition: RawTask.h:76
virtual void reset()
Definition: ContainerXXX.h:293
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
hcaldqm::ContainerSingle2D _cSummaryvsLS
Definition: RawTask.h:79
hcaldqm::ContainerXXX< uint32_t > _xBcnMsmLS
Definition: RawTask.h:76
ProcessingType _ptype
Definition: DQModule.h:44
virtual void setBinContent(int, int, int)
std::vector< uint32_t > _vhashFEDs
Definition: RawTask.h:56
hcaldqm::ContainerXXX< uint32_t > _xOrnMsmLS
Definition: RawTask.h:76
hcaldqm::ContainerXXX< uint32_t > _xBadQLS
Definition: RawTask.h:76
bool isFEDHBHE(HcalElectronicsId const &)
Definition: Utilities.cc:156
void setBinContent(HcalDetId const &, int) override
Definition: Container2D.cc:163
std::vector< hcaldqm::flag::Flag > _vflags
Definition: RawTask.h:45
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:198
int _NBadQEvent
Definition: RawTask.h:54
hcaldqm::ContainerSingle2D _cBadQ_FEDvsLSmod10
Definition: RawTask.h:80
bool isFEDHO(HcalElectronicsId const &)
Definition: Utilities.cc:182
std::vector< uint32_t > _vcdaqEids
Definition: DQTask.h:69
Readout chain identification for Hcal.
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:170

Member Data Documentation

◆ _calibProcessing

bool RawTask::_calibProcessing
protected

Definition at line 52 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _cBadQ_FEDvsLSmod10

hcaldqm::ContainerSingle2D RawTask::_cBadQ_FEDvsLSmod10
protected

Definition at line 80 of file RawTask.h.

Referenced by bookHistograms(), and globalEndLuminosityBlock().

◆ _cBadQuality_depth

hcaldqm::Container2D RawTask::_cBadQuality_depth
protected

Definition at line 66 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cBadQuality_FEDuTCA

hcaldqm::Container2D RawTask::_cBadQuality_FEDuTCA
protected

Definition at line 65 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cBadQualityLS_depth

hcaldqm::Container2D RawTask::_cBadQualityLS_depth
protected

Definition at line 67 of file RawTask.h.

◆ _cBadQualityvsBX

hcaldqm::ContainerSingleProf1D RawTask::_cBadQualityvsBX
protected

Definition at line 69 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cBadQualityvsLS

hcaldqm::ContainerSingleProf1D RawTask::_cBadQualityvsLS
protected

Definition at line 68 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cBcnMsm_ElectronicsuTCA

hcaldqm::Container2D RawTask::_cBcnMsm_ElectronicsuTCA
protected

Definition at line 74 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cDataSizevsLS_FED

hcaldqm::ContainerProf1D RawTask::_cDataSizevsLS_FED
protected

Definition at line 70 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cEvnMsm_ElectronicsuTCA

hcaldqm::Container2D RawTask::_cEvnMsm_ElectronicsuTCA
protected

Definition at line 73 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cOrnMsm_ElectronicsuTCA

hcaldqm::Container2D RawTask::_cOrnMsm_ElectronicsuTCA
protected

Definition at line 75 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _cSummaryvsLS

hcaldqm::ContainerSingle2D RawTask::_cSummaryvsLS
protected

Definition at line 79 of file RawTask.h.

Referenced by bookHistograms(), and globalEndLuminosityBlock().

◆ _cSummaryvsLS_FED

hcaldqm::Container2D RawTask::_cSummaryvsLS_FED
protected

Definition at line 78 of file RawTask.h.

Referenced by bookHistograms(), and globalEndLuminosityBlock().

◆ _ehashmap

hcaldqm::electronicsmap::ElectronicsMap RawTask::_ehashmap
protected

Definition at line 49 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _filter_FEDsuTCA

hcaldqm::filter::HashFilter RawTask::_filter_FEDsuTCA
protected

Definition at line 62 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _filter_FEDsVME

hcaldqm::filter::HashFilter RawTask::_filter_FEDsVME
protected

Definition at line 61 of file RawTask.h.

Referenced by _process(), and bookHistograms().

◆ _filter_uTCA

hcaldqm::filter::HashFilter RawTask::_filter_uTCA
protected

Definition at line 60 of file RawTask.h.

Referenced by bookHistograms().

◆ _filter_VME

hcaldqm::filter::HashFilter RawTask::_filter_VME
protected

Definition at line 59 of file RawTask.h.

Referenced by bookHistograms().

◆ _NBadQEvent

int RawTask::_NBadQEvent
protected

Definition at line 54 of file RawTask.h.

Referenced by _process(), globalEndLuminosityBlock(), and RawTask().

◆ _tagFEDs

edm::InputTag RawTask::_tagFEDs
protected

Definition at line 38 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _tagReport

edm::InputTag RawTask::_tagReport
protected

Definition at line 39 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _thresh_calib_nbadq

int RawTask::_thresh_calib_nbadq
protected

Definition at line 53 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _tokFEDs

edm::EDGetTokenT<FEDRawDataCollection> RawTask::_tokFEDs
protected

Definition at line 40 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _tokReport

edm::EDGetTokenT<HcalUnpackerReport> RawTask::_tokReport
protected

Definition at line 41 of file RawTask.h.

Referenced by _process(), and RawTask().

◆ _vflags

std::vector<hcaldqm::flag::Flag> RawTask::_vflags
protected

Definition at line 45 of file RawTask.h.

Referenced by bookHistograms(), globalEndLuminosityBlock(), and RawTask().

◆ _vhashFEDs

std::vector<uint32_t> RawTask::_vhashFEDs
protected

Definition at line 56 of file RawTask.h.

Referenced by bookHistograms(), and globalEndLuminosityBlock().

◆ _xBadQLS

hcaldqm::ContainerXXX<uint32_t> RawTask::_xBadQLS
protected

Definition at line 76 of file RawTask.h.

Referenced by _process(), bookHistograms(), and globalEndLuminosityBlock().

◆ _xBcnMsmLS

hcaldqm::ContainerXXX<uint32_t> RawTask::_xBcnMsmLS
protected

Definition at line 76 of file RawTask.h.

Referenced by _process(), bookHistograms(), and globalEndLuminosityBlock().

◆ _xEvnMsmLS

hcaldqm::ContainerXXX<uint32_t> RawTask::_xEvnMsmLS
protected

Definition at line 76 of file RawTask.h.

Referenced by _process(), bookHistograms(), and globalEndLuminosityBlock().

◆ _xOrnMsmLS

hcaldqm::ContainerXXX<uint32_t> RawTask::_xOrnMsmLS
protected

Definition at line 76 of file RawTask.h.

Referenced by _process(), bookHistograms(), and globalEndLuminosityBlock().

◆ hcalDbServiceToken_

edm::ESGetToken<HcalDbService, HcalDbRecord> RawTask::hcalDbServiceToken_
protected

Definition at line 42 of file RawTask.h.

Referenced by bookHistograms().