CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
TriggerBxVsOrbitMonitor Class Reference
Inheritance diagram for TriggerBxVsOrbitMonitor:
DQMGlobalEDAnalyzer< RunBasedHistograms > edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 TriggerBxVsOrbitMonitor (edm::ParameterSet const &)
 
 ~TriggerBxVsOrbitMonitor () override=default
 
- Public Member Functions inherited from edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 
void dqmAnalyze (edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 

Private Attributes

const std::string m_dqm_path
 
const edm::EDGetTokenT< edm::TriggerResultsm_hlt_results
 
const edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1t_results
 
const int m_maxBX
 
const int m_maxLS
 
const int m_minBX
 
const int m_minLS
 

Static Private Attributes

static const unsigned int s_bx_range = 3564
 
static const unsigned int s_orbit_range = 262144
 
static const char *const s_tcds_trigger_types []
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzer< RunBasedHistograms >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

Definition at line 39 of file TriggerBxVsOrbitMonitor.cc.

Constructor & Destructor Documentation

TriggerBxVsOrbitMonitor::TriggerBxVsOrbitMonitor ( edm::ParameterSet const &  config)
explicit

Definition at line 101 of file TriggerBxVsOrbitMonitor.cc.

102  : // module configuration
103  m_l1t_results(consumes<GlobalAlgBlkBxCollection>(config.getUntrackedParameter<edm::InputTag>("l1tResults"))),
104  m_hlt_results(consumes<edm::TriggerResults>(config.getUntrackedParameter<edm::InputTag>("hltResults"))),
105  m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
106  m_minLS(config.getUntrackedParameter<int>("minLS")),
107  m_maxLS(config.getUntrackedParameter<int>("maxLS")),
108  m_minBX(config.getUntrackedParameter<int>("minBX")),
109  m_maxBX(config.getUntrackedParameter<int>("maxBX")) {}
Definition: config.py:1
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
TriggerBxVsOrbitMonitor::~TriggerBxVsOrbitMonitor ( )
overridedefault

Member Function Documentation

void TriggerBxVsOrbitMonitor::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzer< RunBasedHistograms >.

Definition at line 123 of file TriggerBxVsOrbitMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), mps_fire::i, m_dqm_path, m_maxBX, m_maxLS, m_minBX, m_minLS, s_orbit_range, s_tcds_trigger_types, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

126  {
127  // TCDS trigger type plots
129  size_t nLS = m_maxLS - m_minLS + 1;
130  size_t nBX = m_maxBX - m_minBX + 1;
131 
132  // book 2D histogram to monitor all TCDS trigger types in a single plot
133  booker.setCurrentFolder(m_dqm_path + "/orbitVsBX");
134  histograms.orbit_bx_all = booker.book2D("OrbitVsBX",
135  "Event orbits vs. bunch crossing",
136  nBX,
137  m_minBX - 0.5,
138  m_maxBX + 0.5,
139  s_orbit_range + 1,
140  -0.5,
141  s_orbit_range + 0.5);
142  histograms.orbit_bx_all->setXTitle("BX");
143  histograms.orbit_bx_all->setYTitle("orbit");
144 
145  for (unsigned int i = 0; i < nLS; ++i) {
146  std::string iname = std::to_string(i);
147  histograms.orbit_bx_all_byLS[i] = booker.book2D("OrbitVsBX_LS" + iname,
148  "Event orbits vs. bunch crossing, for lumisection " + iname,
149  nBX,
150  m_minBX - 0.5,
151  m_maxBX + 0.5,
152  s_orbit_range + 1,
153  -0.5,
154  s_orbit_range + 0.5);
155  histograms.orbit_bx_all_byLS[i]->setXTitle("BX");
156  histograms.orbit_bx_all_byLS[i]->setYTitle("orbit");
157  }
158 
159  booker.setCurrentFolder(m_dqm_path + "/orbitVsBX/TCDS");
160  for (unsigned int i = 0; i < size; ++i) {
161  if (s_tcds_trigger_types[i]) {
162  histograms.orbit_bx[i] = booker.book2D("OrbitVsBX_" + std::string(s_tcds_trigger_types[i]),
163  "Event orbits vs. bunch crossing " + std::string(s_tcds_trigger_types[i]),
164  nBX,
165  m_minBX - 0.5,
166  m_maxBX + 0.5,
167  s_orbit_range + 1,
168  -0.5,
169  s_orbit_range + 0.5);
170  histograms.orbit_bx[i]->setXTitle("BX");
171  histograms.orbit_bx[i]->setYTitle("orbit");
172  }
173  }
174 }
size
Write out results.
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
void TriggerBxVsOrbitMonitor::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
RunBasedHistograms const &  histograms 
) const
overrideprivate

Definition at line 176 of file TriggerBxVsOrbitMonitor.cc.

References l1GtPatternGenerator_cfi::bx, DEFINE_FWK_MODULE, eostools::ls(), m_minLS, s_orbit_range, s_tcds_trigger_types, and findQualityFiles::size.

178  {
179  unsigned int type = event.experimentType();
180  unsigned int ls = event.id().luminosityBlock();
181  unsigned int orbit = event.orbitNumber() % s_orbit_range;
182  unsigned int bx = event.bunchCrossing();
183  histograms.orbit_bx_all->Fill(bx, orbit);
184 
185  int iLS = ls - m_minLS;
186  if (iLS >= 0 and iLS < int(histograms.orbit_bx_all_byLS.size()))
187  histograms.orbit_bx_all_byLS[iLS]->Fill(bx, orbit);
188 
189  // monitor the bx distribution for the TCDS trigger types
191  if (type < size and histograms.orbit_bx[type]) {
192  histograms.orbit_bx[type]->Fill(bx, orbit);
193  }
194 }
size
Write out results.
type
Definition: HCALResponse.h:21
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
def ls(path, rec=False)
Definition: eostools.py:349
void TriggerBxVsOrbitMonitor::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Reimplemented from DQMGlobalEDAnalyzer< RunBasedHistograms >.

Definition at line 111 of file TriggerBxVsOrbitMonitor.cc.

References m_maxLS, m_minLS, s_tcds_trigger_types, and findQualityFiles::size.

113  {
114  size_t nLS = m_maxLS - m_minLS + 1;
115 
116  histograms.orbit_bx_all_byLS.clear();
117  histograms.orbit_bx_all_byLS.resize(nLS);
118 
119  histograms.orbit_bx.clear();
120  histograms.orbit_bx.resize(std::size(s_tcds_trigger_types));
121 }
size
Write out results.
static const char *const s_tcds_trigger_types[]
void TriggerBxVsOrbitMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 89 of file TriggerBxVsOrbitMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

89  {
91  desc.addUntracked<edm::InputTag>("l1tResults", edm::InputTag("gtStage2Digis"));
92  desc.addUntracked<edm::InputTag>("hltResults", edm::InputTag("TriggerResults"));
93  desc.addUntracked<std::string>("dqmPath", "HLT/TriggerBx");
94  desc.addUntracked<int>("minLS", 134);
95  desc.addUntracked<int>("maxLS", 136);
96  desc.addUntracked<int>("minBX", 894);
97  desc.addUntracked<int>("maxBX", 912);
98  descriptions.add("triggerBxVsOrbitMonitor", desc);
99 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

const std::string TriggerBxVsOrbitMonitor::m_dqm_path
private

Definition at line 79 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const edm::EDGetTokenT<edm::TriggerResults> TriggerBxVsOrbitMonitor::m_hlt_results
private

Definition at line 78 of file TriggerBxVsOrbitMonitor.cc.

const edm::EDGetTokenT<GlobalAlgBlkBxCollection> TriggerBxVsOrbitMonitor::m_l1t_results
private

Definition at line 77 of file TriggerBxVsOrbitMonitor.cc.

const int TriggerBxVsOrbitMonitor::m_maxBX
private

Definition at line 83 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_maxLS
private

Definition at line 81 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmBeginRun().

const int TriggerBxVsOrbitMonitor::m_minBX
private

Definition at line 82 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_minLS
private

Definition at line 80 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().

const unsigned int TriggerBxVsOrbitMonitor::s_bx_range = 3564
staticprivate

Definition at line 52 of file TriggerBxVsOrbitMonitor.cc.

const unsigned int TriggerBxVsOrbitMonitor::s_orbit_range = 262144
staticprivate

Definition at line 53 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmAnalyze().

const char *const TriggerBxVsOrbitMonitor::s_tcds_trigger_types
staticprivate
Initial value:
= {
"Empty",
"Physics",
"Calibration",
"Random",
"Auxiliary",
0 ,
0 ,
0 ,
"Cyclic",
"Bunch-pattern",
"Software",
"TTS",
0 ,
0 ,
0 ,
0
}

Definition at line 57 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().