11 #include <boost/regex.hpp>
12 #include <boost/format.hpp>
46 event.getByToken(
token, handle);
52 template <
typename R,
typename T>
56 setup.get<
R>().
get(handle);
158 desc.
addUntracked<uint32_t>(
"lumisectionRange", 2500 );
159 descriptions.
add(
"triggerRatesMonitor", desc);
166 m_hlt_results(consumes<edm::TriggerResults>( config.getUntrackedParameter<edm::
InputTag>(
"hltResults" ) )),
167 m_dqm_path( config.getUntrackedParameter<std::
string>(
"dqmPath" ) ),
168 m_lumisections_range( config.getUntrackedParameter<uint32_t>(
"lumisectionRange" ) ),
200 m_l1tMenu = & get<L1TUtmTriggerMenuRcd, L1TUtmTriggerMenu>(
setup);
205 edm::LogError(
"TriggerRatesMonitor") <<
"failed to read the L1 menu from the EventSetup, the L1 trigger rates will not be monitored";
246 edm::LogError(
"TriggerRatesMonitor") <<
"failed to initialise HLTConfigProvider, the HLT trigger and datasets rates will not be monitored";
266 unsigned int bit = keyval.second.getIndex();
290 if (type ==
"HLTL1TSeed" or type ==
"HLTLevel1GTSeed" or type ==
"HLTLevel1Activity" or type ==
"HLTLevel1Pattern") {
294 }
else if (type ==
"HLTPrescaler") {
306 for (
unsigned int i = 0; i <
datasets.size(); ++
i)
312 for (
unsigned int i = 0; i <
streams.size(); ++
i)
320 unsigned int lumisection =
event.luminosityBlock();
330 if (not bxvector.isEmpty(0)) {
331 auto const &
results = bxvector.at(0, 0);
333 if (
results.getAlgoDecisionFinal(
i))
351 else if (path.
error())
357 edm::LogWarning(
"TriggerRatesMonitor") <<
"This should never happen: the number of HLT paths has changed since the beginning of the run";
368 for (
unsigned int i = 0; i <
m_streams.size(); ++
i)
unsigned int size() const
number of trigger paths in trigger table
const std::string moduleType(const std::string &module) const
C++ class name of module.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
const std::string & triggerName(unsigned int triggerIndex) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
uint32_t m_lumisections_range
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
string format
Some error handling for the usage.
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static const unsigned int maxPhysicsTriggers
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
bool inited() const
Accessors (const methods)
unsigned int index_prescale
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
static const char *const s_tcds_trigger_types[]
std::vector< std::vector< unsigned int > > m_streams
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
const std::vector< std::string > & streamNames() const
std::vector< TH1F * > m_dataset_counts
TH1F * m_events_processed
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
unsigned int size() const
Get number of paths stored.
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
std::vector< std::vector< unsigned int > > m_datasets
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(Args &&...args)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
L1TUtmTriggerMenu const * m_l1tMenu
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 HLTPathStatus & at(const unsigned int i) const
HLTConfigProvider m_hltConfig
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
bool error() const
has this path encountered an error (exception)?
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
TH1F * getTH1F(void) const
std::vector< HLTRatesPlots > m_hlt_counts
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TH1F * > m_stream_counts
bool accept() const
has this path accepted the event?
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
TriggerRatesMonitor(edm::ParameterSet const &)
edm::EventAuxiliary::ExperimentType experimentType() const
unsigned int index_l1_seed
std::vector< TH1F * > m_l1t_counts
std::shared_ptr< cms::Exception > whyFailed() const
std::vector< HLTIndices > m_hltIndices
std::vector< TH1F * > m_tcds_counts
const std::vector< std::string > & datasetNames() const
unsigned int index() const