CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
DQMProvInfo Class Reference
Inheritance diagram for DQMProvInfo:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DQMProvInfo (const edm::ParameterSet &ps)
 
 ~DQMProvInfo () override=default
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer<>
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Private Member Functions

void analyzeEventInfo (const edm::Event &e)
 
void analyzeLhcInfo (const edm::Event &e)
 
void analyzeProvInfo (const edm::Event &e)
 
void blankAllLumiSections ()
 
void bookHistogramsEventInfo (DQMStore::IBooker &)
 
void bookHistogramsLhcInfo (DQMStore::IBooker &)
 
void bookHistogramsProvInfo (DQMStore::IBooker &)
 
void fillDcsBitsFromDCSRecord (const DCSRecord &, bool *dcsBits)
 
void fillDcsBitsFromDcsStatusCollection (const edm::Handle< DcsStatusCollection > &, bool *dcsBits)
 
void fillSummaryMapBin (int ls, int bin, double value)
 
bool isPhysicsDeclared (bool *dcsBits)
 
void setupLumiSection (int ls)
 

Private Attributes

int beamMode_
 
edm::EDGetTokenT< DCSRecorddcsRecordToken_
 
edm::EDGetTokenT< DcsStatusCollectiondcsStatusCollection_
 
std::string globalTag_
 
bool globalTagRetrieved_
 
MonitorElementhBeamMode_
 
MonitorElementhHltKey_
 
MonitorElementhIntensity1_
 
MonitorElementhIntensity2_
 
MonitorElementhIsCollisionsRun_
 
MonitorElementhLhcFill_
 
std::string hltKey_
 
MonitorElementhMomentum_
 
MonitorElementhostName_
 
MonitorElementprocessId_
 
std::string provinfofolder_
 
MonitorElementreportSummary_
 
MonitorElementreportSummaryMap_
 
std::string runType_
 
std::string subsystemname_
 
edm::EDGetTokenT< TCDSRecordtcdsrecord_
 
MonitorElementversCMSSW_
 
MonitorElementversGlobaltag_
 
MonitorElementversRuntype_
 
MonitorElementworkingDir_
 

Static Private Attributes

static const int MAX_DCS_VBINS = 27
 
static const int MAX_LUMIS = 6000
 
static const int MAX_MOMENTUM = 6500
 
static const int MAX_VBINS = 31
 
static const int MOMENTUM_OFFSET = 1
 
static const int VBIN_BPIX = 17
 
static const int VBIN_CASTOR = 24
 
static const int VBIN_CSC_M = 2
 
static const int VBIN_CSC_P = 1
 
static const int VBIN_DT_0 = 3
 
static const int VBIN_DT_M = 5
 
static const int VBIN_DT_P = 4
 
static const int VBIN_EB_M = 7
 
static const int VBIN_EB_P = 6
 
static const int VBIN_EE_M = 9
 
static const int VBIN_EE_P = 8
 
static const int VBIN_ES_M = 11
 
static const int VBIN_ES_P = 10
 
static const int VBIN_FPIX = 18
 
static const int VBIN_GEM_M = 27
 
static const int VBIN_GEM_P = 26
 
static const int VBIN_HBHE_A = 12
 
static const int VBIN_HBHE_B = 13
 
static const int VBIN_HBHE_C = 14
 
static const int VBIN_HF = 15
 
static const int VBIN_HO = 16
 
static const int VBIN_MOMENTUM = 29
 
static const int VBIN_PHYSICS_DECLARED = 28
 
static const int VBIN_RPC = 19
 
static const int VBIN_STABLE_BEAM = 30
 
static const int VBIN_TE_M = 23
 
static const int VBIN_TEC_P = 22
 
static const int VBIN_TIBTID = 20
 
static const int VBIN_TOB = 21
 
static const int VBIN_VALID = 31
 
static const int VBIN_ZDC = 25
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
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
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 edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 29 of file DQMProvInfo.cc.

Constructor & Destructor Documentation

◆ DQMProvInfo()

DQMProvInfo::DQMProvInfo ( const edm::ParameterSet ps)

Definition at line 158 of file DQMProvInfo.cc.

References dcsRecordToken_, dcsStatusCollection_, edm::ParameterSet::getUntrackedParameter(), globalTag_, globalTagRetrieved_, HLT_2022v12_cff::InputTag, provinfofolder_, runType_, AlCaHLTBitMon_QueryRunRegistry::string, subsystemname_, and tcdsrecord_.

158  {
159  // Initialization of DQM parameters
160  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "Info");
161  provinfofolder_ = ps.getUntrackedParameter<std::string>("provInfoFolder", "ProvInfo");
162  runType_ = ps.getUntrackedParameter<std::string>("runType", "No run type selected");
163 
164  // Initialization of the input
165  // Used to get the DCS bits:
167  consumes<DcsStatusCollection>(ps.getUntrackedParameter<std::string>("dcsStatusCollection", "scalersRawToDigi"));
168 
169  // Used to get the BST record from the TCDS information
170  tcdsrecord_ = consumes<TCDSRecord>(
171  ps.getUntrackedParameter<edm::InputTag>("tcdsData", edm::InputTag("tcdsDigis", "tcdsRecord")));
172 
173  // Used to get the DCS bits:
174  dcsRecordToken_ = consumes<DCSRecord>(
175  ps.getUntrackedParameter<edm::InputTag>("dcsRecord", edm::InputTag("onlineMetaDataRawToDigi")));
176 
177  // Initialization of the global tag
178  globalTag_ = "MODULE::DEFAULT"; // default
179  globalTagRetrieved_ = false; // set as soon as retrieved from first event
180 }
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMProvInfo.cc:119
edm::EDGetTokenT< DCSRecord > dcsRecordToken_
Definition: DQMProvInfo.cc:121
bool globalTagRetrieved_
Definition: DQMProvInfo.cc:139
T getUntrackedParameter(std::string const &, T const &) const
std::string globalTag_
Definition: DQMProvInfo.cc:138
std::string subsystemname_
Definition: DQMProvInfo.cc:116
std::string runType_
Definition: DQMProvInfo.cc:141
edm::EDGetTokenT< TCDSRecord > tcdsrecord_
Definition: DQMProvInfo.cc:120
std::string provinfofolder_
Definition: DQMProvInfo.cc:117

◆ ~DQMProvInfo()

DQMProvInfo::~DQMProvInfo ( )
overridedefault

Member Function Documentation

◆ analyze()

void DQMProvInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 350 of file DQMProvInfo.cc.

References analyzeEventInfo(), analyzeLhcInfo(), analyzeProvInfo(), and setupLumiSection().

350  {
351  // This happens on an event by event base
352  // We extract information from events, placing them in local variables
353  // and then at the end of each lumisection, we fill them in the MonitorElement
354  // (Except for the global tag, which we only extract from the first event we
355  // ever encounter and put in the MonitorElement right away)
356 
357  // We set the top value to "Valid" to 1 for each LS we encounter
358  setupLumiSection(event.id().luminosityBlock());
359 
363 }
void analyzeEventInfo(const edm::Event &e)
Definition: DQMProvInfo.cc:407
void analyzeProvInfo(const edm::Event &e)
Definition: DQMProvInfo.cc:455
void analyzeLhcInfo(const edm::Event &e)
Definition: DQMProvInfo.cc:365
void setupLumiSection(int ls)
Definition: DQMProvInfo.cc:588
Definition: event.py:1

◆ analyzeEventInfo()

void DQMProvInfo::analyzeEventInfo ( const edm::Event e)
private

Definition at line 407 of file DQMProvInfo.cc.

References DQMOffline_cff::dcsRecord, dcsRecordToken_, dcsStatusCollection_, fillDcsBitsFromDCSRecord(), fillDcsBitsFromDcsStatusCollection(), fillSummaryMapBin(), isPhysicsDeclared(), edm::HandleBase::isValid(), MAX_DCS_VBINS, and VBIN_PHYSICS_DECLARED.

Referenced by analyze().

407  {
408  unsigned int currentLSNumber = event.id().luminosityBlock();
409  // Part 1:
410  // If FED#735 is available use it to extract DcsStatusCollection.
411  // If not, use softFED#1022 to extract DCSRecord.
412 
413  edm::Handle<DcsStatusCollection> dcsStatusCollection;
414  event.getByToken(dcsStatusCollection_, dcsStatusCollection);
416  event.getByToken(dcsRecordToken_, dcsRecord);
417 
418  // Populate dcsBits array with received information.
419  bool dcsBits[MAX_DCS_VBINS + 1] = {};
420 
421  if (dcsStatusCollection.isValid() && !dcsStatusCollection->empty()) {
422  edm::LogInfo("DQMProvInfo") << "Using FED#735 for reading DCS bits" << std::endl;
423  fillDcsBitsFromDcsStatusCollection(dcsStatusCollection, dcsBits);
424  } else if (dcsRecord.isValid()) {
425  edm::LogInfo("DQMProvInfo") << "Using softFED#1022 for reading DCS bits" << std::endl;
427  } else {
428  edm::LogError("DQMProvInfo") << "No DCS information found!" << std::endl;
429  }
430 
431  // Part 2: Compute the PhysicsDeclared bit from the event
432  auto physicsDeclared = isPhysicsDeclared(dcsBits);
433 
434  // Some info-level logging
435  edm::LogInfo("DQMProvInfo") << "Physics declared bit: " << physicsDeclared << std::endl;
436 
437  // Part 1: Physics declared bit in y bin VBIN_PHYSICS_DECLARED
438  // This also is used as the global value of the summary.
439  if (physicsDeclared) {
440  fillSummaryMapBin(currentLSNumber, VBIN_PHYSICS_DECLARED, 1.);
441  } else {
442  fillSummaryMapBin(currentLSNumber, VBIN_PHYSICS_DECLARED, 0.);
443  }
444 
445  // Part2: DCS bits in y bins 1 to MAX_DCS_VBINS
446  for (int vbin = 1; vbin <= MAX_DCS_VBINS; vbin++) {
447  if (dcsBits[vbin]) {
448  fillSummaryMapBin(currentLSNumber, vbin, 1.);
449  } else {
450  fillSummaryMapBin(currentLSNumber, vbin, 0.);
451  }
452  }
453 }
void fillSummaryMapBin(int ls, int bin, double value)
Definition: DQMProvInfo.cc:575
void fillDcsBitsFromDcsStatusCollection(const edm::Handle< DcsStatusCollection > &, bool *dcsBits)
Definition: DQMProvInfo.cc:502
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMProvInfo.cc:119
edm::EDGetTokenT< DCSRecord > dcsRecordToken_
Definition: DQMProvInfo.cc:121
Log< level::Error, false > LogError
Log< level::Info, false > LogInfo
void fillDcsBitsFromDCSRecord(const DCSRecord &, bool *dcsBits)
Definition: DQMProvInfo.cc:472
bool isValid() const
Definition: HandleBase.h:70
static const int MAX_DCS_VBINS
Definition: DQMProvInfo.cc:94
bool isPhysicsDeclared(bool *dcsBits)
Definition: DQMProvInfo.cc:549
static const int VBIN_PHYSICS_DECLARED
Definition: DQMProvInfo.cc:96

◆ analyzeLhcInfo()

void DQMProvInfo::analyzeLhcInfo ( const edm::Event e)
private

Definition at line 365 of file DQMProvInfo.cc.

References beamMode_, dqm::impl::MonitorElement::Fill(), fillSummaryMapBin(), BSTRecord::getBeamMode(), BSTRecord::getBeamMomentum(), TCDSRecord::getBST(), BSTRecord::getIntensityBeam1(), BSTRecord::getIntensityBeam2(), BSTRecord::getLhcFill(), hBeamMode_, hIntensity1_, hIntensity2_, hIsCollisionsRun_, hLhcFill_, hMomentum_, edm::HandleBase::isValid(), MAX_MOMENTUM, MOMENTUM_OFFSET, reportSummary_, dqm::impl::MonitorElement::setBinContent(), tcdsrecord_, VBIN_MOMENTUM, and VBIN_STABLE_BEAM.

Referenced by analyze().

365  {
366  unsigned int currentLSNumber = event.id().luminosityBlock();
367  edm::Handle<TCDSRecord> tcdsData;
368  event.getByToken(tcdsrecord_, tcdsData);
369  // We unpack the TCDS record from TCDS
370  if (tcdsData.isValid()) {
371  //and we look at the BST information
372  auto lhcFill = static_cast<int>(tcdsData->getBST().getLhcFill());
373  beamMode_ = static_cast<int>(tcdsData->getBST().getBeamMode());
374  auto momentum = static_cast<int>(tcdsData->getBST().getBeamMomentum());
375  auto intensity1 = static_cast<int>(tcdsData->getBST().getIntensityBeam1());
376  auto intensity2 = static_cast<int>(tcdsData->getBST().getIntensityBeam2());
377 
378  // Quite straightforward: Fill in the value for the LS in each plot:
379  hLhcFill_->setBinContent(currentLSNumber, lhcFill);
380  hBeamMode_->setBinContent(currentLSNumber, beamMode_);
381  hMomentum_->setBinContent(currentLSNumber, momentum);
382  hIntensity1_->setBinContent(currentLSNumber, intensity1);
383  hIntensity2_->setBinContent(currentLSNumber, intensity2);
384 
385  // Part3: Using LHC status info, fill in VBIN_MOMENTUM and VBIN_STABLE_BEAM
386  // Fill 13 TeV bit in y bin VBIN_MOMENTUM
387  if (momentum >= MAX_MOMENTUM - MOMENTUM_OFFSET) {
388  fillSummaryMapBin(currentLSNumber, VBIN_MOMENTUM, 1.);
389  } else {
390  fillSummaryMapBin(currentLSNumber, VBIN_MOMENTUM, 0.);
391  }
392 
393  // Fill stable beams bit in y bin VBIN_STABLE_BEAM
394  if (beamMode_ == 11) {
396  reportSummary_->Fill(1.);
397  fillSummaryMapBin(currentLSNumber, VBIN_STABLE_BEAM, 1.);
398  } else {
399  reportSummary_->Fill(0.);
400  fillSummaryMapBin(currentLSNumber, VBIN_STABLE_BEAM, 0.);
401  }
402  } else {
403  edm::LogWarning("DQMProvInfo") << "TCDS Data inaccessible.";
404  }
405 }
void fillSummaryMapBin(int ls, int bin, double value)
Definition: DQMProvInfo.cc:575
MonitorElement * hBeamMode_
Definition: DQMProvInfo.cc:124
MonitorElement * hIntensity2_
Definition: DQMProvInfo.cc:127
MonitorElement * reportSummary_
Definition: DQMProvInfo.cc:132
MonitorElement * hMomentum_
Definition: DQMProvInfo.cc:129
uint32_t const getIntensityBeam2() const
Definition: BSTRecord.h:85
uint32_t const getIntensityBeam1() const
Definition: BSTRecord.h:82
void Fill(long long x)
static const int VBIN_MOMENTUM
Definition: DQMProvInfo.cc:97
static const int MAX_MOMENTUM
Definition: DQMProvInfo.cc:105
const BSTRecord & getBST() const
Definition: TCDSRecord.h:100
int32_t const getBeamMomentum() const
Definition: BSTRecord.h:79
uint16_t const getBeamMode() const
Definition: BSTRecord.h:70
MonitorElement * hLhcFill_
Definition: DQMProvInfo.cc:128
static const int VBIN_STABLE_BEAM
Definition: DQMProvInfo.cc:98
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hIntensity1_
Definition: DQMProvInfo.cc:126
MonitorElement * hIsCollisionsRun_
Definition: DQMProvInfo.cc:145
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< TCDSRecord > tcdsrecord_
Definition: DQMProvInfo.cc:120
uint32_t const getLhcFill() const
Definition: BSTRecord.h:67
Log< level::Warning, false > LogWarning
static const int MOMENTUM_OFFSET
Definition: DQMProvInfo.cc:113

◆ analyzeProvInfo()

void DQMProvInfo::analyzeProvInfo ( const edm::Event e)
private

Definition at line 455 of file DQMProvInfo.cc.

References dqm::impl::MonitorElement::Fill(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), globalTag_, globalTagRetrieved_, SimL1EmulatorRepack_CalouGT_cff::processName, AlCaHLTBitMon_QueryRunRegistry::string, and versGlobaltag_.

Referenced by analyze().

455  {
456  // Only trying to retrieve the global tag for the first event we ever
457  // encounter.
458  if (!globalTagRetrieved_) {
459  // Getting the real process name for the given event
460  std::string processName = event.processHistory()[event.processHistory().size() - 1].processName();
461  // Getting parameters for that process
463  event.getProcessParameterSet(processName, ps);
464  // Getting the global tag
465  globalTag_ = ps.getParameterSet("PoolDBESSource@GlobalTag").getParameter<std::string>("globaltag");
467  // Finaly: Setting globalTagRetrieved_ to true, since we got it now
468  globalTagRetrieved_ = true;
469  }
470 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet const & getParameterSet(std::string const &) const
MonitorElement * versGlobaltag_
Definition: DQMProvInfo.cc:137
bool globalTagRetrieved_
Definition: DQMProvInfo.cc:139
void Fill(long long x)
std::string globalTag_
Definition: DQMProvInfo.cc:138

◆ blankAllLumiSections()

void DQMProvInfo::blankAllLumiSections ( )
private

Definition at line 564 of file DQMProvInfo.cc.

References eostools::ls(), MAX_LUMIS, MAX_VBINS, reportSummaryMap_, and dqm::impl::MonitorElement::setBinContent().

Referenced by bookHistogramsEventInfo().

564  {
565  // Initially we want all lumisection to be blank (-1) and
566  // white instead of red which is misleading.
567  for (int ls = 0; ls < MAX_LUMIS; ls++) {
568  // Color all the bins white (-1)
569  for (int vBin = 1; vBin <= MAX_VBINS; vBin++) {
570  reportSummaryMap_->setBinContent(ls, vBin, -1.);
571  }
572  }
573 }
static const int MAX_LUMIS
Definition: DQMProvInfo.cc:60
static const int MAX_VBINS
Definition: DQMProvInfo.cc:101
def ls(path, rec=False)
Definition: eostools.py:349
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * reportSummaryMap_
Definition: DQMProvInfo.cc:133

◆ bookHistograms()

void DQMProvInfo::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iEventSetup 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer<>.

Definition at line 200 of file DQMProvInfo.cc.

References bookHistogramsEventInfo(), bookHistogramsLhcInfo(), bookHistogramsProvInfo(), dqm::implementation::NavigatorBase::cd(), provinfofolder_, dqm::implementation::NavigatorBase::setCurrentFolder(), and subsystemname_.

200  {
201  iBooker.cd();
202  // This module will create elements in 3 different folders:
203  // - Info/LhcInfo
204  // - Info/EventInfo
205  // - Info/ProvInfo
206  // (string "Info" configurable through subsystemname_)
207  // (string "Provinfo" configurable through provinfofolder_)
208  iBooker.setCurrentFolder(subsystemname_ + "/LhcInfo/");
209  bookHistogramsLhcInfo(iBooker);
210 
211  iBooker.setCurrentFolder(subsystemname_ + "/EventInfo/");
212  bookHistogramsEventInfo(iBooker);
213 
215  bookHistogramsProvInfo(iBooker);
216 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
void bookHistogramsEventInfo(DQMStore::IBooker &)
Definition: DQMProvInfo.cc:269
void bookHistogramsProvInfo(DQMStore::IBooker &)
Definition: DQMProvInfo.cc:319
void bookHistogramsLhcInfo(DQMStore::IBooker &)
Definition: DQMProvInfo.cc:218
std::string subsystemname_
Definition: DQMProvInfo.cc:116
std::string provinfofolder_
Definition: DQMProvInfo.cc:117

◆ bookHistogramsEventInfo()

void DQMProvInfo::bookHistogramsEventInfo ( DQMStore::IBooker iBooker)
private

Definition at line 269 of file DQMProvInfo.cc.

References blankAllLumiSections(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), MAX_LUMIS, MAX_VBINS, reportSummary_, reportSummaryMap_, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), VBIN_BPIX, VBIN_CASTOR, VBIN_CSC_M, VBIN_CSC_P, VBIN_DT_0, VBIN_DT_M, VBIN_DT_P, VBIN_EB_M, VBIN_EB_P, VBIN_EE_M, VBIN_EE_P, VBIN_ES_M, VBIN_ES_P, VBIN_FPIX, VBIN_GEM_M, VBIN_GEM_P, VBIN_HBHE_A, VBIN_HBHE_B, VBIN_HBHE_C, VBIN_HF, VBIN_HO, VBIN_MOMENTUM, VBIN_PHYSICS_DECLARED, VBIN_RPC, VBIN_STABLE_BEAM, VBIN_TE_M, VBIN_TEC_P, VBIN_TIBTID, VBIN_TOB, VBIN_VALID, and VBIN_ZDC.

Referenced by bookHistograms().

269  {
270  // Element: reportSummary
271  reportSummary_ = iBooker.bookFloat("reportSummary");
272 
273  // Element: reportSummaryMap (this is the famous HV plot)
274  reportSummaryMap_ = iBooker.book2D("reportSummaryMap",
275  "DCS HV Status and Beam Status per Lumisection",
276  MAX_LUMIS,
277  0,
278  MAX_LUMIS,
279  MAX_VBINS,
280  0.,
281  MAX_VBINS);
282  reportSummaryMap_->setAxisTitle("Luminosity Section");
283 
315 
317 }
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
MonitorElement * reportSummary_
Definition: DQMProvInfo.cc:132
static const int VBIN_GEM_P
Definition: DQMProvInfo.cc:88
static const int VBIN_EE_P
Definition: DQMProvInfo.cc:70
static const int VBIN_GEM_M
Definition: DQMProvInfo.cc:89
static const int VBIN_VALID
Definition: DQMProvInfo.cc:99
void blankAllLumiSections()
Definition: DQMProvInfo.cc:564
static const int VBIN_CASTOR
Definition: DQMProvInfo.cc:86
static const int VBIN_HBHE_B
Definition: DQMProvInfo.cc:75
static const int VBIN_EE_M
Definition: DQMProvInfo.cc:71
static const int VBIN_HBHE_C
Definition: DQMProvInfo.cc:76
static const int VBIN_HO
Definition: DQMProvInfo.cc:78
static const int VBIN_DT_0
Definition: DQMProvInfo.cc:65
static const int VBIN_TEC_P
Definition: DQMProvInfo.cc:84
static const int VBIN_CSC_M
Definition: DQMProvInfo.cc:64
static const int VBIN_TOB
Definition: DQMProvInfo.cc:83
static const int VBIN_FPIX
Definition: DQMProvInfo.cc:80
static const int MAX_LUMIS
Definition: DQMProvInfo.cc:60
static const int VBIN_DT_M
Definition: DQMProvInfo.cc:67
static const int VBIN_MOMENTUM
Definition: DQMProvInfo.cc:97
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static const int MAX_VBINS
Definition: DQMProvInfo.cc:101
static const int VBIN_STABLE_BEAM
Definition: DQMProvInfo.cc:98
static const int VBIN_TIBTID
Definition: DQMProvInfo.cc:82
static const int VBIN_EB_P
Definition: DQMProvInfo.cc:68
static const int VBIN_BPIX
Definition: DQMProvInfo.cc:79
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
static const int VBIN_TE_M
Definition: DQMProvInfo.cc:85
static const int VBIN_RPC
Definition: DQMProvInfo.cc:81
static const int VBIN_ZDC
Definition: DQMProvInfo.cc:87
static const int VBIN_ES_P
Definition: DQMProvInfo.cc:72
static const int VBIN_CSC_P
Definition: DQMProvInfo.cc:63
static const int VBIN_DT_P
Definition: DQMProvInfo.cc:66
static const int VBIN_ES_M
Definition: DQMProvInfo.cc:73
static const int VBIN_HF
Definition: DQMProvInfo.cc:77
static const int VBIN_HBHE_A
Definition: DQMProvInfo.cc:74
static const int VBIN_EB_M
Definition: DQMProvInfo.cc:69
MonitorElement * reportSummaryMap_
Definition: DQMProvInfo.cc:133
static const int VBIN_PHYSICS_DECLARED
Definition: DQMProvInfo.cc:96
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ bookHistogramsLhcInfo()

void DQMProvInfo::bookHistogramsLhcInfo ( DQMStore::IBooker iBooker)
private

Definition at line 218 of file DQMProvInfo.cc.

References dqm::implementation::IBooker::book1D(), dqm::impl::MonitorElement::getTH1F(), hBeamMode_, hIntensity1_, hIntensity2_, hLhcFill_, hMomentum_, MAX_LUMIS, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinContent(), and dqm::impl::MonitorElement::setBinLabel().

Referenced by bookHistograms().

218  {
219  // Element: beamMode
220  // Beam parameters provided by BST are defined in:
221  // https://edms.cern.ch/document/638899/2.0
222  hBeamMode_ = iBooker.book1D("beamMode", "beamMode", MAX_LUMIS, 1., MAX_LUMIS + 1);
223  hBeamMode_->getTH1F()->GetYaxis()->Set(21, 0.5, 21.5);
224  hBeamMode_->getTH1F()->SetMaximum(21.5);
225  hBeamMode_->setBinContent(0., 22.); // Not clear, remove when testable
226 
227  hBeamMode_->setAxisTitle("Luminosity Section", 1);
228  hBeamMode_->setBinLabel(1, "no mode", 2);
229  hBeamMode_->setBinLabel(2, "setup", 2);
230  hBeamMode_->setBinLabel(3, "inj pilot", 2);
231  hBeamMode_->setBinLabel(4, "inj intr", 2);
232  hBeamMode_->setBinLabel(5, "inj nomn", 2);
233  hBeamMode_->setBinLabel(6, "pre ramp", 2);
234  hBeamMode_->setBinLabel(7, "ramp", 2);
235  hBeamMode_->setBinLabel(8, "flat top", 2);
236  hBeamMode_->setBinLabel(9, "squeeze", 2);
237  hBeamMode_->setBinLabel(10, "adjust", 2);
238  hBeamMode_->setBinLabel(11, "stable", 2);
239  hBeamMode_->setBinLabel(12, "unstable", 2);
240  hBeamMode_->setBinLabel(13, "beam dump", 2);
241  hBeamMode_->setBinLabel(14, "ramp down", 2);
242  hBeamMode_->setBinLabel(15, "recovery", 2);
243  hBeamMode_->setBinLabel(16, "inj dump", 2);
244  hBeamMode_->setBinLabel(17, "circ dump", 2);
245  hBeamMode_->setBinLabel(18, "abort", 2);
246  hBeamMode_->setBinLabel(19, "cycling", 2);
247  hBeamMode_->setBinLabel(20, "warn b-dump", 2);
248  hBeamMode_->setBinLabel(21, "no beam", 2);
249 
250  // Element: intensity1
251  hIntensity1_ = iBooker.book1D("intensity1", "Intensity Beam 1", MAX_LUMIS, 1., MAX_LUMIS + 1);
252  hIntensity1_->setAxisTitle("Luminosity Section", 1);
253  hIntensity1_->setAxisTitle("N [E10]", 2);
254 
255  // Element: intensity2
256  hIntensity2_ = iBooker.book1D("intensity2", "Intensity Beam 2", MAX_LUMIS, 1., MAX_LUMIS + 1);
257  hIntensity2_->setAxisTitle("Luminosity Section", 1);
258  hIntensity2_->setAxisTitle("N [E10]", 2);
259 
260  // Element: lhcFill
261  hLhcFill_ = iBooker.book1D("lhcFill", "LHC Fill Number", MAX_LUMIS, 1., MAX_LUMIS + 1);
262  hLhcFill_->setAxisTitle("Luminosity Section", 1);
263 
264  // Element: momentum
265  hMomentum_ = iBooker.book1D("momentum", "Beam Energy [GeV]", MAX_LUMIS, 1., MAX_LUMIS + 1);
266  hMomentum_->setAxisTitle("Luminosity Section", 1);
267 }
MonitorElement * hBeamMode_
Definition: DQMProvInfo.cc:124
MonitorElement * hIntensity2_
Definition: DQMProvInfo.cc:127
MonitorElement * hMomentum_
Definition: DQMProvInfo.cc:129
static const int MAX_LUMIS
Definition: DQMProvInfo.cc:60
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * hLhcFill_
Definition: DQMProvInfo.cc:128
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hIntensity1_
Definition: DQMProvInfo.cc:126
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ bookHistogramsProvInfo()

void DQMProvInfo::bookHistogramsProvInfo ( DQMStore::IBooker iBooker)
private

Definition at line 319 of file DQMProvInfo.cc.

References dqm::implementation::IBooker::bookInt(), dqm::implementation::IBooker::bookString(), dqm::impl::MonitorElement::Fill(), edm::getReleaseVersion(), globalTag_, hHltKey_, hIsCollisionsRun_, hltKey_, hostName_, processId_, runType_, versCMSSW_, versGlobaltag_, versRuntype_, and workingDir_.

Referenced by bookHistograms().

319  {
320  // Note: Given that all these elements are only filled once per run, they
321  // are filled here right away. (except for isCollisionsRun)
322 
323  // Element: CMMSW
324  versCMSSW_ = iBooker.bookString("CMSSW", edm::getReleaseVersion().c_str());
325 
326  // Element: Globaltag
327  versGlobaltag_ = iBooker.bookString("Globaltag", globalTag_);
328 
329  // Element: RunType
330  versRuntype_ = iBooker.bookString("Run Type", runType_);
331 
332  // Element: hltKey
333  hHltKey_ = iBooker.bookString("hltKey", hltKey_);
334 
335  // Element: hostName
336  hostName_ = iBooker.bookString("hostName", gSystem->HostName());
337 
338  // Element: isCollisionsRun (filled for real in EndLumi)
339  hIsCollisionsRun_ = iBooker.bookInt("isCollisionsRun");
341 
342  // Element: processID
343  processId_ = iBooker.bookInt("processID");
344  processId_->Fill(gSystem->GetPid());
345 
346  // Element: workingDir
347  workingDir_ = iBooker.bookString("workingDir", gSystem->pwd());
348 }
MonitorElement * workingDir_
Definition: DQMProvInfo.cc:147
MonitorElement * processId_
Definition: DQMProvInfo.cc:146
MonitorElement * hHltKey_
Definition: DQMProvInfo.cc:142
MonitorElement * versGlobaltag_
Definition: DQMProvInfo.cc:137
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
void Fill(long long x)
std::string globalTag_
Definition: DQMProvInfo.cc:138
MonitorElement * versRuntype_
Definition: DQMProvInfo.cc:140
std::string getReleaseVersion()
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
MonitorElement * versCMSSW_
Definition: DQMProvInfo.cc:136
MonitorElement * hIsCollisionsRun_
Definition: DQMProvInfo.cc:145
std::string runType_
Definition: DQMProvInfo.cc:141
std::string hltKey_
Definition: DQMProvInfo.cc:143
MonitorElement * hostName_
Definition: DQMProvInfo.cc:144

◆ dqmBeginRun()

void DQMProvInfo::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 182 of file DQMProvInfo.cc.

References HltComparatorCreateWorkflow::hltConfig, and hltKey_.

182  {
183  // Here we do everything that needs to be done before the booking
184  // Getting the HLT key from HLTConfigProvider:
185  hltKey_ = "";
187  bool changed(true);
188  if (!hltConfig.init(iRun, iEventSetup, "HLT", changed)) {
189  edm::LogInfo("DQMProvInfo") << "errorHltConfigExtraction" << std::endl;
190  hltKey_ = "error extraction";
191  } else if (hltConfig.size() <= 0) {
192  edm::LogInfo("DQMProvInfo") << "hltConfig" << std::endl;
193  hltKey_ = "error key of length 0";
194  } else {
195  edm::LogInfo("DQMProvInfo") << "HLT key (run): " << hltConfig.tableName() << std::endl;
196  hltKey_ = hltConfig.tableName();
197  }
198 }
Log< level::Info, false > LogInfo
std::string hltKey_
Definition: DQMProvInfo.cc:143

◆ fillDcsBitsFromDCSRecord()

void DQMProvInfo::fillDcsBitsFromDCSRecord ( const DCSRecord dcsRecord,
bool *  dcsBits 
)
private

Definition at line 472 of file DQMProvInfo.cc.

References BPIX, RunInfoPI::CASTOR, DQMOffline_cff::dcsRecord, SectorBuilder_Fpix_cff::FPIX, DigiToRawDM_cff::HF, DigiToRawDM_cff::HO, RunInfoPI::RPC, DetStateFilter::TECm, DetStateFilter::TECp, DetStateFilter::TIBTID, SectorBuilder_Tob_cff::TOB, VBIN_BPIX, VBIN_CASTOR, VBIN_CSC_M, VBIN_CSC_P, VBIN_DT_0, VBIN_DT_M, VBIN_DT_P, VBIN_EB_M, VBIN_EB_P, VBIN_EE_M, VBIN_EE_P, VBIN_ES_M, VBIN_ES_P, VBIN_FPIX, VBIN_GEM_M, VBIN_GEM_P, VBIN_HBHE_A, VBIN_HBHE_B, VBIN_HBHE_C, VBIN_HF, VBIN_HO, VBIN_RPC, VBIN_TE_M, VBIN_TEC_P, VBIN_TIBTID, VBIN_TOB, VBIN_ZDC, and DigiToRawDM_cff::ZDC.

Referenced by analyzeEventInfo().

472  {
473  dcsBits[VBIN_CSC_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::CSCp);
474  dcsBits[VBIN_CSC_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::CSCm);
475  dcsBits[VBIN_DT_0] = dcsRecord.highVoltageReady(DCSRecord::Partition::DT0);
476  dcsBits[VBIN_DT_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::DTp);
477  dcsBits[VBIN_DT_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::DTm);
478  dcsBits[VBIN_EB_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::EBp);
479  dcsBits[VBIN_EB_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::EBm);
480  dcsBits[VBIN_EE_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::EEp);
481  dcsBits[VBIN_EE_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::EEm);
482  dcsBits[VBIN_ES_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::ESp);
483  dcsBits[VBIN_ES_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::ESm);
484  dcsBits[VBIN_HBHE_A] = dcsRecord.highVoltageReady(DCSRecord::Partition::HBHEa);
485  dcsBits[VBIN_HBHE_B] = dcsRecord.highVoltageReady(DCSRecord::Partition::HBHEb);
486  dcsBits[VBIN_HBHE_C] = dcsRecord.highVoltageReady(DCSRecord::Partition::HBHEc);
487  dcsBits[VBIN_HF] = dcsRecord.highVoltageReady(DCSRecord::Partition::HF);
488  dcsBits[VBIN_HO] = dcsRecord.highVoltageReady(DCSRecord::Partition::HO);
489  dcsBits[VBIN_BPIX] = dcsRecord.highVoltageReady(DCSRecord::Partition::BPIX);
490  dcsBits[VBIN_FPIX] = dcsRecord.highVoltageReady(DCSRecord::Partition::FPIX);
491  dcsBits[VBIN_RPC] = dcsRecord.highVoltageReady(DCSRecord::Partition::RPC);
492  dcsBits[VBIN_TIBTID] = dcsRecord.highVoltageReady(DCSRecord::Partition::TIBTID);
493  dcsBits[VBIN_TOB] = dcsRecord.highVoltageReady(DCSRecord::Partition::TOB);
494  dcsBits[VBIN_TEC_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::TECp);
495  dcsBits[VBIN_TE_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::TECm);
496  dcsBits[VBIN_CASTOR] = dcsRecord.highVoltageReady(DCSRecord::Partition::CASTOR);
497  dcsBits[VBIN_ZDC] = dcsRecord.highVoltageReady(DCSRecord::Partition::ZDC);
498  dcsBits[VBIN_GEM_P] = dcsRecord.highVoltageReady(DCSRecord::Partition::GEMp);
499  dcsBits[VBIN_GEM_M] = dcsRecord.highVoltageReady(DCSRecord::Partition::GEMm);
500 }
static const int VBIN_GEM_P
Definition: DQMProvInfo.cc:88
static const int VBIN_EE_P
Definition: DQMProvInfo.cc:70
static const int VBIN_GEM_M
Definition: DQMProvInfo.cc:89
static const int VBIN_CASTOR
Definition: DQMProvInfo.cc:86
static const int VBIN_HBHE_B
Definition: DQMProvInfo.cc:75
static const int VBIN_EE_M
Definition: DQMProvInfo.cc:71
static const int VBIN_HBHE_C
Definition: DQMProvInfo.cc:76
static const int VBIN_HO
Definition: DQMProvInfo.cc:78
static const int VBIN_DT_0
Definition: DQMProvInfo.cc:65
static const int VBIN_TEC_P
Definition: DQMProvInfo.cc:84
static const int VBIN_CSC_M
Definition: DQMProvInfo.cc:64
static const int VBIN_TOB
Definition: DQMProvInfo.cc:83
static const int VBIN_FPIX
Definition: DQMProvInfo.cc:80
static const int VBIN_DT_M
Definition: DQMProvInfo.cc:67
#define BPIX
static const int VBIN_TIBTID
Definition: DQMProvInfo.cc:82
static const int VBIN_EB_P
Definition: DQMProvInfo.cc:68
static const int VBIN_BPIX
Definition: DQMProvInfo.cc:79
static const int VBIN_TE_M
Definition: DQMProvInfo.cc:85
static const int VBIN_RPC
Definition: DQMProvInfo.cc:81
static const int VBIN_ZDC
Definition: DQMProvInfo.cc:87
static const int VBIN_ES_P
Definition: DQMProvInfo.cc:72
static const int VBIN_CSC_P
Definition: DQMProvInfo.cc:63
static const int VBIN_DT_P
Definition: DQMProvInfo.cc:66
static const int VBIN_ES_M
Definition: DQMProvInfo.cc:73
static const int VBIN_HF
Definition: DQMProvInfo.cc:77
static const int VBIN_HBHE_A
Definition: DQMProvInfo.cc:74
static const int VBIN_EB_M
Definition: DQMProvInfo.cc:69

◆ fillDcsBitsFromDcsStatusCollection()

void DQMProvInfo::fillDcsBitsFromDcsStatusCollection ( const edm::Handle< DcsStatusCollection > &  dcsStatusCollection,
bool *  dcsBits 
)
private

Definition at line 502 of file DQMProvInfo.cc.

References DcsStatus::BPIX, DcsStatus::CASTOR, DcsStatus::CSCm, DcsStatus::CSCp, TauDecayModes::dec, DcsStatus::DT0, DcsStatus::DTm, DcsStatus::DTp, DcsStatus::EBm, DcsStatus::EBp, DcsStatus::EEm, DcsStatus::EEp, DcsStatus::ESm, DcsStatus::ESp, first, DcsStatus::FPIX, DcsStatus::HBHEa, DcsStatus::HBHEb, DcsStatus::HBHEc, DcsStatus::HF, DcsStatus::HO, MAX_DCS_VBINS, DcsStatus::RPC, DcsStatus::TECm, DcsStatus::TECp, DcsStatus::TIBTID, DcsStatus::TOB, VBIN_BPIX, VBIN_CASTOR, VBIN_CSC_M, VBIN_CSC_P, VBIN_DT_0, VBIN_DT_M, VBIN_DT_P, VBIN_EB_M, VBIN_EB_P, VBIN_EE_M, VBIN_EE_P, VBIN_ES_M, VBIN_ES_P, VBIN_FPIX, VBIN_HBHE_A, VBIN_HBHE_B, VBIN_HBHE_C, VBIN_HF, VBIN_HO, VBIN_RPC, VBIN_TE_M, VBIN_TEC_P, VBIN_TIBTID, VBIN_TOB, VBIN_ZDC, and DcsStatus::ZDC.

Referenced by analyzeEventInfo().

503  {
504  // Loop over the DCSStatus entries in the DcsStatusCollection
505  // (Typically there is only one)
506  bool first = true;
507  for (auto const& dcsStatusItr : *dcsStatusCollection) {
508  // By default all the bits are false. We put all the bits on true only
509  // for the first DCSStatus that we encounter:
510  if (first) {
511  for (int vbin = 1; vbin <= MAX_DCS_VBINS; vbin++) {
512  dcsBits[vbin] = true;
513  }
514  first = false;
515  }
516  dcsBits[VBIN_CSC_P] &= dcsStatusItr.ready(DcsStatus::CSCp);
517  dcsBits[VBIN_CSC_M] &= dcsStatusItr.ready(DcsStatus::CSCm);
518  dcsBits[VBIN_DT_0] &= dcsStatusItr.ready(DcsStatus::DT0);
519  dcsBits[VBIN_DT_P] &= dcsStatusItr.ready(DcsStatus::DTp);
520  dcsBits[VBIN_DT_M] &= dcsStatusItr.ready(DcsStatus::DTm);
521  dcsBits[VBIN_EB_P] &= dcsStatusItr.ready(DcsStatus::EBp);
522  dcsBits[VBIN_EB_M] &= dcsStatusItr.ready(DcsStatus::EBm);
523  dcsBits[VBIN_EE_P] &= dcsStatusItr.ready(DcsStatus::EEp);
524  dcsBits[VBIN_EE_M] &= dcsStatusItr.ready(DcsStatus::EEm);
525  dcsBits[VBIN_ES_P] &= dcsStatusItr.ready(DcsStatus::ESp);
526  dcsBits[VBIN_ES_M] &= dcsStatusItr.ready(DcsStatus::ESm);
527  dcsBits[VBIN_HBHE_A] &= dcsStatusItr.ready(DcsStatus::HBHEa);
528  dcsBits[VBIN_HBHE_B] &= dcsStatusItr.ready(DcsStatus::HBHEb);
529  dcsBits[VBIN_HBHE_C] &= dcsStatusItr.ready(DcsStatus::HBHEc);
530  dcsBits[VBIN_HF] &= dcsStatusItr.ready(DcsStatus::HF);
531  dcsBits[VBIN_HO] &= dcsStatusItr.ready(DcsStatus::HO);
532  dcsBits[VBIN_BPIX] &= dcsStatusItr.ready(DcsStatus::BPIX);
533  dcsBits[VBIN_FPIX] &= dcsStatusItr.ready(DcsStatus::FPIX);
534  dcsBits[VBIN_RPC] &= dcsStatusItr.ready(DcsStatus::RPC);
535  dcsBits[VBIN_TIBTID] &= dcsStatusItr.ready(DcsStatus::TIBTID);
536  dcsBits[VBIN_TOB] &= dcsStatusItr.ready(DcsStatus::TOB);
537  dcsBits[VBIN_TEC_P] &= dcsStatusItr.ready(DcsStatus::TECp);
538  dcsBits[VBIN_TE_M] &= dcsStatusItr.ready(DcsStatus::TECm);
539  dcsBits[VBIN_CASTOR] &= dcsStatusItr.ready(DcsStatus::CASTOR);
540  dcsBits[VBIN_ZDC] &= dcsStatusItr.ready(DcsStatus::ZDC);
541  //dcsBits[VBIN_GEM_P] &= dcsStatusItr.ready(DcsStatus::GEMp); // GEMp and GEMm are not implemented
542  //dcsBits[VBIN_GEM_M] &= dcsStatusItr.ready(DcsStatus::GEMm);
543 
544  // Some info-level logging
545  edm::LogInfo("DQMProvInfo") << "DCS status: 0x" << std::hex << dcsStatusItr.ready() << std::dec << std::endl;
546  }
547 }
static const int VBIN_EE_P
Definition: DQMProvInfo.cc:70
static const int VBIN_CASTOR
Definition: DQMProvInfo.cc:86
static const int VBIN_HBHE_B
Definition: DQMProvInfo.cc:75
static const int VBIN_EE_M
Definition: DQMProvInfo.cc:71
static const int VBIN_HBHE_C
Definition: DQMProvInfo.cc:76
static const int VBIN_HO
Definition: DQMProvInfo.cc:78
static const int VBIN_DT_0
Definition: DQMProvInfo.cc:65
static const int VBIN_TEC_P
Definition: DQMProvInfo.cc:84
static const int VBIN_CSC_M
Definition: DQMProvInfo.cc:64
static const int VBIN_TOB
Definition: DQMProvInfo.cc:83
static const int VBIN_FPIX
Definition: DQMProvInfo.cc:80
static const int VBIN_DT_M
Definition: DQMProvInfo.cc:67
Log< level::Info, false > LogInfo
static const int VBIN_TIBTID
Definition: DQMProvInfo.cc:82
static const int VBIN_EB_P
Definition: DQMProvInfo.cc:68
static const int VBIN_BPIX
Definition: DQMProvInfo.cc:79
static const int VBIN_TE_M
Definition: DQMProvInfo.cc:85
static const int VBIN_RPC
Definition: DQMProvInfo.cc:81
static const int MAX_DCS_VBINS
Definition: DQMProvInfo.cc:94
static const int VBIN_ZDC
Definition: DQMProvInfo.cc:87
static const int VBIN_ES_P
Definition: DQMProvInfo.cc:72
static const int VBIN_CSC_P
Definition: DQMProvInfo.cc:63
static const int VBIN_DT_P
Definition: DQMProvInfo.cc:66
static const int VBIN_ES_M
Definition: DQMProvInfo.cc:73
static const int VBIN_HF
Definition: DQMProvInfo.cc:77
static const int VBIN_HBHE_A
Definition: DQMProvInfo.cc:74
static const int VBIN_EB_M
Definition: DQMProvInfo.cc:69

◆ fillSummaryMapBin()

void DQMProvInfo::fillSummaryMapBin ( int  ls,
int  bin,
double  value 
)
private

Definition at line 575 of file DQMProvInfo.cc.

References newFWLiteAna::bin, dqm::impl::MonitorElement::getBinContent(), eostools::ls(), reportSummaryMap_, and dqm::impl::MonitorElement::setBinContent().

Referenced by analyzeEventInfo(), and analyzeLhcInfo().

575  {
576  // All lumis are initialized as -1 (white).
577  // We'll set them to red (0) whenever we see a 0 -- else, the value should be
578  // green (1).
579  // This need to be atomic, DQMOneEDAnalyzer for this reason.
580  double current = reportSummaryMap_->getBinContent(ls, bin);
581  if (current == -1) {
583  } else if (value < current) {
585  } // else: ignore, keep min value.
586 }
Definition: value.py:1
def ls(path, rec=False)
Definition: eostools.py:349
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * reportSummaryMap_
Definition: DQMProvInfo.cc:133
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ isPhysicsDeclared()

bool DQMProvInfo::isPhysicsDeclared ( bool *  dcsBits)
private

Definition at line 549 of file DQMProvInfo.cc.

References beamMode_, VBIN_BPIX, VBIN_CSC_M, VBIN_CSC_P, VBIN_DT_0, VBIN_DT_M, VBIN_DT_P, VBIN_FPIX, VBIN_GEM_M, VBIN_GEM_P, VBIN_RPC, VBIN_TE_M, VBIN_TEC_P, VBIN_TIBTID, and VBIN_TOB.

Referenced by analyzeEventInfo().

549  {
550  // Compute the PhysicsDeclared bit from the event
551  // The bit is set to to true if:
552  // - the LHC is in stable beams
553  // - all the pixel and strips partitions have DCSStatus ON
554  // - at least one muon partition has DCSStatus ON
555  // Basically: we do an AND of the physicsDeclared of ALL events.
556  // As soon as one value is not "1", physicsDeclared_ becomes false.
557  return (beamMode_ == 11) &&
558  (dcsBits[VBIN_BPIX] && dcsBits[VBIN_FPIX] && dcsBits[VBIN_TIBTID] && dcsBits[VBIN_TOB] &&
559  dcsBits[VBIN_TEC_P] && dcsBits[VBIN_TE_M]) &&
560  (dcsBits[VBIN_CSC_P] || dcsBits[VBIN_CSC_M] || dcsBits[VBIN_DT_0] || dcsBits[VBIN_DT_P] ||
561  dcsBits[VBIN_DT_M] || dcsBits[VBIN_RPC] || dcsBits[VBIN_GEM_P] || dcsBits[VBIN_GEM_M]);
562 }
static const int VBIN_GEM_P
Definition: DQMProvInfo.cc:88
static const int VBIN_GEM_M
Definition: DQMProvInfo.cc:89
static const int VBIN_DT_0
Definition: DQMProvInfo.cc:65
static const int VBIN_TEC_P
Definition: DQMProvInfo.cc:84
static const int VBIN_CSC_M
Definition: DQMProvInfo.cc:64
static const int VBIN_TOB
Definition: DQMProvInfo.cc:83
static const int VBIN_FPIX
Definition: DQMProvInfo.cc:80
static const int VBIN_DT_M
Definition: DQMProvInfo.cc:67
static const int VBIN_TIBTID
Definition: DQMProvInfo.cc:82
static const int VBIN_BPIX
Definition: DQMProvInfo.cc:79
static const int VBIN_TE_M
Definition: DQMProvInfo.cc:85
static const int VBIN_RPC
Definition: DQMProvInfo.cc:81
static const int VBIN_CSC_P
Definition: DQMProvInfo.cc:63
static const int VBIN_DT_P
Definition: DQMProvInfo.cc:66

◆ setupLumiSection()

void DQMProvInfo::setupLumiSection ( int  ls)
private

Definition at line 588 of file DQMProvInfo.cc.

References dqm::impl::MonitorElement::getBinContent(), eostools::ls(), reportSummaryMap_, dqm::impl::MonitorElement::setBinContent(), and VBIN_VALID.

Referenced by analyze().

588  {
589  if (reportSummaryMap_->getBinContent(currentLSNumber, VBIN_VALID) < 1.) {
590  reportSummaryMap_->setBinContent(currentLSNumber, VBIN_VALID, 1.);
591 
592  // Mark all lower LS as invalid, if they are not set valid yet.
593  // This is a hint for the render plugin to show the correct range.
594  for (int ls = 1; ls < currentLSNumber; ls++) {
597  }
598  }
599  }
600 }
static const int VBIN_VALID
Definition: DQMProvInfo.cc:99
def ls(path, rec=False)
Definition: eostools.py:349
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * reportSummaryMap_
Definition: DQMProvInfo.cc:133
virtual double getBinContent(int binx) const
get content of bin (1-D)

Member Data Documentation

◆ beamMode_

int DQMProvInfo::beamMode_
private

Definition at line 125 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and isPhysicsDeclared().

◆ dcsRecordToken_

edm::EDGetTokenT<DCSRecord> DQMProvInfo::dcsRecordToken_
private

Definition at line 121 of file DQMProvInfo.cc.

Referenced by analyzeEventInfo(), and DQMProvInfo().

◆ dcsStatusCollection_

edm::EDGetTokenT<DcsStatusCollection> DQMProvInfo::dcsStatusCollection_
private

Definition at line 119 of file DQMProvInfo.cc.

Referenced by analyzeEventInfo(), and DQMProvInfo().

◆ globalTag_

std::string DQMProvInfo::globalTag_
private

Definition at line 138 of file DQMProvInfo.cc.

Referenced by analyzeProvInfo(), bookHistogramsProvInfo(), and DQMProvInfo().

◆ globalTagRetrieved_

bool DQMProvInfo::globalTagRetrieved_
private

Definition at line 139 of file DQMProvInfo.cc.

Referenced by analyzeProvInfo(), and DQMProvInfo().

◆ hBeamMode_

MonitorElement* DQMProvInfo::hBeamMode_
private

Definition at line 124 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsLhcInfo().

◆ hHltKey_

MonitorElement* DQMProvInfo::hHltKey_
private

Definition at line 142 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().

◆ hIntensity1_

MonitorElement* DQMProvInfo::hIntensity1_
private

Definition at line 126 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsLhcInfo().

◆ hIntensity2_

MonitorElement* DQMProvInfo::hIntensity2_
private

Definition at line 127 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsLhcInfo().

◆ hIsCollisionsRun_

MonitorElement* DQMProvInfo::hIsCollisionsRun_
private

Definition at line 145 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsProvInfo().

◆ hLhcFill_

MonitorElement* DQMProvInfo::hLhcFill_
private

Definition at line 128 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsLhcInfo().

◆ hltKey_

std::string DQMProvInfo::hltKey_
private

Definition at line 143 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo(), and dqmBeginRun().

◆ hMomentum_

MonitorElement* DQMProvInfo::hMomentum_
private

Definition at line 129 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsLhcInfo().

◆ hostName_

MonitorElement* DQMProvInfo::hostName_
private

Definition at line 144 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().

◆ MAX_DCS_VBINS

const int DQMProvInfo::MAX_DCS_VBINS = 27
staticprivate

Definition at line 94 of file DQMProvInfo.cc.

Referenced by analyzeEventInfo(), and fillDcsBitsFromDcsStatusCollection().

◆ MAX_LUMIS

const int DQMProvInfo::MAX_LUMIS = 6000
staticprivate

◆ MAX_MOMENTUM

const int DQMProvInfo::MAX_MOMENTUM = 6500
staticprivate

Definition at line 105 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo().

◆ MAX_VBINS

const int DQMProvInfo::MAX_VBINS = 31
staticprivate

Definition at line 101 of file DQMProvInfo.cc.

Referenced by blankAllLumiSections(), and bookHistogramsEventInfo().

◆ MOMENTUM_OFFSET

const int DQMProvInfo::MOMENTUM_OFFSET = 1
staticprivate

Definition at line 113 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo().

◆ processId_

MonitorElement* DQMProvInfo::processId_
private

Definition at line 146 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().

◆ provinfofolder_

std::string DQMProvInfo::provinfofolder_
private

Definition at line 117 of file DQMProvInfo.cc.

Referenced by bookHistograms(), and DQMProvInfo().

◆ reportSummary_

MonitorElement* DQMProvInfo::reportSummary_
private

Definition at line 132 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsEventInfo().

◆ reportSummaryMap_

MonitorElement* DQMProvInfo::reportSummaryMap_
private

◆ runType_

std::string DQMProvInfo::runType_
private

Definition at line 141 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo(), and DQMProvInfo().

◆ subsystemname_

std::string DQMProvInfo::subsystemname_
private

Definition at line 116 of file DQMProvInfo.cc.

Referenced by bookHistograms(), and DQMProvInfo().

◆ tcdsrecord_

edm::EDGetTokenT<TCDSRecord> DQMProvInfo::tcdsrecord_
private

Definition at line 120 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and DQMProvInfo().

◆ VBIN_BPIX

const int DQMProvInfo::VBIN_BPIX = 17
staticprivate

◆ VBIN_CASTOR

const int DQMProvInfo::VBIN_CASTOR = 24
staticprivate

◆ VBIN_CSC_M

const int DQMProvInfo::VBIN_CSC_M = 2
staticprivate

◆ VBIN_CSC_P

const int DQMProvInfo::VBIN_CSC_P = 1
staticprivate

◆ VBIN_DT_0

const int DQMProvInfo::VBIN_DT_0 = 3
staticprivate

◆ VBIN_DT_M

const int DQMProvInfo::VBIN_DT_M = 5
staticprivate

◆ VBIN_DT_P

const int DQMProvInfo::VBIN_DT_P = 4
staticprivate

◆ VBIN_EB_M

const int DQMProvInfo::VBIN_EB_M = 7
staticprivate

◆ VBIN_EB_P

const int DQMProvInfo::VBIN_EB_P = 6
staticprivate

◆ VBIN_EE_M

const int DQMProvInfo::VBIN_EE_M = 9
staticprivate

◆ VBIN_EE_P

const int DQMProvInfo::VBIN_EE_P = 8
staticprivate

◆ VBIN_ES_M

const int DQMProvInfo::VBIN_ES_M = 11
staticprivate

◆ VBIN_ES_P

const int DQMProvInfo::VBIN_ES_P = 10
staticprivate

◆ VBIN_FPIX

const int DQMProvInfo::VBIN_FPIX = 18
staticprivate

◆ VBIN_GEM_M

const int DQMProvInfo::VBIN_GEM_M = 27
staticprivate

◆ VBIN_GEM_P

const int DQMProvInfo::VBIN_GEM_P = 26
staticprivate

◆ VBIN_HBHE_A

const int DQMProvInfo::VBIN_HBHE_A = 12
staticprivate

◆ VBIN_HBHE_B

const int DQMProvInfo::VBIN_HBHE_B = 13
staticprivate

◆ VBIN_HBHE_C

const int DQMProvInfo::VBIN_HBHE_C = 14
staticprivate

◆ VBIN_HF

const int DQMProvInfo::VBIN_HF = 15
staticprivate

◆ VBIN_HO

const int DQMProvInfo::VBIN_HO = 16
staticprivate

◆ VBIN_MOMENTUM

const int DQMProvInfo::VBIN_MOMENTUM = 29
staticprivate

Definition at line 97 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsEventInfo().

◆ VBIN_PHYSICS_DECLARED

const int DQMProvInfo::VBIN_PHYSICS_DECLARED = 28
staticprivate

Definition at line 96 of file DQMProvInfo.cc.

Referenced by analyzeEventInfo(), and bookHistogramsEventInfo().

◆ VBIN_RPC

const int DQMProvInfo::VBIN_RPC = 19
staticprivate

◆ VBIN_STABLE_BEAM

const int DQMProvInfo::VBIN_STABLE_BEAM = 30
staticprivate

Definition at line 98 of file DQMProvInfo.cc.

Referenced by analyzeLhcInfo(), and bookHistogramsEventInfo().

◆ VBIN_TE_M

const int DQMProvInfo::VBIN_TE_M = 23
staticprivate

◆ VBIN_TEC_P

const int DQMProvInfo::VBIN_TEC_P = 22
staticprivate

◆ VBIN_TIBTID

const int DQMProvInfo::VBIN_TIBTID = 20
staticprivate

◆ VBIN_TOB

const int DQMProvInfo::VBIN_TOB = 21
staticprivate

◆ VBIN_VALID

const int DQMProvInfo::VBIN_VALID = 31
staticprivate

Definition at line 99 of file DQMProvInfo.cc.

Referenced by bookHistogramsEventInfo(), and setupLumiSection().

◆ VBIN_ZDC

const int DQMProvInfo::VBIN_ZDC = 25
staticprivate

◆ versCMSSW_

MonitorElement* DQMProvInfo::versCMSSW_
private

Definition at line 136 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().

◆ versGlobaltag_

MonitorElement* DQMProvInfo::versGlobaltag_
private

Definition at line 137 of file DQMProvInfo.cc.

Referenced by analyzeProvInfo(), and bookHistogramsProvInfo().

◆ versRuntype_

MonitorElement* DQMProvInfo::versRuntype_
private

Definition at line 140 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().

◆ workingDir_

MonitorElement* DQMProvInfo::workingDir_
private

Definition at line 147 of file DQMProvInfo.cc.

Referenced by bookHistogramsProvInfo().