CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
HLTrigReport Class Reference

#include <HLTrigReport.h>

Inheritance diagram for HLTrigReport:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::LuminosityBlockCache< hltrigreport::Accumulate > > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

using Accumulate = hltrigreport::Accumulate
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
const std::vector< std::string > & datasetNames () const
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
std::shared_ptr< AccumulateglobalBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const override
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 HLTrigReport (const edm::ParameterSet &)
 
const std::vector< std::string > & streamNames () const
 
 ~HLTrigReport () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::LuminosityBlockCache< hltrigreport::Accumulate > >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static ReportEvery decode (const std::string &value)
 
static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

enum  ReportEvery {
  NEVER = 0, EVERY_EVENT = 1, EVERY_LUMI = 2, EVERY_RUN = 3,
  EVERY_JOB = 4
}
 

Private Member Functions

hltrigreport::AccumulatechooseAccumulate (edm::LuminosityBlockIndex index)
 
void dumpReport (hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
 
bool readAfterLumi () const
 
void reset ()
 
void updateConfigCache ()
 
void updateService (Accumulate const &accumulate) const
 
bool useLumiCache () const
 

Private Attributes

hltrigreport::Accumulate accumulate_
 
bool configured_
 
std::vector< std::vector< std::string > > datasetContents_
 
std::vector< std::string > datasetNames_
 
std::vector< std::vector< unsigned int > > dsIndex_
 
std::vector< std::vector< unsigned int > > hlIndex_
 
std::vector< std::string > hlNames_
 
HLTConfigProvider hltConfig_
 
const edm::InputTag hlTriggerResults_
 
const edm::EDGetTokenT< edm::TriggerResultshlTriggerResultsToken_
 
bool isCustomDatasets_
 
bool isCustomStreams_
 
std::vector< int > posL1s_
 
std::vector< int > posPre_
 
unsigned int refIndex_
 
std::string refPath_
 
const double refRate_
 
const ReportEvery reportBy_
 
const ReportEvery resetBy_
 
const ReportEvery serviceBy_
 
std::vector< std::vector< std::string > > streamContents_
 
std::vector< std::string > streamNames_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

See header file for documentation

Author
Martin Grunewald

This class is an EDAnalyzer implementing TrigReport (statistics printed to log file) for HL triggers

Author
Martin Grunewald

Definition at line 63 of file HLTrigReport.h.

Member Typedef Documentation

◆ Accumulate

Definition at line 69 of file HLTrigReport.h.

Member Enumeration Documentation

◆ ReportEvery

Enumerator
NEVER 
EVERY_EVENT 
EVERY_LUMI 
EVERY_RUN 
EVERY_JOB 

Definition at line 66 of file HLTrigReport.h.

Constructor & Destructor Documentation

◆ HLTrigReport()

HLTrigReport::HLTrigReport ( const edm::ParameterSet iConfig)
explicit

Definition at line 152 of file HLTrigReport.cc.

References datasetContents_, datasetNames_, edm::InputTag::encode(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), edm::ParameterSet::getUntrackedParameter(), hlTriggerResults_, isCustomDatasets_, isCustomStreams_, LogDebug, Skims_PA_cff::name, NEVER, refIndex_, refPath_, refRate_, serviceBy_, streamContents_, streamNames_, and AlCaHLTBitMon_QueryRunRegistry::string.

153  : hlTriggerResults_(iConfig.getParameter<edm::InputTag>("HLTriggerResults")),
154  hlTriggerResultsToken_(consumes<edm::TriggerResults>(hlTriggerResults_)),
155  configured_(false),
156  hlNames_(0),
157  hlIndex_(0),
158  posL1s_(0),
159  posPre_(0),
160  datasetNames_(0),
161  datasetContents_(0),
162  isCustomDatasets_(false),
163  dsIndex_(0),
164  streamNames_(0),
165  streamContents_(0),
166  isCustomStreams_(false),
167  refPath_("HLTriggerFinalPath"),
168  refIndex_(0),
169  refRate_(iConfig.getUntrackedParameter<double>("ReferenceRate", 100.0)),
170  reportBy_(decode(iConfig.getUntrackedParameter<std::string>("reportBy", "job"))),
171  resetBy_(decode(iConfig.getUntrackedParameter<std::string>("resetBy", "never"))),
172  serviceBy_(decode(iConfig.getUntrackedParameter<std::string>("serviceBy", "never"))),
173  hltConfig_() {
174  const edm::ParameterSet customDatasets(
175  iConfig.getUntrackedParameter<edm::ParameterSet>("CustomDatasets", edm::ParameterSet()));
176  isCustomDatasets_ = (customDatasets != edm::ParameterSet());
177  if (isCustomDatasets_) {
178  datasetNames_ = customDatasets.getParameterNamesForType<std::vector<std::string> >();
179  for (std::vector<std::string>::const_iterator name = datasetNames_.begin(); name != datasetNames_.end(); name++) {
180  datasetContents_.push_back(customDatasets.getParameter<std::vector<std::string> >(*name));
181  }
182  }
183 
184  const edm::ParameterSet customStreams(
185  iConfig.getUntrackedParameter<edm::ParameterSet>("CustomStreams", edm::ParameterSet()));
186  isCustomStreams_ = (customStreams != edm::ParameterSet());
187  if (isCustomStreams_) {
188  streamNames_ = customStreams.getParameterNamesForType<std::vector<std::string> >();
189  for (std::vector<std::string>::const_iterator name = streamNames_.begin(); name != streamNames_.end(); name++) {
190  streamContents_.push_back(customStreams.getParameter<std::vector<std::string> >(*name));
191  }
192  }
193 
194  refPath_ = iConfig.getUntrackedParameter<std::string>("ReferencePath", "HLTriggerFinalPath");
195  refIndex_ = 0;
196 
197  LogDebug("HLTrigReport") << "HL TiggerResults: " + hlTriggerResults_.encode()
198  << " using reference path and rate: " + refPath_ + " " << refRate_;
199 
201  edm::Service<HLTrigReportService>()->registerModule(this);
202  }
203 }
std::vector< std::vector< std::string > > datasetContents_
Definition: HLTrigReport.h:125
bool isCustomStreams_
Definition: HLTrigReport.h:131
bool isCustomDatasets_
Definition: HLTrigReport.h:126
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
const ReportEvery resetBy_
Definition: HLTrigReport.h:137
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
std::string encode() const
Definition: InputTag.cc:159
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:124
static ReportEvery decode(const std::string &value)
Definition: HLTrigReport.cc:24
std::vector< int > posL1s_
Definition: HLTrigReport.h:121
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > posPre_
Definition: HLTrigReport.h:122
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:129
unsigned int refIndex_
Definition: HLTrigReport.h:133
const edm::EDGetTokenT< edm::TriggerResults > hlTriggerResultsToken_
Definition: HLTrigReport.h:113
std::string refPath_
Definition: HLTrigReport.h:132
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:139
std::vector< std::vector< std::string > > streamContents_
Definition: HLTrigReport.h:130
const double refRate_
Definition: HLTrigReport.h:134
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
const edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:112
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128
#define LogDebug(id)

◆ ~HLTrigReport()

HLTrigReport::~HLTrigReport ( )
overridedefault

Member Function Documentation

◆ analyze()

void HLTrigReport::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 407 of file HLTrigReport.cc.

References accept(), edm::HLTGlobalStatus::accept(), chooseAccumulate(), configured_, dsIndex_, dumpReport(), edm::InputTag::encode(), edm::HLTGlobalStatus::error(), EVERY_EVENT, hlIndex_, hlNames_, hlTriggerResults_, hlTriggerResultsToken_, mps_fire::i, iEvent, caHitNtupletGeneratorKernels::if(), edm::HLTGlobalStatus::index(), edm::HandleBase::isValid(), LogDebug, dqmiodumpmetadata::n, or, AlCaHLTBitMon_ParallelJobs::p, posL1s_, posPre_, reportBy_, hltrigreport::Accumulate::reset(), resetBy_, alignCSCRings::s, serviceBy_, cms::cuda::stream, updateService(), and edm::HLTGlobalStatus::wasrun().

407  {
408  // accumulation of statistics event by event
409 
410  using namespace std;
411  using namespace edm;
412 
413  auto& accumulate = chooseAccumulate(iEvent.getLuminosityBlock().index());
414  if (resetBy_ == EVERY_EVENT) {
415  //NOTE if we have reportBy == lumi/run/job then we will report the last
416  // event in each lumi/run/job
417  accumulate.reset();
418  }
419 
420  accumulate.nEvents_++;
421 
422  // get hold of TriggerResults
424  iEvent.getByToken(hlTriggerResultsToken_, HLTR);
425  if (HLTR.isValid()) {
426  if (HLTR->wasrun())
427  accumulate.nWasRun_++;
428  const bool accept(HLTR->accept());
429  LogDebug("HLTrigReport") << "HLT TriggerResults decision: " << accept;
430  if (accept)
431  ++accumulate.nAccept_;
432  if (HLTR->error())
433  accumulate.nErrors_++;
434  } else {
435  LogDebug("HLTrigReport") << "HLT TriggerResults with label [" + hlTriggerResults_.encode() + "] not found!";
436  accumulate.nErrors_++;
437  return;
438  }
439 
440  // HLTConfigProvider not configured - cannot produce any detailed statistics
441  if (not configured_)
442  return;
443 
444  // decision for each HL algorithm
445  const unsigned int n(hlNames_.size());
446  bool acceptedByPrevoiusPaths = false;
447  for (unsigned int i = 0; i != n; ++i) {
448  if (HLTR->wasrun(i))
449  accumulate.hlWasRun_[i]++;
450  if (HLTR->accept(i)) {
451  acceptedByPrevoiusPaths = true;
452  accumulate.hlAccept_[i]++;
453  }
454  if (acceptedByPrevoiusPaths)
455  accumulate.hlAccTot_[i]++;
456  if (HLTR->error(i))
457  accumulate.hlErrors_[i]++;
458  const int index(static_cast<int>(HLTR->index(i)));
459  if (HLTR->accept(i)) {
460  if (index >= posL1s_[i])
461  accumulate.hltL1s_[i]++;
462  if (index >= posPre_[i])
463  accumulate.hltPre_[i]++;
464  } else {
465  if (index > posL1s_[i])
466  accumulate.hltL1s_[i]++;
467  if (index > posPre_[i])
468  accumulate.hltPre_[i]++;
469  }
470  }
471 
472  // calculate accumulation of accepted events by a path within a dataset
473  std::vector<bool> acceptedByDS(hlIndex_.size(), false);
474  for (size_t ds = 0; ds < hlIndex_.size(); ++ds) {
475  for (size_t p = 0; p < hlIndex_[ds].size(); ++p) {
476  if (acceptedByDS[ds] or HLTR->accept(hlIndex_[ds][p])) {
477  acceptedByDS[ds] = true;
478  accumulate.hlAccTotDS_[ds][p]++;
479  }
480  }
481  if (acceptedByDS[ds])
482  accumulate.hlAllTotDS_[ds]++;
483  }
484 
485  // calculate accumulation of accepted events by a dataset within a stream
486  for (size_t s = 0; s < dsIndex_.size(); ++s) {
487  bool acceptedByS = false;
488  for (size_t ds = 0; ds < dsIndex_[s].size(); ++ds) {
489  if (acceptedByS or acceptedByDS[dsIndex_[s][ds]]) {
490  acceptedByS = true;
491  accumulate.dsAccTotS_[s][ds]++;
492  }
493  }
494  if (acceptedByS)
495  accumulate.dsAllTotS_[s]++;
496  }
497 
498  if (reportBy_ == EVERY_EVENT) {
499  std::stringstream stream;
500  stream << "Summary for Run " << iEvent.run() << ", LumiSection " << iEvent.luminosityBlock() << ", Event "
501  << iEvent.id();
502  dumpReport(accumulate, stream.str());
503  }
504  if (serviceBy_ == EVERY_EVENT) {
505  updateService(accumulate);
506  }
507 }
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
bool accept() const
Has at least one path accepted the event?
hltrigreport::Accumulate & chooseAccumulate(edm::LuminosityBlockIndex index)
Definition: HLTrigReport.h:96
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
const ReportEvery resetBy_
Definition: HLTrigReport.h:137
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
bool error() const
Has any path encountered an error (exception)
std::string encode() const
Definition: InputTag.cc:159
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
void updateService(Accumulate const &accumulate) const
std::vector< int > posL1s_
Definition: HLTrigReport.h:121
bool wasrun() const
Was at least one path run?
std::vector< int > posPre_
Definition: HLTrigReport.h:122
int iEvent
Definition: GenABIO.cc:224
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
Definition: Activities.doc:12
void dumpReport(hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
const edm::EDGetTokenT< edm::TriggerResults > hlTriggerResultsToken_
Definition: HLTrigReport.h:113
bool isValid() const
Definition: HandleBase.h:70
HLT enums.
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
const edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:112
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128
#define LogDebug(id)

◆ beginJob()

void HLTrigReport::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 318 of file HLTrigReport.cc.

References EVERY_JOB, reset(), and resetBy_.

318  {
319  if (resetBy_ == EVERY_JOB)
320  reset();
321 }
const ReportEvery resetBy_
Definition: HLTrigReport.h:137

◆ beginRun()

void HLTrigReport::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 331 of file HLTrigReport.cc.

References hlx_dqm_sourceclient_cfi::Accumulate, accumulate_, configured_, dsIndex_, dumpReport(), EVERY_RUN, hlIndex_, hlNames_, hltConfig_, hlTriggerResults_, HLTConfigProvider::init(), edm::InputTag::process(), reset(), resetBy_, and updateConfigCache().

331  {
332  bool changed = true;
333  if (hltConfig_.init(iRun, iSetup, hlTriggerResults_.process(), changed)) {
334  configured_ = true;
335  if (changed) {
336  dumpReport(accumulate_, "Summary for this HLT table");
339  }
340  } else {
341  dumpReport(accumulate_, "Summary for this HLT table");
342  // cannot initialize the HLT menu - reset and clear all counters and tables
343  configured_ = false;
344 
346  }
347 
348  if (resetBy_ == EVERY_RUN)
349  reset();
350 }
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
const ReportEvery resetBy_
Definition: HLTrigReport.h:137
void updateConfigCache()
void dumpReport(hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:139
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
const edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:112
std::string const & process() const
Definition: InputTag.h:40
hltrigreport::Accumulate Accumulate
Definition: HLTrigReport.h:69
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128

◆ chooseAccumulate()

hltrigreport::Accumulate& HLTrigReport::chooseAccumulate ( edm::LuminosityBlockIndex  index)
inlineprivate

Definition at line 96 of file HLTrigReport.h.

References accumulate_, and useLumiCache().

Referenced by analyze().

96  {
97  if (useLumiCache()) {
98  return *luminosityBlockCache(index);
99  }
100  return accumulate_;
101  }
bool useLumiCache() const
Definition: HLTrigReport.h:102
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141

◆ datasetNames()

const std::vector< std::string > & HLTrigReport::datasetNames ( ) const

Definition at line 228 of file HLTrigReport.cc.

References datasetNames_.

228 { return datasetNames_; }
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:124

◆ decode()

HLTrigReport::ReportEvery HLTrigReport::decode ( const std::string &  value)
static

Definition at line 24 of file HLTrigReport.cc.

References EVERY_EVENT, EVERY_JOB, EVERY_LUMI, EVERY_RUN, Exception, and NEVER.

24  {
25  if (value == "never")
26  return NEVER;
27 
28  if (value == "job")
29  return EVERY_JOB;
30 
31  if (value == "run")
32  return EVERY_RUN;
33 
34  if (value == "lumi")
35  return EVERY_LUMI;
36 
37  if (value == "event")
38  return EVERY_EVENT;
39 
40  throw cms::Exception("Configuration") << "Invalid option value \"" << value
41  << "\". Legal values are \"job\", \"run\", \"lumi\", \"event\" and \"never\".";
42 }
Definition: value.py:1

◆ dumpReport()

void HLTrigReport::dumpReport ( hltrigreport::Accumulate const &  accumulate,
std::string const &  header = std::string() 
) const
private

Definition at line 517 of file HLTrigReport.cc.

References simBeamSpotPI::alpha, configured_, datasetNames_, TauDecayModes::dec, hltrigreport::Accumulate::dsAccTotS_, hltrigreport::Accumulate::dsAllTotS_, dsIndex_, alignBH_cfg::fixed, RecoTauValidation_cfi::header, hltrigreport::Accumulate::hlAccept_, hltrigreport::Accumulate::hlAccTot_, hltrigreport::Accumulate::hlAccTotDS_, hltrigreport::Accumulate::hlAllTotDS_, hltrigreport::Accumulate::hlErrors_, hlIndex_, hlNames_, hltrigreport::Accumulate::hltL1s_, hltrigreport::Accumulate::hltPre_, hltrigreport::Accumulate::hlWasRun_, mps_fire::i, SiStripPI::max, dqmiodumpmetadata::n, hltrigreport::Accumulate::nAccept_, hltrigreport::Accumulate::nErrors_, hltrigreport::Accumulate::nEvents_, hltrigreport::Accumulate::nWasRun_, AlCaHLTBitMon_ParallelJobs::p, refIndex_, refRate_, alignCSCRings::s, pfClustersFromCombinedCaloHF_cfi::scale, and streamNames_.

Referenced by analyze(), beginRun(), endJob(), endRun(), and globalEndLuminosityBlock().

518  {
519  // final printout of accumulated statistics
520 
521  using namespace std;
522  using namespace edm;
523  const unsigned int n(hlNames_.size());
524 
525  if ((n == 0) and (accumulate.nEvents_ == 0))
526  return;
527 
528  LogVerbatim("HLTrigReport") << dec << endl;
529  LogVerbatim("HLTrigReport") << "HLT-Report "
530  << "---------- Event Summary ------------" << endl;
531  if (not header.empty())
532  LogVerbatim("HLTrigReport") << "HLT-Report " << header << endl;
533  LogVerbatim("HLTrigReport") << "HLT-Report"
534  << " Events total = " << accumulate.nEvents_ << " wasrun = " << accumulate.nWasRun_
535  << " passed = " << accumulate.nAccept_ << " errors = " << accumulate.nErrors_ << endl;
536 
537  // HLTConfigProvider not configured - cannot produce any detailed statistics
538  if (not configured_)
539  return;
540 
541  double scale = accumulate.hlAccept_[refIndex_] > 0 ? refRate_ / accumulate.hlAccept_[refIndex_] : 0.;
542  double alpha = 1 - (1.0 - .6854) / 2; // for the Clopper-Pearson 68% CI
543 
544  LogVerbatim("HLTrigReport") << endl;
545  LogVerbatim("HLTrigReport") << "HLT-Report "
546  << "---------- HLTrig Summary ------------" << endl;
547  LogVerbatim("HLTrigReport") << "HLT-Report " << right << setw(7) << "HLT #"
548  << " " << right << setw(7) << "WasRun"
549  << " " << right << setw(7) << "L1S"
550  << " " << right << setw(7) << "Pre"
551  << " " << right << setw(7) << "HLT"
552  << " " << right << setw(9) << "%L1sPre"
553  << " " << right << setw(7) << "Rate"
554  << " " << right << setw(7) << "RateHi"
555  << " " << right << setw(7) << "Errors"
556  << " "
557  << "Name" << endl;
558 
559  if (n > 0) {
560  for (unsigned int i = 0; i != n; ++i) {
561  LogVerbatim("HLTrigReport")
562  << "HLT-Report " << right << setw(7) << i << " " << right << setw(7) << accumulate.hlWasRun_[i] << " "
563  << right << setw(7) << accumulate.hltL1s_[i] << " " << right << setw(7) << accumulate.hltPre_[i] << " "
564  << right << setw(7) << accumulate.hlAccept_[i] << " " << right << setw(9) << fixed << setprecision(5)
565  << static_cast<float>(100 * accumulate.hlAccept_[i]) / static_cast<float>(max(accumulate.hltPre_[i], 1u))
566  << " " << right << setw(7) << fixed << setprecision(1) << scale * accumulate.hlAccept_[i] << " " << right
567  << setw(7) << fixed << setprecision(1)
568  << ((accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[i] > 0)
569  ? refRate_ * ROOT::Math::beta_quantile(alpha,
570  accumulate.hlAccept_[i] + 1,
571  accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[i])
572  : 0)
573  << " " << right << setw(7) << accumulate.hlErrors_[i] << " " << hlNames_[i] << endl;
574  }
575  }
576 
577  LogVerbatim("HLTrigRprtTt") << endl;
578  LogVerbatim("HLTrigRprtTt") << "HLT-Report "
579  << "---------- HLTrig Summary ------------" << endl;
580  LogVerbatim("HLTrigRprtTt") << "HLT-Report " << right << setw(7) << "HLT #"
581  << " " << right << setw(7) << "WasRun"
582  << " " << right << setw(7) << "L1S"
583  << " " << right << setw(7) << "Pre"
584  << " " << right << setw(7) << "HLT"
585  << " " << right << setw(9) << "%L1sPre"
586  << " " << right << setw(7) << "Rate"
587  << " " << right << setw(7) << "RateHi"
588  << " " << right << setw(7) << "HLTtot"
589  << " " << right << setw(7) << "RateTot"
590  << " " << right << setw(7) << "Errors"
591  << " "
592  << "Name" << endl;
593 
594  if (n > 0) {
595  for (unsigned int i = 0; i != n; ++i) {
596  LogVerbatim("HLTrigRprtTt")
597  << "HLT-Report " << right << setw(7) << i << " " << right << setw(7) << accumulate.hlWasRun_[i] << " "
598  << right << setw(7) << accumulate.hltL1s_[i] << " " << right << setw(7) << accumulate.hltPre_[i] << " "
599  << right << setw(7) << accumulate.hlAccept_[i] << " " << right << setw(9) << fixed << setprecision(5)
600  << static_cast<float>(100 * accumulate.hlAccept_[i]) / static_cast<float>(max(accumulate.hltPre_[i], 1u))
601  << " " << right << setw(7) << fixed << setprecision(1) << scale * accumulate.hlAccept_[i] << " " << right
602  << setw(7) << fixed << setprecision(1)
603  << ((accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[i] > 0)
604  ? refRate_ * ROOT::Math::beta_quantile(alpha,
605  accumulate.hlAccept_[i] + 1,
606  accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[i])
607  : 0)
608  << " " << right << setw(7) << accumulate.hlAccTot_[i] << " " << right << setw(7) << fixed << setprecision(1)
609  << scale * accumulate.hlAccTot_[i] << " " << right << setw(7) << accumulate.hlErrors_[i] << " " << hlNames_[i]
610  << endl;
611  }
612 
613  // now for each dataset
614  for (size_t ds = 0; ds < hlIndex_.size(); ++ds) {
615  LogVerbatim("HLTrigRprtPD") << endl;
616  LogVerbatim("HLTrigRprtPD") << "HLT-Report "
617  << "---------- Dataset Summary: " << datasetNames_[ds] << " ------------"
618  << accumulate.hlAllTotDS_[ds] << endl;
619  LogVerbatim("HLTrigRprtPD") << "HLT-Report " << right << setw(7) << "HLT #"
620  << " " << right << setw(7) << "WasRun"
621  << " " << right << setw(7) << "L1S"
622  << " " << right << setw(7) << "Pre"
623  << " " << right << setw(7) << "HLT"
624  << " " << right << setw(9) << "%L1sPre"
625  << " " << right << setw(7) << "Rate"
626  << " " << right << setw(7) << "RateHi"
627  << " " << right << setw(7) << "HLTtot"
628  << " " << right << setw(7) << "RateTot"
629  << " " << right << setw(7) << "Errors"
630  << " "
631  << "Name" << endl;
632  for (size_t p = 0; p < hlIndex_[ds].size(); ++p) {
633  LogVerbatim("HLTrigRprtPD")
634  << "HLT-Report " << right << setw(7) << p << " " << right << setw(7)
635  << accumulate.hlWasRun_[hlIndex_[ds][p]] << " " << right << setw(7) << accumulate.hltL1s_[hlIndex_[ds][p]]
636  << " " << right << setw(7) << accumulate.hltPre_[hlIndex_[ds][p]] << " " << right << setw(7)
637  << accumulate.hlAccept_[hlIndex_[ds][p]] << " " << right << setw(9) << fixed << setprecision(5)
638  << static_cast<float>(100 * accumulate.hlAccept_[hlIndex_[ds][p]]) /
639  static_cast<float>(max(accumulate.hltPre_[hlIndex_[ds][p]], 1u))
640  << " " << right << setw(7) << fixed << setprecision(1) << scale * accumulate.hlAccept_[hlIndex_[ds][p]]
641  << " " << right << setw(7) << fixed << setprecision(1)
642  << ((accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[hlIndex_[ds][p]] > 0)
643  ? refRate_ * ROOT::Math::beta_quantile(
644  alpha,
645  accumulate.hlAccept_[hlIndex_[ds][p]] + 1,
646  accumulate.hlAccept_[refIndex_] - accumulate.hlAccept_[hlIndex_[ds][p]])
647  : 0)
648  << " " << right << setw(7) << accumulate.hlAccTotDS_[ds][p] << " " << right << setw(7) << fixed
649  << setprecision(1) << scale * accumulate.hlAccTotDS_[ds][p] << " " << right << setw(7)
650  << accumulate.hlErrors_[hlIndex_[ds][p]] << " " << hlNames_[hlIndex_[ds][p]] << endl;
651  }
652  }
653 
654  // now for each stream
655  for (size_t s = 0; s < dsIndex_.size(); ++s) {
656  LogVerbatim("HLTrigRprtST") << endl;
657  LogVerbatim("HLTrigRprtST") << "HLT-Report "
658  << "---------- Stream Summary: " << streamNames_[s] << " ------------"
659  << accumulate.dsAllTotS_[s] << endl;
660  LogVerbatim("HLTrigRprtST") << "HLT-Report " << right << setw(10) << "Dataset #"
661  << " " << right << setw(10) << "Individual"
662  << " " << right << setw(10) << "Total"
663  << " " << right << setw(10) << "Rate"
664  << " " << right << setw(10) << "RateHi"
665  << " " << right << setw(10) << "RateTot"
666  << " "
667  << "Name" << endl;
668  for (size_t ds = 0; ds < dsIndex_[s].size(); ++ds) {
669  unsigned int acceptedDS = accumulate.hlAccTotDS_[dsIndex_[s][ds]][hlIndex_[dsIndex_[s][ds]].size() - 1];
670  LogVerbatim("HLTrigRprtST")
671  << "HLT-Report " << right << setw(10) << ds << " " << right << setw(10) << acceptedDS << " " << right
672  << setw(10) << accumulate.dsAccTotS_[s][ds] << " " << right << setw(10) << fixed << setprecision(1)
673  << scale * acceptedDS << " " << right << setw(10) << fixed << setprecision(1)
674  << ((accumulate.hlAccept_[refIndex_] - acceptedDS > 0)
675  ? refRate_ *
676  ROOT::Math::beta_quantile(alpha, acceptedDS + 1, accumulate.hlAccept_[refIndex_] - acceptedDS)
677  : 0)
678  << " " << right << setw(10) << fixed << setprecision(1) << scale * accumulate.dsAccTotS_[s][ds] << " "
679  << datasetNames_[dsIndex_[s][ds]] << endl;
680  }
681  }
682 
683  } else {
684  LogVerbatim("HLTrigReport") << "HLT-Report - No HLT paths found!" << endl;
685  }
686 
687  LogVerbatim("HLTrigReport") << endl;
688  LogVerbatim("HLTrigReport") << "HLT-Report end!" << endl;
689  LogVerbatim("HLTrigReport") << endl;
690 
691  return;
692 }
Log< level::Info, true > LogVerbatim
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:124
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:129
unsigned int refIndex_
Definition: HLTrigReport.h:133
const double refRate_
Definition: HLTrigReport.h:134
HLT enums.
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128

◆ endJob()

void HLTrigReport::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 323 of file HLTrigReport.cc.

References accumulate_, dumpReport(), EVERY_JOB, reportBy_, serviceBy_, and updateService().

323  {
324  if (reportBy_ == EVERY_JOB)
325  dumpReport(accumulate_, "Summary for Job");
326  if (serviceBy_ == EVERY_JOB) {
328  }
329 }
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
void updateService(Accumulate const &accumulate) const
void dumpReport(hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138

◆ endRun()

void HLTrigReport::endRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
override

Definition at line 352 of file HLTrigReport.cc.

References accumulate_, dumpReport(), EVERY_RUN, reportBy_, writedatasetfile::run, serviceBy_, cms::cuda::stream, and updateService().

352  {
353  if (reportBy_ == EVERY_RUN) {
354  std::stringstream stream;
355  stream << "Summary for Run " << run.run();
356  dumpReport(accumulate_, stream.str());
357  }
358  if (serviceBy_ == EVERY_RUN) {
360  }
361 }
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void updateService(Accumulate const &accumulate) const
void dumpReport(hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138

◆ fillDescriptions()

void HLTrigReport::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 207 of file HLTrigReport.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

207  {
209  desc.add<edm::InputTag>("HLTriggerResults", edm::InputTag("TriggerResults", "", "HLT"));
210  desc.addUntracked<std::string>("reportBy", "job");
211  desc.addUntracked<std::string>("resetBy", "never");
212  desc.addUntracked<std::string>("serviceBy", "never");
213 
214  edm::ParameterSetDescription customDatasetsParameters;
215  desc.addUntracked<edm::ParameterSetDescription>("CustomDatasets", customDatasetsParameters);
216  edm::ParameterSetDescription customStreamsParameters;
217  desc.addUntracked<edm::ParameterSetDescription>("CustomStreams", customStreamsParameters);
218  desc.addUntracked<std::string>("ReferencePath", "HLTriggerFinalPath");
219  desc.addUntracked<double>("ReferenceRate", 100.0);
220 
221  descriptions.add("hltTrigReport", desc);
222 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ globalBeginLuminosityBlock()

std::shared_ptr< HLTrigReport::Accumulate > HLTrigReport::globalBeginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
) const
override

Definition at line 363 of file HLTrigReport.cc.

References configured_, dsIndex_, hlIndex_, hlNames_, and useLumiCache().

364  {
365  if (useLumiCache()) {
366  if (not configured_) {
367  return std::make_shared<Accumulate>();
368  }
369  return std::make_shared<Accumulate>(hlNames_.size(), hlIndex_, dsIndex_);
370  }
371  return std::shared_ptr<Accumulate>();
372 }
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
bool useLumiCache() const
Definition: HLTrigReport.h:102
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128

◆ globalEndLuminosityBlock()

void HLTrigReport::globalEndLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
override

Definition at line 374 of file HLTrigReport.cc.

References hltrigreport::Accumulate::accumulate(), accumulate_, dumpReport(), EVERY_EVENT, EVERY_JOB, EVERY_LUMI, EVERY_RUN, eostools::move(), NEVER, or, readAfterLumi(), reportBy_, resetBy_, serviceBy_, cms::cuda::stream, updateService(), and useLumiCache().

374  {
375  if (not useLumiCache()) {
376  return;
377  }
378 
379  if (resetBy_ == EVERY_LUMI and readAfterLumi()) {
380  //we will be reporting the last processed lumi
381  accumulate_ = std::move(*luminosityBlockCache(lumi.index()));
383  //we need to add this lumi's info to the longer lived accumulation
384  accumulate_.accumulate(*luminosityBlockCache(lumi.index()));
385  }
386 
387  if (reportBy_ == EVERY_LUMI) {
388  std::stringstream stream;
389  stream << "Summary for Run " << lumi.run() << ", LumiSection " << lumi.luminosityBlock();
391  dumpReport(*luminosityBlockCache(lumi.index()), stream.str());
392  } else {
393  dumpReport(accumulate_, stream.str());
394  }
395  }
396 
397  if (serviceBy_ == EVERY_LUMI) {
399  updateService(*luminosityBlockCache(lumi.index()));
400  } else {
402  }
403  }
404 }
const ReportEvery resetBy_
Definition: HLTrigReport.h:137
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
bool useLumiCache() const
Definition: HLTrigReport.h:102
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void updateService(Accumulate const &accumulate) 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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
void dumpReport(hltrigreport::Accumulate const &accumulate, std::string const &header=std::string()) const
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141
void accumulate(Accumulate const &)
Definition: HLTrigReport.cc:87
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138
def move(src, dest)
Definition: eostools.py:511
bool readAfterLumi() const
Definition: HLTrigReport.h:103

◆ readAfterLumi()

bool HLTrigReport::readAfterLumi ( ) const
inlineprivate

Definition at line 103 of file HLTrigReport.h.

References EVERY_JOB, EVERY_RUN, or, reportBy_, and serviceBy_.

Referenced by globalEndLuminosityBlock().

103  {
105  }
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
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
Definition: Activities.doc:12
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138

◆ reset()

void HLTrigReport::reset ( void  )
private

Definition at line 316 of file HLTrigReport.cc.

References accumulate_, and hltrigreport::Accumulate::reset().

Referenced by beginJob(), and beginRun().

316 { accumulate_.reset(); }
hltrigreport::Accumulate accumulate_
Definition: HLTrigReport.h:141

◆ streamNames()

const std::vector< std::string > & HLTrigReport::streamNames ( ) const

Definition at line 229 of file HLTrigReport.cc.

References streamNames_.

229 { return streamNames_; }
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:129

◆ updateConfigCache()

void HLTrigReport::updateConfigCache ( )
private

Definition at line 231 of file HLTrigReport.cc.

References HLTConfigProvider::datasetContents(), datasetContents_, HLTConfigProvider::datasetNames(), datasetNames_, dsIndex_, hlIndex_, hlNames_, hltConfig_, mps_fire::i, isCustomDatasets_, isCustomStreams_, dqmiolumiharvest::j, label, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), dqmiodumpmetadata::n, NEVER, AlCaHLTBitMon_ParallelJobs::p, posL1s_, posPre_, refIndex_, refPath_, alignCSCRings::s, serviceBy_, findQualityFiles::size, HLTConfigProvider::streamContents(), streamContents_, HLTConfigProvider::streamNames(), streamNames_, AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerIndex(), and HLTConfigProvider::triggerNames().

Referenced by beginRun().

231  {
232  // update trigger names
234 
235  const unsigned int n = hlNames_.size();
236 
237  // find the positions of seeding and prescaler modules
238  posL1s_.resize(n);
239  posPre_.resize(n);
240  for (unsigned int i = 0; i < n; ++i) {
241  posL1s_[i] = -1;
242  posPre_[i] = -1;
243  const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(i));
244  for (unsigned int j = 0; j < moduleLabels.size(); ++j) {
245  const std::string& label = hltConfig_.moduleType(moduleLabels[j]);
246  if (label == "HLTLevel1GTSeed")
247  posL1s_[i] = j;
248  else if (label == "HLTPrescaler")
249  posPre_[i] = j;
250  }
251  }
252 
253  // if not overridden, reload the datasets and streams
254  if (not isCustomDatasets_) {
257  }
258  if (not isCustomStreams_) {
261  }
262 
263  // fill the matrices of hlIndex_, hlAccTotDS_
264  hlIndex_.clear();
265  hlIndex_.resize(datasetNames_.size());
266  for (unsigned int ds = 0; ds < datasetNames_.size(); ds++) {
267  unsigned int size = datasetContents_[ds].size();
268  hlIndex_[ds].reserve(size);
269  for (unsigned int p = 0; p < size; ++p) {
270  unsigned int i = hltConfig_.triggerIndex(datasetContents_[ds][p]);
271  if (i < n) {
272  hlIndex_[ds].push_back(i);
273  }
274  }
275  }
276 
277  // fill the matrices of dsIndex_, dsAccTotS_
278  dsIndex_.clear();
279  dsIndex_.resize(streamNames_.size());
280  for (unsigned int s = 0; s < streamNames_.size(); ++s) {
281  unsigned int size = streamContents_[s].size();
282  dsIndex_.reserve(size);
283  for (unsigned int ds = 0; ds < size; ++ds) {
284  unsigned int i = 0;
285  for (; i < datasetNames_.size(); i++)
286  if (datasetNames_[i] == streamContents_[s][ds])
287  break;
288  // report only datasets that have at least one path otherwise crash
289  if (i < datasetNames_.size() and !hlIndex_[i].empty()) {
290  dsIndex_[s].push_back(i);
291  }
292  }
293  }
294 
295  // if needed, update the reference path
297  if (refIndex_ >= n) {
298  refIndex_ = 0;
299  edm::LogWarning("HLTrigReport") << "Requested reference path '" + refPath_ + "' not in HLT menu. "
300  << "Using HLTriggerFinalPath instead.";
301  refPath_ = "HLTriggerFinalPath";
303  if (refIndex_ >= n) {
304  refIndex_ = 0;
305  edm::LogWarning("HLTrigReport") << "Requested reference path '" + refPath_ + "' not in HLT menu. "
306  << "Using first path in table (index=0) instead.";
307  }
308  }
309 
313  }
314 }
size
Write out results.
std::vector< std::vector< std::string > > datasetContents_
Definition: HLTrigReport.h:125
bool isCustomStreams_
Definition: HLTrigReport.h:131
bool isCustomDatasets_
Definition: HLTrigReport.h:126
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:116
const std::string moduleType(const std::string &module) const
C++ class name of module.
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:124
std::vector< int > posL1s_
Definition: HLTrigReport.h:121
std::vector< int > posPre_
Definition: HLTrigReport.h:122
char const * label
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:129
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
unsigned int refIndex_
Definition: HLTrigReport.h:133
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
std::string refPath_
Definition: HLTrigReport.h:132
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:139
std::vector< std::vector< std::string > > streamContents_
Definition: HLTrigReport.h:130
const std::vector< std::string > & streamNames() const
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
const std::vector< std::string > & triggerNames() const
names of trigger paths
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:119
Log< level::Warning, false > LogWarning
const std::vector< std::string > & datasetNames() const
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:128

◆ updateService()

void HLTrigReport::updateService ( Accumulate const &  accumulate) const
private

Definition at line 509 of file HLTrigReport.cc.

References hltrigreport::Accumulate::dsAllTotS_, hltrigreport::Accumulate::hlAllTotDS_, and alignCSCRings::s.

Referenced by analyze(), endJob(), endRun(), and globalEndLuminosityBlock().

509  {
511  if (s) {
512  s->setDatasetCounts(accumulate.hlAllTotDS_);
513  s->setStreamCounts(accumulate.dsAllTotS_);
514  }
515 }

◆ useLumiCache()

bool HLTrigReport::useLumiCache ( ) const
inlineprivate

Definition at line 102 of file HLTrigReport.h.

References EVERY_LUMI, or, reportBy_, resetBy_, and serviceBy_.

Referenced by chooseAccumulate(), globalBeginLuminosityBlock(), and globalEndLuminosityBlock().

const ReportEvery resetBy_
Definition: HLTrigReport.h:137
const ReportEvery reportBy_
Definition: HLTrigReport.h:136
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
Definition: Activities.doc:12
const ReportEvery serviceBy_
Definition: HLTrigReport.h:138

Member Data Documentation

◆ accumulate_

hltrigreport::Accumulate HLTrigReport::accumulate_
private

◆ configured_

bool HLTrigReport::configured_
private

Definition at line 114 of file HLTrigReport.h.

Referenced by analyze(), beginRun(), dumpReport(), and globalBeginLuminosityBlock().

◆ datasetContents_

std::vector<std::vector<std::string> > HLTrigReport::datasetContents_
private

Definition at line 125 of file HLTrigReport.h.

Referenced by HLTrigReport(), and updateConfigCache().

◆ datasetNames_

std::vector<std::string> HLTrigReport::datasetNames_
private

Definition at line 124 of file HLTrigReport.h.

Referenced by datasetNames(), dumpReport(), HLTrigReport(), and updateConfigCache().

◆ dsIndex_

std::vector<std::vector<unsigned int> > HLTrigReport::dsIndex_
private

◆ hlIndex_

std::vector<std::vector<unsigned int> > HLTrigReport::hlIndex_
private

◆ hlNames_

std::vector<std::string> HLTrigReport::hlNames_
private

◆ hltConfig_

HLTConfigProvider HLTrigReport::hltConfig_
private

Definition at line 139 of file HLTrigReport.h.

Referenced by beginRun(), and updateConfigCache().

◆ hlTriggerResults_

const edm::InputTag HLTrigReport::hlTriggerResults_
private

Definition at line 112 of file HLTrigReport.h.

Referenced by analyze(), beginRun(), and HLTrigReport().

◆ hlTriggerResultsToken_

const edm::EDGetTokenT<edm::TriggerResults> HLTrigReport::hlTriggerResultsToken_
private

Definition at line 113 of file HLTrigReport.h.

Referenced by analyze().

◆ isCustomDatasets_

bool HLTrigReport::isCustomDatasets_
private

Definition at line 126 of file HLTrigReport.h.

Referenced by HLTrigReport(), and updateConfigCache().

◆ isCustomStreams_

bool HLTrigReport::isCustomStreams_
private

Definition at line 131 of file HLTrigReport.h.

Referenced by HLTrigReport(), and updateConfigCache().

◆ posL1s_

std::vector<int> HLTrigReport::posL1s_
private

Definition at line 121 of file HLTrigReport.h.

Referenced by analyze(), and updateConfigCache().

◆ posPre_

std::vector<int> HLTrigReport::posPre_
private

Definition at line 122 of file HLTrigReport.h.

Referenced by analyze(), and updateConfigCache().

◆ refIndex_

unsigned int HLTrigReport::refIndex_
private

Definition at line 133 of file HLTrigReport.h.

Referenced by dumpReport(), HLTrigReport(), and updateConfigCache().

◆ refPath_

std::string HLTrigReport::refPath_
private

Definition at line 132 of file HLTrigReport.h.

Referenced by HLTrigReport(), and updateConfigCache().

◆ refRate_

const double HLTrigReport::refRate_
private

Definition at line 134 of file HLTrigReport.h.

Referenced by dumpReport(), and HLTrigReport().

◆ reportBy_

const ReportEvery HLTrigReport::reportBy_
private

◆ resetBy_

const ReportEvery HLTrigReport::resetBy_
private

Definition at line 137 of file HLTrigReport.h.

Referenced by analyze(), beginJob(), beginRun(), globalEndLuminosityBlock(), and useLumiCache().

◆ serviceBy_

const ReportEvery HLTrigReport::serviceBy_
private

◆ streamContents_

std::vector<std::vector<std::string> > HLTrigReport::streamContents_
private

Definition at line 130 of file HLTrigReport.h.

Referenced by HLTrigReport(), and updateConfigCache().

◆ streamNames_

std::vector<std::string> HLTrigReport::streamNames_
private

Definition at line 129 of file HLTrigReport.h.

Referenced by dumpReport(), HLTrigReport(), streamNames(), and updateConfigCache().