|
|
Go to the documentation of this file.
7 #include <fmt/printf.h>
34 struct RunBasedHistograms {
59 std::vector<dqm::reco::MonitorElement*> tcds_bx;
60 std::vector<dqm::reco::MonitorElement*> l1t_bx;
61 std::vector<dqm::reco::MonitorElement*> hlt_bx;
62 std::vector<dqm::reco::MonitorElement*> tcds_bx_2d;
63 std::vector<dqm::reco::MonitorElement*> l1t_bx_2d;
64 std::vector<dqm::reco::MonitorElement*> hlt_bx_2d;
122 desc.addUntracked<
bool>(
"make1DPlots",
true);
123 desc.addUntracked<
bool>(
"make2DPlots",
false);
124 desc.addUntracked<uint32_t>(
"lsRange", 4000);
125 descriptions.
add(
"triggerBxMonitor",
desc);
133 m_make_1d_plots(
config.getUntrackedParameter<
bool>(
"make1DPlots")),
134 m_make_2d_plots(
config.getUntrackedParameter<
bool>(
"make2DPlots")),
135 m_ls_range(
config.getUntrackedParameter<uint32_t>(
"lsRange")) {}
176 <<
"failed to initialise HLTConfigProvider, the HLT bx distribution will not be monitored";
191 "TCDS Trigger Types vs. bunch crossing",
201 for (
unsigned int i = 0;
i <
size; ++
i) {
222 "Level 1 Triggers vs. bunch crossing",
232 auto const& l1tMenu = edm::get<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd>(
setup);
233 for (
auto const& keyval : l1tMenu.getAlgorithmMap()) {
234 unsigned int bit = keyval.second.getIndex();
235 std::string const&
name = fmt::sprintf(
"%s (bit %d)", keyval.first, bit);
244 histograms.l1t_bx_all->setBinLabel(bit + 1, keyval.first, 2);
253 "High Level Triggers vs. bunch crossing",
263 for (
unsigned int i = 0;
i <
histograms.hltConfig.size(); ++
i) {
281 unsigned int bx =
event.bunchCrossing();
282 unsigned int ls =
event.luminosityBlock();
287 unsigned int type =
event.experimentType();
300 if (not bxvector.isEmpty(0)) {
301 auto const&
results = bxvector.at(0, 0);
303 if (
results.getAlgoDecisionFinal(
i)) {
TriggerBxMonitor(edm::ParameterSet const &)
const bool m_make_1d_plots
const std::string m_dqm_path
virtual void setCurrentFolder(std::string const &fullpath)
static const unsigned int s_bx_range
const bool m_make_2d_plots
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~TriggerBxMonitor() override=default
T const & get(Event const &event, InputTag const &tag) noexcept(false)
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
Log< level::Error, false > LogError
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
void dqmBeginRun(edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
dqm::legacy::MonitorElement MonitorElement
static constexpr unsigned int maxPhysicsTriggers
static constexpr const char * s_tcds_trigger_types[]
const uint32_t m_ls_range
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override