32 struct RunBasedHistograms {
34 std::vector<dqm::reco::MonitorElement*> orbit_bx;
35 std::vector<dqm::reco::MonitorElement*> orbit_bx_all_byLS;
98 descriptions.
add(
"triggerBxVsOrbitMonitor", desc);
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")) {}
116 histograms.orbit_bx_all_byLS.clear();
117 histograms.orbit_bx_all_byLS.resize(nLS);
119 histograms.orbit_bx.clear();
134 histograms.orbit_bx_all = booker.
book2D(
"OrbitVsBX",
135 "Event orbits vs. bunch crossing",
142 histograms.orbit_bx_all->setXTitle(
"BX");
143 histograms.orbit_bx_all->setYTitle(
"orbit");
145 for (
unsigned int i = 0;
i < nLS; ++
i) {
147 histograms.orbit_bx_all_byLS[
i] = booker.
book2D(
"OrbitVsBX_LS" + iname,
148 "Event orbits vs. bunch crossing, for lumisection " + iname,
155 histograms.orbit_bx_all_byLS[
i]->setXTitle(
"BX");
156 histograms.orbit_bx_all_byLS[
i]->setYTitle(
"orbit");
160 for (
unsigned int i = 0;
i <
size; ++
i) {
170 histograms.orbit_bx[
i]->setXTitle(
"BX");
171 histograms.orbit_bx[
i]->setYTitle(
"orbit");
179 unsigned int type =
event.experimentType();
180 unsigned int ls =
event.id().luminosityBlock();
182 unsigned int bx =
event.bunchCrossing();
183 histograms.orbit_bx_all->Fill(bx, orbit);
186 if (iLS >= 0 and iLS <
int(histograms.orbit_bx_all_byLS.size()))
187 histograms.orbit_bx_all_byLS[iLS]->Fill(bx, orbit);
191 if (type < size and histograms.orbit_bx[type]) {
192 histograms.orbit_bx[
type]->Fill(bx, orbit);
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
static const unsigned int s_orbit_range
static const unsigned int s_bx_range
dqm::reco::DQMStore DQMStore
~TriggerBxVsOrbitMonitor() override=default
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
TriggerBxVsOrbitMonitor(edm::ParameterSet const &)
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
dqm::legacy::MonitorElement MonitorElement
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::string m_dqm_path
void dqmBeginRun(edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
tuple config
parse the configuration file
static constexpr const char *const s_tcds_trigger_types[]
tuple size
Write out results.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)