CMS 3D CMS Logo

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

#include <L1TBPTX.h>

Inheritance diagram for L1TBPTX:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

enum  BeamMode {
  NOMODE = 1, SETUP = 2, INJPILOT = 3, INJINTR = 4,
  INJNOMN = 5, PRERAMP = 6, RAMP = 7, FLATTOP = 8,
  SQUEEZE = 9, ADJUST = 10, STABLE = 11, UNSTABLE = 12,
  BEAMDUMP = 13, RAMPDOWN = 14, RECOVERY = 15, INJDUMP = 16,
  CIRCDUMP = 17, ABORT = 18, CYCLING = 19, WBDUMP = 20,
  NOBEAM = 21
}
 
enum  Errors {
  UNKNOWN = 1, WARNING_DB_CONN_FAILED = 2, WARNING_DB_QUERY_FAILED = 3, WARNING_DB_INCORRECT_NBUNCHES = 4,
  ERROR_UNABLE_RETRIVE_PRODUCT = 5, ERROR_TRIGGERALIAS_NOTVALID = 6, ERROR_LSBLOCK_NOTVALID = 7
}
 
- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
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
 

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
 
void bookHistograms (DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
 BeginRun. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
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)
 

Private Member Functions

void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs, float iValue)
 
void doFractionInSync (bool iForce=false, bool iBad=false)
 
void getBeamConfOMDS ()
 

Private Attributes

edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcdl1gtMenuToken_
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcdl1GtPfAlgoToken_
 
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcdl1GtPfTechToken_
 
std::map< int, TString > m_algoBit_Alias
 
BeamConfiguration m_beamConfig
 
unsigned int m_currentGTLS
 
unsigned int m_currentLS
 
bool m_currentLSValid
 
int m_currentPrescalesIndex
 
std::map< TString, int > m_effDenominator
 
std::map< TString, int > m_effNumerator
 
MonitorElementm_ErrorMonitor
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordm_l1GtDataDaqInputTag
 
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecordm_l1GtEvmSource
 
std::map< std::pair< bool, int >, double > m_l1Rate
 
unsigned int m_lhcFill
 
std::map< TString, MonitorElement * > m_meAlgoEfficiency
 
std::map< TString, MonitorElement * > m_meAlgoMissFire
 
std::map< std::pair< bool, int >, MonitorElement * > m_meRate
 
std::map< TString, MonitorElement * > m_meTechEfficiency
 
std::map< TString, MonitorElement * > m_meTechMissFire
 
std::map< TString, int > m_missFireDenominator
 
std::map< TString, int > m_missFireNumerator
 
std::vector< edm::ParameterSetm_monitorBits
 
std::vector< edm::ParameterSetm_monitorRates
 
std::string m_outputFile
 
edm::ParameterSet m_parameters
 
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
 
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
 
bool * m_processedLS
 
int m_refPrescaleSet
 
edm::EDGetTokenT< Level1TriggerScalersCollectionm_scalersSource
 
std::vector< std::pair< int, int > > m_selAlgoBit
 
std::vector< std::pair< int, int > > m_selTechBit
 
std::map< int, TString > m_techBit_Alias
 
bool m_verbose
 

Additional Inherited Members

- 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::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 75 of file L1TBPTX.h.

Member Enumeration Documentation

◆ BeamMode

Enumerator
NOMODE 
SETUP 
INJPILOT 
INJINTR 
INJNOMN 
PRERAMP 
RAMP 
FLATTOP 
SQUEEZE 
ADJUST 
STABLE 
UNSTABLE 
BEAMDUMP 
RAMPDOWN 
RECOVERY 
INJDUMP 
CIRCDUMP 
ABORT 
CYCLING 
WBDUMP 
NOBEAM 

Definition at line 77 of file L1TBPTX.h.

77  {
78  NOMODE = 1,
79  SETUP = 2,
80  INJPILOT = 3,
81  INJINTR = 4,
82  INJNOMN = 5,
83  PRERAMP = 6,
84  RAMP = 7,
85  FLATTOP = 8,
86  SQUEEZE = 9,
87  ADJUST = 10,
88  STABLE = 11,
89  UNSTABLE = 12,
90  BEAMDUMP = 13,
91  RAMPDOWN = 14,
92  RECOVERY = 15,
93  INJDUMP = 16,
94  CIRCDUMP = 17,
95  ABORT = 18,
96  CYCLING = 19,
97  WBDUMP = 20,
98  NOBEAM = 21
99  };

◆ Errors

Enumerator
UNKNOWN 
WARNING_DB_CONN_FAILED 
WARNING_DB_QUERY_FAILED 
WARNING_DB_INCORRECT_NBUNCHES 
ERROR_UNABLE_RETRIVE_PRODUCT 
ERROR_TRIGGERALIAS_NOTVALID 
ERROR_LSBLOCK_NOTVALID 

Definition at line 101 of file L1TBPTX.h.

Constructor & Destructor Documentation

◆ L1TBPTX()

L1TBPTX::L1TBPTX ( const edm::ParameterSet ps)

Definition at line 33 of file L1TBPTX.cc.

References triggerObjects_cff::bit, mps_fire::i, hltrates_dqm_sourceclient-live_cfg::offset, and muonDTDigis_cfi::pset.

33  {
35 
36  // Mapping parameter input variables
37  m_scalersSource = consumes<Level1TriggerScalersCollection>(pset.getParameter<InputTag>("inputTagScalersResults"));
38  m_l1GtDataDaqInputTag = consumes<L1GlobalTriggerReadoutRecord>(pset.getParameter<InputTag>("inputTagL1GtDataDaq"));
39  m_l1GtEvmSource = consumes<L1GlobalTriggerEvmReadoutRecord>(pset.getParameter<InputTag>("inputTagtEvmSource"));
40  l1gtMenuToken_ = esConsumes<edm::Transition::BeginRun>();
41  l1GtPfAlgoToken_ = esConsumes<edm::Transition::BeginRun>();
42  l1GtPfTechToken_ = esConsumes<edm::Transition::BeginRun>();
43  m_verbose = pset.getUntrackedParameter<bool>("verbose", false);
44  // m_refPrescaleSet = pset.getParameter <int> ("refPrescaleSet");
45 
46  m_monitorBits = pset.getParameter<vector<ParameterSet> >("MonitorBits");
47 
48  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
49  // Algorithms
50  if (m_monitorBits[i].getParameter<bool>("bitType")) {
51  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
52  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
53  m_selAlgoBit.push_back(pair<int, int>(bit, offset));
54  }
55  // Tech
56  else {
57  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
58  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
59  m_selTechBit.push_back(pair<int, int>(bit, offset));
60  }
61  }
62 
63  m_monitorRates = pset.getParameter<vector<ParameterSet> >("MonitorRates");
64 }
std::vector< std::pair< int, int > > m_selAlgoBit
Definition: L1TBPTX.h:156
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TBPTX.h:181
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TBPTX.h:180
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > l1GtPfTechToken_
Definition: L1TBPTX.h:184
bool m_verbose
Definition: L1TBPTX.h:137
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > l1gtMenuToken_
Definition: L1TBPTX.h:182
edm::ParameterSet m_parameters
Definition: L1TBPTX.h:131
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > l1GtPfAlgoToken_
Definition: L1TBPTX.h:183
std::vector< edm::ParameterSet > m_monitorRates
Definition: L1TBPTX.h:133
std::vector< edm::ParameterSet > m_monitorBits
Definition: L1TBPTX.h:132
std::vector< std::pair< int, int > > m_selTechBit
Definition: L1TBPTX.h:157
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource
Definition: L1TBPTX.h:179

◆ ~L1TBPTX()

L1TBPTX::~L1TBPTX ( )
override

Definition at line 68 of file L1TBPTX.cc.

68 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 325 of file L1TBPTX.cc.

References a, L1GtfeExtWord::beamMode(), triggerObjects_cff::bit, gather_cfg::cout, L1GlobalTriggerReadoutRecord::gtFdlVector(), L1GlobalTriggerEvmReadoutRecord::gtfeWord(), mps_fire::i, iEvent, edm::HandleBase::isValid(), L1GtfeExtWord::lhcFillNumber(), hltrates_dqm_sourceclient-live_cfg::offset, to_string(), and PDWG_DiPhoton_SD_cff::triggerName.

325  {
326  if (m_verbose) {
327  cout << "[L1TBPTX] Called analyze." << endl;
328  }
329 
330  // We only start analyzing if current LS is still valid
331  if (m_currentLSValid) {
332  if (m_verbose) {
333  cout << "[L1TBPTX] -> m_currentLSValid=" << m_currentLSValid << endl;
334  }
335 
336  // Retriving information from GT
338  iEvent.getByToken(m_l1GtEvmSource, gtEvmReadoutRecord);
339 
340  // Determining beam mode and fill number
341  if (gtEvmReadoutRecord.isValid()) {
342  const L1GtfeExtWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
343  unsigned int lhcBeamMode = gtfeEvmWord.beamMode(); // Updating beam mode
344 
345  if (m_verbose) {
346  cout << "[L1TBPTX] Beam mode: " << lhcBeamMode << endl;
347  }
348 
349  if (lhcBeamMode == RAMP || lhcBeamMode == FLATTOP || lhcBeamMode == SQUEEZE || lhcBeamMode == ADJUST ||
350  lhcBeamMode == STABLE) {
351  if (m_lhcFill == 0) {
352  if (m_verbose) {
353  cout << "[L1TBPTX] No valid bunch structure yet retrived. Attemptting to retrive..." << endl;
354  }
355 
356  m_lhcFill = gtfeEvmWord.lhcFillNumber(); // Getting LHC Fill Number from GT
357 
358  getBeamConfOMDS(); // Getting Beam Configuration from OMDS
359 
360  // We are between RAMP and STABLE so there should be some colliding bunches
361  // in the machine. If 0 colliding bunched are found might be due to a delay
362  // of the update of the database. So we declare this LS as invalid and try
363  // again on the next one.
364  if (m_beamConfig.nCollidingBunches <= 0) {
365  m_lhcFill = 0;
366  m_currentLSValid = false;
367  }
368  }
369  } else {
370  m_currentLSValid = false;
371  }
372 
373  } else {
374  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT);
375  eCount++;
376  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT, eCount);
377  }
378  }
379 
380  //______________________________________________________________________________
381  // If current LS is valid and Beam Configuration is Valid we analyse this event
382  //______________________________________________________________________________
384  if (m_verbose) {
385  cout << "Current event in valid LS and beam config" << endl;
386  }
387 
388  // Getting Final Decision Logic (FDL) Data from GT
389  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
390  iEvent.getByToken(m_l1GtDataDaqInputTag, gtReadoutRecordData);
391 
392  if (gtReadoutRecordData.isValid()) {
393  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
394 
395  // Getting the index for the fdl data for this event
396  int eventFDL = 0;
397  for (unsigned int i = 0; i < gtFdlVectorData.size(); i++) {
398  if (gtFdlVectorData[i].bxInEvent() == 0) {
399  eventFDL = i;
400  break;
401  }
402  }
403 
404  m_currentPrescalesIndex = gtFdlVectorData[eventFDL].gtPrescaleFactorIndexAlgo();
405 
406  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
407  TString triggerName = "";
408  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
409  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
410  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
411 
412  if (isAlgo) {
413  triggerName = "algo_" + std::to_string(bit);
414  } else {
415  triggerName = "tech_" + std::to_string(bit);
416  }
417 
418  for (unsigned a = 0; a < gtFdlVectorData.size(); a++) {
419  int testBx = gtFdlVectorData[a].localBxNr() - offset;
420  bool lhcBxFilled = m_beamConfig.beam1[testBx] && m_beamConfig.beam2[testBx];
421  bool algoFired = false;
422 
423  if (isAlgo) {
424  if (gtFdlVectorData[a].gtDecisionWord()[bit])
425  algoFired = true;
426 
427  } else {
428  if (gtFdlVectorData[a].gtTechnicalTriggerWord()[bit])
429  algoFired = true;
430  }
431 
432  if (lhcBxFilled) {
434  if (algoFired)
436  }
437  if (algoFired) {
439  if (!lhcBxFilled)
441  }
442  }
443  }
444  }
445  }
446 
447  //______________________________________________________________________________
448  // Rate calculation
449  //______________________________________________________________________________
451  iEvent.getByToken(m_scalersSource, triggerScalers);
452 
453  if (triggerScalers.isValid()) {
454  Level1TriggerScalersCollection::const_iterator itL1TScalers = triggerScalers->begin();
455  Level1TriggerRates trigRates(*itL1TScalers, iEvent.id().run());
456 
457  m_currentGTLS = (*itL1TScalers).lumiSegmentNr();
458 
459  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
460  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
461  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
462 
463  pair<bool, int> refTrig = pair<bool, int>(isAlgo, bit);
464 
465  if (isAlgo) {
466  m_l1Rate[refTrig] = trigRates.gtAlgoCountsRate()[bit];
467  } else {
468  m_l1Rate[refTrig] = trigRates.gtTechCountsRate()[bit];
469  }
470  }
471  }
472 }
const cms_uint16_t beamMode() const
unsigned int m_lhcFill
Definition: L1TBPTX.h:152
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TBPTX.h:181
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TBPTX.h:180
std::map< TString, int > m_missFireDenominator
Definition: L1TBPTX.h:145
BeamConfiguration m_beamConfig
Definition: L1TBPTX.h:155
static std::string to_string(const XMLCh *ch)
std::map< std::pair< bool, int >, double > m_l1Rate
Definition: L1TBPTX.h:173
int iEvent
Definition: GenABIO.cc:224
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
std::map< TString, int > m_missFireNumerator
Definition: L1TBPTX.h:144
const cms_uint32_t lhcFillNumber() const
bool m_verbose
Definition: L1TBPTX.h:137
int m_currentPrescalesIndex
Definition: L1TBPTX.h:148
std::vector< edm::ParameterSet > m_monitorRates
Definition: L1TBPTX.h:133
bool m_currentLSValid
Definition: L1TBPTX.h:138
bool isValid() const
Definition: HandleBase.h:70
std::vector< edm::ParameterSet > m_monitorBits
Definition: L1TBPTX.h:132
unsigned int m_currentGTLS
Definition: L1TBPTX.h:150
double a
Definition: hdecay.h:121
std::vector< bool > beam2
Definition: L1TOMDSHelper.h:39
void getBeamConfOMDS()
Definition: L1TBPTX.cc:479
std::map< TString, int > m_effDenominator
Definition: L1TBPTX.h:143
std::map< TString, int > m_effNumerator
Definition: L1TBPTX.h:142
std::vector< bool > beam1
Definition: L1TOMDSHelper.h:38
MonitorElement * m_ErrorMonitor
Definition: L1TBPTX.h:176
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource
Definition: L1TBPTX.h:179

◆ beginLuminosityBlock()

void L1TBPTX::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiBlock,
edm::EventSetup const &  c 
)
overrideprotected

Definition at line 214 of file L1TBPTX.cc.

References gather_cfg::cout, mps_fire::i, edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), to_string(), and PDWG_DiPhoton_SD_cff::triggerName.

214  {
215  if (m_verbose) {
216  cout << "[L1TBPTX] Called beginLuminosityBlock." << endl;
217  }
218 
219  // Updating current LS number
220  m_currentLS = lumiBlock.id().luminosityBlock();
221 
222  // A LS will be valid if BeamMode==STABLE for all events monitored
223  m_currentLSValid = true;
224 
225  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
226  TString triggerName = "";
227  if (m_monitorBits[i].getParameter<bool>("bitType")) {
228  triggerName = "algo_" + std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
229  } else {
230  triggerName = "tech_" + std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
231  }
232 
237  }
238 }
unsigned int m_currentLS
Definition: L1TBPTX.h:149
std::map< TString, int > m_missFireDenominator
Definition: L1TBPTX.h:145
static std::string to_string(const XMLCh *ch)
std::map< TString, int > m_missFireNumerator
Definition: L1TBPTX.h:144
bool m_verbose
Definition: L1TBPTX.h:137
bool m_currentLSValid
Definition: L1TBPTX.h:138
std::vector< edm::ParameterSet > m_monitorBits
Definition: L1TBPTX.h:132
std::map< TString, int > m_effDenominator
Definition: L1TBPTX.h:143
std::map< TString, int > m_effNumerator
Definition: L1TBPTX.h:142

◆ bookHistograms()

void L1TBPTX::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

BeginRun.

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 73 of file L1TBPTX.cc.

References MillePedeAlignmentAlgorithm_cfi::algoName, triggerObjects_cff::bit, dqm::implementation::IBooker::book1D(), gather_cfg::cout, edm::EventSetup::getData(), edm::EventSetup::getHandle(), L1GtPrescaleFactors::gtPrescaleFactors(), mps_fire::i, optionsL1T::menu, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), L1TBPTX_cfi::testName, to_string(), and SiStripSubdetector::UNKNOWN.

73  {
74  if (m_verbose) {
75  cout << "[L1TBPTX] Called beginRun." << endl;
76  }
77 
78  ibooker.setCurrentFolder("L1T/L1TBPTX");
79 
80  // Initializing variables
81  int maxNbins = 2501;
82 
83  // Reseting run dependent variables
84  m_lhcFill = 0;
85  m_currentLS = 0;
86 
87  // Getting Trigger menu from GT
88  const L1GtTriggerMenu* menu = &iSetup.getData(l1gtMenuToken_);
89 
90  // Filling Alias-Bit Map
91  for (CItAlgo algo = menu->gtAlgorithmAliasMap().begin(); algo != menu->gtAlgorithmAliasMap().end(); ++algo) {
92  m_algoBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoAlias();
93  }
94 
95  for (CItAlgo algo = menu->gtTechnicalTriggerMap().begin(); algo != menu->gtTechnicalTriggerMap().end(); ++algo) {
96  m_techBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoName();
97  }
98 
99  // Initializing DQM Monitor Elements
100  ibooker.setCurrentFolder("L1T/L1TBPTX");
101  m_ErrorMonitor = ibooker.book1D("ErrorMonitor", "ErrorMonitor", 7, 0, 7);
102  m_ErrorMonitor->setBinLabel(UNKNOWN, "UNKNOWN");
103  m_ErrorMonitor->setBinLabel(WARNING_DB_CONN_FAILED, "WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
104  m_ErrorMonitor->setBinLabel(WARNING_DB_QUERY_FAILED, "WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
106  "WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
107  m_ErrorMonitor->setBinLabel(ERROR_UNABLE_RETRIVE_PRODUCT, "ERROR_UNABLE_RETRIVE_PRODUCT");
108  m_ErrorMonitor->setBinLabel(ERROR_TRIGGERALIAS_NOTVALID, "ERROR_TRIGGERALIAS_NOTVALID");
109  m_ErrorMonitor->setBinLabel(ERROR_LSBLOCK_NOTVALID, "ERROR_LSBLOCK_NOTVALID");
110 
111  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
112  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
113  TString testName = m_monitorBits[i].getParameter<string>("testName");
114  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
115 
116  TString meTitle = "";
117  ibooker.setCurrentFolder("L1T/L1TBPTX/Efficiency/");
118  if (isAlgo) {
119  meTitle = "Algo ";
120  meTitle += bit;
121  meTitle += " - ";
122  meTitle += m_algoBit_Alias[bit];
123  meTitle += " Efficiency";
124  m_meAlgoEfficiency[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
125  m_meAlgoEfficiency[bit]->setAxisTitle("Lumi Section", 1);
126  } else {
127  meTitle = "Tech ";
128  meTitle += bit;
129  meTitle += " - ";
130  meTitle += m_techBit_Alias[bit];
131  meTitle += " Efficiency";
132  m_meTechEfficiency[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
133  m_meTechEfficiency[bit]->setAxisTitle("Lumi Section", 1);
134  }
135 
136  meTitle = "";
137  ibooker.setCurrentFolder("L1T/L1TBPTX/MissFire/");
138  if (isAlgo) {
139  meTitle = "Algo ";
140  meTitle += bit;
141  meTitle += " - ";
142  meTitle += m_algoBit_Alias[bit];
143  meTitle += "(1 - Miss Fire Rate)";
144  m_meAlgoMissFire[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
145  m_meAlgoMissFire[bit]->setAxisTitle("Lumi Section", 1);
146  m_meAlgoMissFire[bit]->setAxisTitle("1 - Miss Fire Rate", 2);
147  } else {
148  meTitle = "Tech ";
149  meTitle += bit;
150  meTitle += " - ";
151  meTitle += m_techBit_Alias[bit];
152  meTitle += "(1 - Miss Fire Rate)";
153  m_meTechMissFire[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
154  m_meTechMissFire[bit]->setAxisTitle("Lumi Section", 1);
155  m_meTechMissFire[bit]->setAxisTitle("1 - Miss Fire Rate", 2);
156  }
157  }
158 
159  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
160  TString testName = m_monitorRates[i].getParameter<string>("testName");
161  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
162  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
163 
164  pair<bool, int> refME = pair<bool, int>(isAlgo, bit);
165 
166  TString meTitle = "";
167  ibooker.setCurrentFolder("L1T/L1TBPTX/Rate/");
168  if (isAlgo) {
169  meTitle = "Algo " + std::to_string(bit);
170  meTitle += " - ";
171  meTitle += m_algoBit_Alias[bit];
172  meTitle += " Rate";
173  m_meRate[refME] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
174  m_meRate[refME]->setAxisTitle("Lumi Section", 1);
175  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]", 2);
176  } else {
177  meTitle = "Tech " + std::to_string(bit);
178  meTitle += " - ";
179  meTitle += m_techBit_Alias[bit];
180  meTitle += " Rate";
181  m_meRate[refME] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
182  m_meRate[refME]->setAxisTitle("Lumi Section", 1);
183  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]", 2);
184  }
185  }
186 
187  //_____________________________________________________________________
188  // Getting the prescale columns definition for this run
189  const auto& l1GtPfAlgo = iSetup.getHandle(l1GtPfAlgoToken_);
190  const auto& l1GtPfTech = iSetup.getHandle(l1GtPfTechToken_);
191 
192  if (l1GtPfAlgo.isValid()) {
193  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
194  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());
195  } else {
196  //TODO: Some error handling
197  }
198 
199  if (l1GtPfAlgo.isValid()) {
200  const L1GtPrescaleFactors* m_l1GtPfTech = l1GtPfTech.product();
201  m_prescaleFactorsTechTrig = &(m_l1GtPfTech->gtPrescaleFactors());
202  } else {
203  //TODO: Some error handling
204  }
205 }
unsigned int m_lhcFill
Definition: L1TBPTX.h:152
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< TString, MonitorElement * > m_meTechMissFire
Definition: L1TBPTX.h:170
std::map< TString, MonitorElement * > m_meAlgoEfficiency
Definition: L1TBPTX.h:167
unsigned int m_currentLS
Definition: L1TBPTX.h:149
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
static std::string to_string(const XMLCh *ch)
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::map< TString, MonitorElement * > m_meAlgoMissFire
Definition: L1TBPTX.h:168
std::map< TString, MonitorElement * > m_meTechEfficiency
Definition: L1TBPTX.h:169
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd > l1GtPfTechToken_
Definition: L1TBPTX.h:184
bool m_verbose
Definition: L1TBPTX.h:137
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1TBPTX.h:161
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > l1gtMenuToken_
Definition: L1TBPTX.h:182
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)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
std::map< int, TString > m_techBit_Alias
Definition: L1TBPTX.h:165
edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > l1GtPfAlgoToken_
Definition: L1TBPTX.h:183
std::vector< edm::ParameterSet > m_monitorRates
Definition: L1TBPTX.h:133
std::map< std::pair< bool, int >, MonitorElement * > m_meRate
Definition: L1TBPTX.h:172
std::vector< edm::ParameterSet > m_monitorBits
Definition: L1TBPTX.h:132
std::map< int, TString > m_algoBit_Alias
Definition: L1TBPTX.h:164
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * m_ErrorMonitor
Definition: L1TBPTX.h:176
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1TBPTX.h:160

◆ certifyLSBlock()

void L1TBPTX::certifyLSBlock ( std::string  iTrigger,
int  iInitLs,
int  iEndLs,
float  iValue 
)
private

Definition at line 568 of file L1TBPTX.cc.

568 {}

◆ doFractionInSync()

void L1TBPTX::doFractionInSync ( bool  iForce = false,
bool  iBad = false 
)
private

Definition at line 558 of file L1TBPTX.cc.

558 {}

◆ dqmBeginRun()

void L1TBPTX::dqmBeginRun ( const edm::Run ,
const edm::EventSetup  
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 207 of file L1TBPTX.cc.

207  {
208  //empty
209 }

◆ endLuminosityBlock()

void L1TBPTX::endLuminosityBlock ( edm::LuminosityBlock const &  lumiBlock,
edm::EventSetup const &  c 
)
overrideprotected

Definition at line 244 of file L1TBPTX.cc.

References newFWLiteAna::bin, triggerObjects_cff::bit, gather_cfg::cout, mps_fire::i, L1TBPTX_cfi::testName, to_string(), and PDWG_DiPhoton_SD_cff::triggerName.

244  {
245  //______________________________________________________________________________
246  // Monitoring efficiencies
247  //______________________________________________________________________________
248  if (m_verbose) {
249  cout << "[L1TBPTX] Called endLuminosityBlock." << endl;
250  }
251 
252  // If this LS is valid (i.e. all events recorded with stable beams)
254  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
255  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
256  TString testName = m_monitorBits[i].getParameter<string>("testName");
257  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
258 
259  TString triggerName;
260  if (isAlgo) {
261  triggerName = "algo_" + std::to_string(bit);
262  } else {
263  triggerName = "tech_" + std::to_string(bit);
264  }
265 
266  double valEff;
267  double valMiss;
268  if (m_effDenominator[triggerName] != 0) {
270  } else {
271  valEff = 0;
272  }
275  } else {
276  valMiss = 0;
277  }
278 
279  if (isAlgo) {
280  int bin = m_meAlgoEfficiency[bit]->getTH1()->FindBin(m_currentLS);
281  m_meAlgoEfficiency[bit]->setBinContent(bin, valEff);
282  m_meAlgoMissFire[bit]->setBinContent(bin, 1 - valMiss);
283  } else {
284  int bin = m_meTechEfficiency[bit]->getTH1()->FindBin(m_currentLS);
285  m_meTechEfficiency[bit]->setBinContent(bin, valEff);
286  m_meTechMissFire[bit]->setBinContent(bin, 1 - valMiss);
287  }
288  }
289  }
290 
291  //______________________________________________________________________________
292  // Monitoring rates
293  //______________________________________________________________________________
294  // We are only interested in monitoring lumisections where the the LHC state is
295  // RAMP, FLATTOP, SQUEEZE, ADJUST or STABLE since the bunch configuration and
296  // therefore the BPTX rate will not change.
297 
298  if (m_currentLSValid) {
299  const vector<int>& currentPFAlgo = (*m_prescaleFactorsAlgoTrig).at(m_currentPrescalesIndex);
300  const vector<int>& currentPFTech = (*m_prescaleFactorsTechTrig).at(m_currentPrescalesIndex);
301 
302  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
303  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
304  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
305 
306  pair<bool, int> refME = pair<bool, int>(isAlgo, bit);
307 
308  if (isAlgo) {
309  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
310  int trigPS = currentPFAlgo[bit];
311  double trigRate = (double)trigPS * m_l1Rate[refME];
312  m_meRate[refME]->setBinContent(bin, trigRate);
313 
314  } else {
315  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
316  int trigPS = currentPFTech[bit];
317  double trigRate = (double)trigPS * m_l1Rate[refME];
318  m_meRate[refME]->setBinContent(bin, trigRate);
319  }
320  }
321  }
322 }
std::map< TString, MonitorElement * > m_meTechMissFire
Definition: L1TBPTX.h:170
std::map< TString, MonitorElement * > m_meAlgoEfficiency
Definition: L1TBPTX.h:167
unsigned int m_currentLS
Definition: L1TBPTX.h:149
std::map< TString, int > m_missFireDenominator
Definition: L1TBPTX.h:145
BeamConfiguration m_beamConfig
Definition: L1TBPTX.h:155
static std::string to_string(const XMLCh *ch)
std::map< TString, MonitorElement * > m_meAlgoMissFire
Definition: L1TBPTX.h:168
std::map< std::pair< bool, int >, double > m_l1Rate
Definition: L1TBPTX.h:173
std::map< TString, MonitorElement * > m_meTechEfficiency
Definition: L1TBPTX.h:169
std::map< TString, int > m_missFireNumerator
Definition: L1TBPTX.h:144
bool m_verbose
Definition: L1TBPTX.h:137
int m_currentPrescalesIndex
Definition: L1TBPTX.h:148
std::vector< edm::ParameterSet > m_monitorRates
Definition: L1TBPTX.h:133
bool m_currentLSValid
Definition: L1TBPTX.h:138
std::map< std::pair< bool, int >, MonitorElement * > m_meRate
Definition: L1TBPTX.h:172
std::vector< edm::ParameterSet > m_monitorBits
Definition: L1TBPTX.h:132
unsigned int m_currentGTLS
Definition: L1TBPTX.h:150
std::map< TString, int > m_effDenominator
Definition: L1TBPTX.h:143
std::map< TString, int > m_effNumerator
Definition: L1TBPTX.h:142

◆ getBeamConfOMDS()

void L1TBPTX::getBeamConfOMDS ( )
private

Definition at line 479 of file L1TBPTX.cc.

References gather_cfg::cout, L1TOMDSHelper::NO_ERROR, L1TBPTX_cfi::oracleDB, L1TBPTX_cfi::pathCondDB, SiStripSubdetector::UNKNOWN, L1TOMDSHelper::WARNING_DB_CONN_FAILED, L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES, and L1TOMDSHelper::WARNING_DB_QUERY_FAILED.

479  {
480  if (m_verbose) {
481  cout << "[L1TBPTX] Called getBeamConfOMDS()" << endl;
482  }
483 
484  //Getting connection paremeters
485  string oracleDB = m_parameters.getParameter<string>("oracleDB");
486  string pathCondDB = m_parameters.getParameter<string>("pathCondDB");
487 
488  // Connecting to OMDS
489  L1TOMDSHelper myOMDSHelper = L1TOMDSHelper();
490  int conError;
491  myOMDSHelper.connect(oracleDB, pathCondDB, conError);
492 
493  if (conError == L1TOMDSHelper::NO_ERROR) {
494  if (m_verbose) {
495  cout << "[L1TBPTX] Connected to DB with no error." << endl;
496  }
497 
498  int errorRetrive;
499  m_beamConfig = myOMDSHelper.getBeamConfiguration(m_lhcFill, errorRetrive);
500 
501  if (errorRetrive == L1TOMDSHelper::NO_ERROR) {
502  if (m_verbose) {
503  cout << "[L1TBPTX] Retriving LHC Bunch Structure: NO_ERROR" << endl;
504  cout << "[L1TSync] -> LHC Bunch Structure valid=" << m_beamConfig.m_valid
505  << " nBunches=" << m_beamConfig.nCollidingBunches << endl;
506  }
507  } else if (errorRetrive == L1TOMDSHelper::WARNING_DB_QUERY_FAILED) {
508  if (m_verbose) {
509  cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_QUERY_FAILED" << endl;
510  }
511 
512  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_QUERY_FAILED);
513  eCount++;
514  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_QUERY_FAILED, eCount);
515  } else if (errorRetrive == L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES) {
516  if (m_verbose) {
517  cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_INCORRECT_NBUNCHES" << endl;
518  }
519 
520  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_INCORRECT_NBUNCHES);
521  eCount++;
522  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_INCORRECT_NBUNCHES, eCount);
523  } else {
524  if (m_verbose) {
525  cout << "[L1TBPTX] Retriving LHC Bunch Structure: UNKNOWN" << endl;
526  }
527  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
528  eCount++;
529  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN, eCount);
530  }
531 
532  } else if (conError == L1TOMDSHelper::WARNING_DB_CONN_FAILED) {
533  if (m_verbose) {
534  cout << "[L1TBPTX] Connection to DB: WARNING_DB_CONN_FAILED" << endl;
535  }
536  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_CONN_FAILED);
537  eCount++;
538  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_CONN_FAILED, eCount);
539  } else {
540  if (m_verbose) {
541  cout << "[L1TBPTX] Connection to DB: UNKNOWN" << endl;
542  }
543  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
544  eCount++;
545  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN, eCount);
546  }
547 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
unsigned int m_lhcFill
Definition: L1TBPTX.h:152
BeamConfiguration m_beamConfig
Definition: L1TBPTX.h:155
bool m_verbose
Definition: L1TBPTX.h:137
edm::ParameterSet m_parameters
Definition: L1TBPTX.h:131
MonitorElement * m_ErrorMonitor
Definition: L1TBPTX.h:176

Member Data Documentation

◆ l1gtMenuToken_

edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> L1TBPTX::l1gtMenuToken_
private

Definition at line 182 of file L1TBPTX.h.

◆ l1GtPfAlgoToken_

Definition at line 183 of file L1TBPTX.h.

◆ l1GtPfTechToken_

Definition at line 184 of file L1TBPTX.h.

◆ m_algoBit_Alias

std::map<int, TString> L1TBPTX::m_algoBit_Alias
private

Definition at line 164 of file L1TBPTX.h.

◆ m_beamConfig

BeamConfiguration L1TBPTX::m_beamConfig
private

Definition at line 155 of file L1TBPTX.h.

◆ m_currentGTLS

unsigned int L1TBPTX::m_currentGTLS
private

Definition at line 150 of file L1TBPTX.h.

◆ m_currentLS

unsigned int L1TBPTX::m_currentLS
private

Definition at line 149 of file L1TBPTX.h.

◆ m_currentLSValid

bool L1TBPTX::m_currentLSValid
private

Definition at line 138 of file L1TBPTX.h.

◆ m_currentPrescalesIndex

int L1TBPTX::m_currentPrescalesIndex
private

Definition at line 148 of file L1TBPTX.h.

◆ m_effDenominator

std::map<TString, int> L1TBPTX::m_effDenominator
private

Definition at line 143 of file L1TBPTX.h.

◆ m_effNumerator

std::map<TString, int> L1TBPTX::m_effNumerator
private

Definition at line 142 of file L1TBPTX.h.

◆ m_ErrorMonitor

MonitorElement* L1TBPTX::m_ErrorMonitor
private

Definition at line 176 of file L1TBPTX.h.

◆ m_l1GtDataDaqInputTag

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1TBPTX::m_l1GtDataDaqInputTag
private

Definition at line 181 of file L1TBPTX.h.

◆ m_l1GtEvmSource

edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> L1TBPTX::m_l1GtEvmSource
private

Definition at line 180 of file L1TBPTX.h.

◆ m_l1Rate

std::map<std::pair<bool, int>, double> L1TBPTX::m_l1Rate
private

Definition at line 173 of file L1TBPTX.h.

◆ m_lhcFill

unsigned int L1TBPTX::m_lhcFill
private

Definition at line 152 of file L1TBPTX.h.

◆ m_meAlgoEfficiency

std::map<TString, MonitorElement*> L1TBPTX::m_meAlgoEfficiency
private

Definition at line 167 of file L1TBPTX.h.

◆ m_meAlgoMissFire

std::map<TString, MonitorElement*> L1TBPTX::m_meAlgoMissFire
private

Definition at line 168 of file L1TBPTX.h.

◆ m_meRate

std::map<std::pair<bool, int>, MonitorElement*> L1TBPTX::m_meRate
private

Definition at line 172 of file L1TBPTX.h.

◆ m_meTechEfficiency

std::map<TString, MonitorElement*> L1TBPTX::m_meTechEfficiency
private

Definition at line 169 of file L1TBPTX.h.

◆ m_meTechMissFire

std::map<TString, MonitorElement*> L1TBPTX::m_meTechMissFire
private

Definition at line 170 of file L1TBPTX.h.

◆ m_missFireDenominator

std::map<TString, int> L1TBPTX::m_missFireDenominator
private

Definition at line 145 of file L1TBPTX.h.

◆ m_missFireNumerator

std::map<TString, int> L1TBPTX::m_missFireNumerator
private

Definition at line 144 of file L1TBPTX.h.

◆ m_monitorBits

std::vector<edm::ParameterSet> L1TBPTX::m_monitorBits
private

Definition at line 132 of file L1TBPTX.h.

◆ m_monitorRates

std::vector<edm::ParameterSet> L1TBPTX::m_monitorRates
private

Definition at line 133 of file L1TBPTX.h.

◆ m_outputFile

std::string L1TBPTX::m_outputFile
private

Definition at line 134 of file L1TBPTX.h.

◆ m_parameters

edm::ParameterSet L1TBPTX::m_parameters
private

Definition at line 131 of file L1TBPTX.h.

◆ m_prescaleFactorsAlgoTrig

const std::vector<std::vector<int> >* L1TBPTX::m_prescaleFactorsAlgoTrig
private

Definition at line 160 of file L1TBPTX.h.

◆ m_prescaleFactorsTechTrig

const std::vector<std::vector<int> >* L1TBPTX::m_prescaleFactorsTechTrig
private

Definition at line 161 of file L1TBPTX.h.

◆ m_processedLS

bool* L1TBPTX::m_processedLS
private

Definition at line 139 of file L1TBPTX.h.

◆ m_refPrescaleSet

int L1TBPTX::m_refPrescaleSet
private

Definition at line 147 of file L1TBPTX.h.

◆ m_scalersSource

edm::EDGetTokenT<Level1TriggerScalersCollection> L1TBPTX::m_scalersSource
private

Definition at line 179 of file L1TBPTX.h.

◆ m_selAlgoBit

std::vector<std::pair<int, int> > L1TBPTX::m_selAlgoBit
private

Definition at line 156 of file L1TBPTX.h.

◆ m_selTechBit

std::vector<std::pair<int, int> > L1TBPTX::m_selTechBit
private

Definition at line 157 of file L1TBPTX.h.

◆ m_techBit_Alias

std::map<int, TString> L1TBPTX::m_techBit_Alias
private

Definition at line 165 of file L1TBPTX.h.

◆ m_verbose

bool L1TBPTX::m_verbose
private

Definition at line 137 of file L1TBPTX.h.