6 #include <boost/regex.hpp>
7 #include <boost/format.hpp>
43 event.getByToken(
token, handle);
49 template <
typename R,
typename T>
53 setup.get<
R>().
get(handle);
99 descriptions.
add(
"triggerBxMonitor", desc);
106 m_hlt_results( consumes<edm::TriggerResults>( config.getUntrackedParameter<edm::
InputTag>(
"hltResults" ) ) ),
107 m_dqm_path( config.getUntrackedParameter<std::
string>(
"dqmPath" ) ),
131 if (
m_l1tMenu and m_l1tAlgoMask and m_l1tTechMask) {
138 edm::LogError(
"TriggerBxMonitor") <<
"failed to read the L1 menu or masks from the EventSetup, the L1 trigger bx distribution will not be monitored";
150 edm::LogError(
"TriggerBxMonitor") <<
"failed to initialise HLTConfigProvider, the HLT bx distribution will not be monitored";
165 int bit = keyval.second.algoBitNumber();
170 for (
unsigned int bit = 0; bit < m_l1tAlgoMask->gtTriggerMask().size(); ++bit)
if (not
m_l1t_algo_bx.at(bit)) {
182 int bit = keyval.second.algoBitNumber();
187 for (
unsigned int bit = 0; bit < m_l1tTechMask->gtTriggerMask().size(); ++bit)
if (not
m_l1t_tech_bx.at(bit)) {
212 const std::vector<bool> & algoword = l1tResults.
decisionWord();
218 edm::LogWarning(
"TriggerBxMonitor") <<
"This should never happen: the size of the L1 Algo Trigger mask does not match the number of L1 Algo Triggers";
227 edm::LogWarning(
"TriggerBxMonitor") <<
"This should never happen: the size of the L1 Tech Trigger mask does not match the number of L1 Tech Triggers";
235 for (
unsigned int i = 0;
i <
m_hlt_bx.size(); ++
i) {
240 edm::LogWarning(
"TriggerBxMonitor") <<
"This should never happen: the number of HLT paths has changed since the beginning of the run";
unsigned int size() const
number of trigger paths in trigger table
HLTConfigProvider m_hltConfig
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const std::string & triggerName(unsigned int triggerIndex) const
#define DEFINE_FWK_MODULE(type)
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
string format
Some error handling for the usage.
std::vector< TH1F * > m_l1t_tech_bx
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
L1GtTriggerMask const * m_l1tAlgoMask
bool inited() const
Accessors (const methods)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
unsigned int size() const
Get number of paths stored.
MonitorElement * book1D(Args &&...args)
edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
L1GtTriggerMask const * m_l1tTechMask
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1t_results
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const DecisionWord & decisionWord(int bxInEventValue) const
TriggerBxMonitor(edm::ParameterSet const &)
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
const HLTPathStatus & at(const unsigned int i) const
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(const std::string &fullpath)
T const * product() const
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T const * product() const
static const unsigned int s_bx_range
TH1F * getTH1F(void) const
std::vector< TH1F * > m_l1t_algo_bx
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TH1F * > m_hlt_bx
bool accept() const
has this path accepted the event?
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
std::shared_ptr< cms::Exception > whyFailed() const
L1GtTriggerMenu const * m_l1tMenu
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")