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);
109 index_l1_seed( (unsigned
int) -1),
110 index_prescale( (unsigned
int) -1)
158 desc.
addUntracked<uint32_t>(
"lumisectionRange", 2500 );
159 descriptions.
add(
"triggerRatesMonitor", desc);
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";
225 for (
auto const &
path: paths) {
235 for (
unsigned int i = 0;
i < streams; ++
i) {
249 edm::LogError(
"TriggerRatesMonitor") <<
"failed to initialise HLTConfigProvider, the HLT trigger and datasets rates will not be monitored";
269 unsigned int bit = keyval.second.getIndex();
282 for (
unsigned int d = 0;
d <
datasets.size(); ++
d) {
284 for (
unsigned int i = 0; i <
m_datasets[
d].size(); ++
i) {
303 if (type ==
"HLTL1TSeed" or type ==
"HLTLevel1GTSeed" or type ==
"HLTLevel1Activity" or type ==
"HLTLevel1Pattern") {
307 }
else if (type ==
"HLTPrescaler") {
318 for (
unsigned int i = 0; i <
datasets.size(); ++
i)
324 for (
unsigned int i = 0; i < streams.size(); ++
i)
333 unsigned int lumisection =
event.luminosityBlock();
343 if (not bxvector.isEmpty(0)) {
344 auto const &
results = bxvector.at(0, 0);
346 if (
results.getAlgoDecisionFinal(
i))
357 edm::LogWarning(
"TriggerRatesMonitor") <<
"This should never happen: the number of HLT paths has changed since the beginning of the run";
377 else if (path.
error())
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
uint32_t m_lumisections_range
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
std::vector< std::vector< HLTRatesPlots > > m_hlt_by_dataset_counts
def setup(process, global_tag, zero_tesla=False)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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
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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
def unique(seq, keepstr=True)
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
format
Some error handling for the usage.
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
TH1F * getTH1F(void) const
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
T const * product() const
const std::vector< std::string > & datasetNames() const
unsigned int index() const