20 #include "Math/QuantFuncMathCore.h"
46 throw cms::Exception(
"Configuration") <<
"Invalid option value \"" << value <<
"\". Legal values are \"job\", \"run\", \"lumi\", \"event\" and \"never\".";
54 hlTriggerResults_ (iConfig.getParameter<edm::InputTag> (
"HLTriggerResults")),
73 isCustomDatasets_(
false),
78 isCustomStreams_(
false),
79 refPath_(
"HLTriggerFinalPath"),
82 reportBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"reportBy",
"job")) ),
83 resetBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"resetBy",
"never")) ),
84 serviceBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"serviceBy",
"never")) ),
163 for (
unsigned int i = 0;
i <
n; ++
i) {
167 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
169 if (label ==
"HLTLevel1GTSeed")
171 else if (label ==
"HLTPrescaler")
178 for (
unsigned int i = 0;
i <
n; ++
i) {
210 for (
unsigned int p = 0;
p <
size; ++
p) {
240 for (
unsigned int ds = 0; ds <
size; ++ds) {
266 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
267 <<
"Using HLTriggerFinalPath instead.";
273 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
274 <<
"Using first path in table (index=0) instead.";
342 std::stringstream stream;
343 stream <<
"Summary for Run " << run.
run();
358 std::stringstream stream;
359 stream <<
"Summary for Run " << lumi.
run() <<
", LumiSection " << lumi.
luminosityBlock();
385 if (HLTR.isValid()) {
387 const bool accept(HLTR->accept());
388 LogDebug(
"HLTrigReport") <<
"HLT TriggerResults decision: " <<
accept;
403 bool acceptedByPrevoiusPaths =
false;
404 for (
unsigned int i=0;
i!=
n; ++
i) {
406 if (HLTR->accept(
i)) {
407 acceptedByPrevoiusPaths =
true;
412 const int index(static_cast<int>(HLTR->index(
i)));
413 if (HLTR->accept(
i)) {
423 std::vector<bool> acceptedByDS(
hlIndex_.size(),
false);
424 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
426 if (acceptedByDS[ds]
or HLTR->accept(
hlIndex_[ds][
p])) {
427 acceptedByDS[ds] =
true;
436 bool acceptedByS =
false;
437 for (
size_t ds=0; ds<
dsIndex_[
s].size(); ++ds) {
438 if (acceptedByS
or acceptedByDS[
dsIndex_[
s][ds]]) {
447 std::stringstream stream;
448 stream <<
"Summary for Run " << iEvent.
run() <<
", LumiSection " << iEvent.
luminosityBlock() <<
", Event " << iEvent.
id();
470 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- Event Summary ------------" << endl;
471 if (not header.empty())
472 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " << header << endl;
485 double alpha = 1 - (1.0 - .6854)/2;
488 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
490 << right << setw(7) <<
"HLT #" <<
" "
491 << right << setw(7) <<
"WasRun" <<
" "
492 << right << setw(7) <<
"L1S" <<
" "
493 << right << setw(7) <<
"Pre" <<
" "
494 << right << setw(7) <<
"HLT" <<
" "
495 << right << setw(9) <<
"%L1sPre" <<
" "
496 << right << setw(7) <<
"Rate" <<
" "
497 << right << setw(7) <<
"RateHi" <<
" "
498 << right << setw(7) <<
"Errors" <<
" "
502 for (
unsigned int i=0;
i!=
n; ++
i) {
504 << right << setw(7) <<
i <<
" "
506 << right << setw(7) <<
hltL1s_[
i] <<
" "
507 << right << setw(7) <<
hltPre_[
i] <<
" "
509 << right << setw(9) << fixed << setprecision(5)
512 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
513 << right << setw(7) << fixed << setprecision(1) <<
521 LogVerbatim(
"HLTrigRprtTt") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
523 << right << setw(7) <<
"HLT #" <<
" "
524 << right << setw(7) <<
"WasRun" <<
" "
525 << right << setw(7) <<
"L1S" <<
" "
526 << right << setw(7) <<
"Pre" <<
" "
527 << right << setw(7) <<
"HLT" <<
" "
528 << right << setw(9) <<
"%L1sPre" <<
" "
529 << right << setw(7) <<
"Rate" <<
" "
530 << right << setw(7) <<
"RateHi" <<
" "
531 << right << setw(7) <<
"HLTtot" <<
" "
532 << right << setw(7) <<
"RateTot" <<
" "
533 << right << setw(7) <<
"Errors" <<
" "
537 for (
unsigned int i=0;
i!=
n; ++
i) {
539 << right << setw(7) <<
i <<
" "
541 << right << setw(7) <<
hltL1s_[
i] <<
" "
542 << right << setw(7) <<
hltPre_[
i] <<
" "
544 << right << setw(9) << fixed << setprecision(5)
547 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
548 << right << setw(7) << fixed << setprecision(1) <<
551 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTot_[
i] <<
" "
557 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
561 << right << setw(7) <<
"HLT #" <<
" "
562 << right << setw(7) <<
"WasRun" <<
" "
563 << right << setw(7) <<
"L1S" <<
" "
564 << right << setw(7) <<
"Pre" <<
" "
565 << right << setw(7) <<
"HLT" <<
" "
566 << right << setw(9) <<
"%L1sPre" <<
" "
567 << right << setw(7) <<
"Rate" <<
" "
568 << right << setw(7) <<
"RateHi" <<
" "
569 << right << setw(7) <<
"HLTtot" <<
" "
570 << right << setw(7) <<
"RateTot" <<
" "
571 << right << setw(7) <<
"Errors" <<
" "
575 << right << setw(7) <<
p <<
" "
580 << right << setw(9) << fixed << setprecision(5)
584 << right << setw(7) << fixed << setprecision(1) <<
587 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTotDS_[ds][
p] <<
" "
598 << right << setw(10) <<
"Dataset #" <<
" "
599 << right << setw(10) <<
"Individual" <<
" "
600 << right << setw(10) <<
"Total" <<
" "
601 << right << setw(10) <<
"Rate" <<
" "
602 << right << setw(10) <<
"RateHi" <<
" "
603 << right << setw(10) <<
"RateTot" <<
" "
605 for (
size_t ds=0;ds<
dsIndex_[
s].size(); ++ds) {
608 << right << setw(10) << ds <<
" "
609 << right << setw(10) << acceptedDS <<
" "
611 << right << setw(10) << fixed << setprecision(1) <<
scale*acceptedDS <<
" "
612 << right << setw(10) << fixed << setprecision(1) <<
614 << right << setw(10) << fixed << setprecision(1) <<
scale*
dsAccTotS_[
s][ds] <<
" "
620 LogVerbatim(
"HLTrigReport") <<
"HLT-Report - No HLT paths found!" << endl;
624 LogVerbatim(
"HLTrigReport") <<
"HLT-Report end!" << endl;
std::vector< unsigned int > hlErrors_
std::vector< std::vector< std::string > > datasetContents_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< unsigned int > hlAccTot_
std::vector< std::string > hlNames_
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
std::vector< unsigned int > dsAllTotS_
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
const std::vector< unsigned int > & streamCounts() const
std::vector< std::vector< unsigned int > > hlAccTotDS_
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< std::string > & datasetNames() const
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< std::string > datasetNames_
virtual void endRun(edm::Run const &, edm::EventSetup const &)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static ReportEvery decode(const std::string &value)
std::vector< int > posL1s_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
LuminosityBlockNumber_t luminosityBlock() const
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
std::vector< int > posPre_
std::vector< unsigned int > hltL1s_
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
const std::vector< std::string > & streamNames() const
const T & max(const T &a, const T &b)
bool decode(bool &, std::string const &)
void dumpReport(std::string const &header=std::string())
std::vector< std::string > streamNames_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< unsigned int > hlWasRun_
HLTConfigProvider hltConfig_
std::vector< unsigned int > hlAllTotDS_
std::vector< std::vector< std::string > > streamContents_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const std::vector< unsigned int > & datasetCounts() const
std::vector< unsigned int > hltPre_
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
void reset(bool changed=false)
HLTrigReport(const edm::ParameterSet &)
std::vector< std::vector< unsigned int > > hlIndex_
std::vector< unsigned int > hlAccept_
std::vector< std::vector< unsigned int > > dsAccTotS_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const std::vector< std::string > & streamNames() const
edm::InputTag hlTriggerResults_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< std::vector< unsigned int > > dsIndex_
tuple size
Write out results.
const std::vector< std::string > & datasetNames() const