17 #include "Math/QuantFuncMathCore.h"
43 throw cms::Exception(
"Configuration") <<
"Invalid option value \"" << value <<
"\". Legal values are \"job\", \"run\", \"lumi\", \"event\" and \"never\".";
51 hlTriggerResults_(iConfig.getParameter<edm::
InputTag> (
"HLTriggerResults")),
52 hlTriggerResultsToken_(consumes<edm::TriggerResults>(hlTriggerResults_)),
71 isCustomDatasets_(
false),
76 isCustomStreams_(
false),
77 refPath_(
"HLTriggerFinalPath"),
80 reportBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"reportBy",
"job")) ),
81 resetBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"resetBy",
"never")) ),
82 serviceBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"serviceBy",
"never")) ),
134 descriptions.
add(
"hltTrigReport",desc);
179 for (
unsigned int i = 0;
i <
n; ++
i) {
183 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
185 if (label ==
"HLTLevel1GTSeed")
187 else if (label ==
"HLTPrescaler")
194 for (
unsigned int i = 0;
i <
n; ++
i) {
226 for (
unsigned int p = 0;
p <
size; ++
p) {
256 for (
unsigned int ds = 0; ds <
size; ++ds) {
282 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
283 <<
"Using HLTriggerFinalPath instead.";
289 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
290 <<
"Using first path in table (index=0) instead.";
358 std::stringstream stream;
359 stream <<
"Summary for Run " << run.
run();
374 std::stringstream stream;
375 stream <<
"Summary for Run " << lumi.
run() <<
", LumiSection " << lumi.
luminosityBlock();
401 if (HLTR.isValid()) {
403 const bool accept(HLTR->accept());
404 LogDebug(
"HLTrigReport") <<
"HLT TriggerResults decision: " <<
accept;
419 bool acceptedByPrevoiusPaths =
false;
420 for (
unsigned int i=0;
i!=
n; ++
i) {
422 if (HLTR->accept(
i)) {
423 acceptedByPrevoiusPaths =
true;
428 const int index(static_cast<int>(HLTR->index(
i)));
429 if (HLTR->accept(
i)) {
439 std::vector<bool> acceptedByDS(
hlIndex_.size(),
false);
440 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
442 if (acceptedByDS[ds]
or HLTR->accept(
hlIndex_[ds][
p])) {
443 acceptedByDS[ds] =
true;
452 bool acceptedByS =
false;
453 for (
size_t ds=0; ds<
dsIndex_[
s].size(); ++ds) {
454 if (acceptedByS
or acceptedByDS[
dsIndex_[
s][ds]]) {
463 std::stringstream stream;
464 stream <<
"Summary for Run " << iEvent.
run() <<
", LumiSection " << iEvent.
luminosityBlock() <<
", Event " << iEvent.
id();
486 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- Event Summary ------------" << endl;
487 if (not header.empty())
488 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " << header << endl;
501 double alpha = 1 - (1.0 - .6854)/2;
504 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
506 << right << setw(7) <<
"HLT #" <<
" "
507 << right << setw(7) <<
"WasRun" <<
" "
508 << right << setw(7) <<
"L1S" <<
" "
509 << right << setw(7) <<
"Pre" <<
" "
510 << right << setw(7) <<
"HLT" <<
" "
511 << right << setw(9) <<
"%L1sPre" <<
" "
512 << right << setw(7) <<
"Rate" <<
" "
513 << right << setw(7) <<
"RateHi" <<
" "
514 << right << setw(7) <<
"Errors" <<
" "
518 for (
unsigned int i=0;
i!=
n; ++
i) {
520 << right << setw(7) <<
i <<
" "
522 << right << setw(7) <<
hltL1s_[
i] <<
" "
523 << right << setw(7) <<
hltPre_[
i] <<
" "
525 << right << setw(9) << fixed << setprecision(5)
528 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
529 << right << setw(7) << fixed << setprecision(1) <<
537 LogVerbatim(
"HLTrigRprtTt") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
539 << right << setw(7) <<
"HLT #" <<
" "
540 << right << setw(7) <<
"WasRun" <<
" "
541 << right << setw(7) <<
"L1S" <<
" "
542 << right << setw(7) <<
"Pre" <<
" "
543 << right << setw(7) <<
"HLT" <<
" "
544 << right << setw(9) <<
"%L1sPre" <<
" "
545 << right << setw(7) <<
"Rate" <<
" "
546 << right << setw(7) <<
"RateHi" <<
" "
547 << right << setw(7) <<
"HLTtot" <<
" "
548 << right << setw(7) <<
"RateTot" <<
" "
549 << right << setw(7) <<
"Errors" <<
" "
553 for (
unsigned int i=0;
i!=
n; ++
i) {
555 << right << setw(7) <<
i <<
" "
557 << right << setw(7) <<
hltL1s_[
i] <<
" "
558 << right << setw(7) <<
hltPre_[
i] <<
" "
560 << right << setw(9) << fixed << setprecision(5)
563 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
564 << right << setw(7) << fixed << setprecision(1) <<
567 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTot_[
i] <<
" "
573 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
577 << right << setw(7) <<
"HLT #" <<
" "
578 << right << setw(7) <<
"WasRun" <<
" "
579 << right << setw(7) <<
"L1S" <<
" "
580 << right << setw(7) <<
"Pre" <<
" "
581 << right << setw(7) <<
"HLT" <<
" "
582 << right << setw(9) <<
"%L1sPre" <<
" "
583 << right << setw(7) <<
"Rate" <<
" "
584 << right << setw(7) <<
"RateHi" <<
" "
585 << right << setw(7) <<
"HLTtot" <<
" "
586 << right << setw(7) <<
"RateTot" <<
" "
587 << right << setw(7) <<
"Errors" <<
" "
591 << right << setw(7) <<
p <<
" "
596 << right << setw(9) << fixed << setprecision(5)
600 << right << setw(7) << fixed << setprecision(1) <<
603 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTotDS_[ds][
p] <<
" "
614 << right << setw(10) <<
"Dataset #" <<
" "
615 << right << setw(10) <<
"Individual" <<
" "
616 << right << setw(10) <<
"Total" <<
" "
617 << right << setw(10) <<
"Rate" <<
" "
618 << right << setw(10) <<
"RateHi" <<
" "
619 << right << setw(10) <<
"RateTot" <<
" "
621 for (
size_t ds=0;ds<
dsIndex_[
s].size(); ++ds) {
624 << right << setw(10) << ds <<
" "
625 << right << setw(10) << acceptedDS <<
" "
627 << right << setw(10) << fixed << setprecision(1) <<
scale*acceptedDS <<
" "
628 << right << setw(10) << fixed << setprecision(1) <<
630 << right << setw(10) << fixed << setprecision(1) <<
scale*
dsAccTotS_[
s][ds] <<
" "
636 LogVerbatim(
"HLTrigReport") <<
"HLT-Report - No HLT paths found!" << endl;
640 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 ReportEvery resetBy_
const ReportEvery reportBy_
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
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
bool getByToken(EDGetToken token, Handle< PROD > &result) 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)
edm::EDGetTokenT< edm::TriggerResults > hlTriggerResultsToken_
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
bool decode(bool &, std::string const &)
void dumpReport(std::string const &header=std::string())
std::vector< std::string > streamNames_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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 &)
volatile std::atomic< bool > shutdown_flag false
const std::vector< std::string > & streamNames() const
edm::InputTag hlTriggerResults_
const ReportEvery serviceBy_
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