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")),
70 isCustomDatasets_(
false),
75 isCustomStreams_(
false),
76 refPath_(
"HLTriggerFinalPath"),
79 reportBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"reportBy",
"job")) ),
80 resetBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"resetBy",
"never")) ),
81 serviceBy_(
decode(iConfig.getUntrackedParameter<std::
string>(
"serviceBy",
"never")) ),
89 datasetNames_ = customDatasets.getParameterNamesForType<std::vector<std::string> >();
135 descriptions.
add(
"hltTrigReport",desc);
180 for (
unsigned int i = 0;
i <
n; ++
i) {
184 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
186 if (label ==
"HLTLevel1GTSeed")
188 else if (label ==
"HLTPrescaler")
195 for (
unsigned int i = 0;
i <
n; ++
i) {
227 for (
unsigned int p = 0;
p <
size; ++
p) {
257 for (
unsigned int ds = 0; ds <
size; ++ds) {
283 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
284 <<
"Using HLTriggerFinalPath instead.";
290 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. "
291 <<
"Using first path in table (index=0) instead.";
360 stream <<
"Summary for Run " << run.
run();
376 stream <<
"Summary for Run " << lumi.
run() <<
", LumiSection " << lumi.
luminosityBlock();
402 if (HLTR.isValid()) {
404 const bool accept(HLTR->accept());
405 LogDebug(
"HLTrigReport") <<
"HLT TriggerResults decision: " <<
accept;
420 bool acceptedByPrevoiusPaths =
false;
421 for (
unsigned int i=0;
i!=
n; ++
i) {
423 if (HLTR->accept(
i)) {
424 acceptedByPrevoiusPaths =
true;
429 const int index(static_cast<int>(HLTR->index(
i)));
430 if (HLTR->accept(
i)) {
440 std::vector<bool> acceptedByDS(
hlIndex_.size(),
false);
441 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
443 if (acceptedByDS[ds]
or HLTR->accept(
hlIndex_[ds][
p])) {
444 acceptedByDS[ds] =
true;
453 bool acceptedByS =
false;
454 for (
size_t ds=0; ds<
dsIndex_[
s].size(); ++ds) {
455 if (acceptedByS
or acceptedByDS[
dsIndex_[
s][ds]]) {
465 stream <<
"Summary for Run " << iEvent.
run() <<
", LumiSection " << iEvent.
luminosityBlock() <<
", Event " << iEvent.
id();
487 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- Event Summary ------------" << endl;
488 if (not header.empty())
489 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " << header << endl;
502 double alpha = 1 - (1.0 - .6854)/2;
505 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
507 << right << setw(7) <<
"HLT #" <<
" "
508 << right << setw(7) <<
"WasRun" <<
" "
509 << right << setw(7) <<
"L1S" <<
" "
510 << right << setw(7) <<
"Pre" <<
" "
511 << right << setw(7) <<
"HLT" <<
" "
512 << right << setw(9) <<
"%L1sPre" <<
" "
513 << right << setw(7) <<
"Rate" <<
" "
514 << right << setw(7) <<
"RateHi" <<
" "
515 << right << setw(7) <<
"Errors" <<
" "
519 for (
unsigned int i=0;
i!=
n; ++
i) {
521 << right << setw(7) <<
i <<
" "
523 << right << setw(7) <<
hltL1s_[
i] <<
" "
524 << right << setw(7) <<
hltPre_[
i] <<
" "
526 << right << setw(9) << fixed << setprecision(5)
529 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
530 << right << setw(7) << fixed << setprecision(1) <<
538 LogVerbatim(
"HLTrigRprtTt") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
540 << right << setw(7) <<
"HLT #" <<
" "
541 << right << setw(7) <<
"WasRun" <<
" "
542 << right << setw(7) <<
"L1S" <<
" "
543 << right << setw(7) <<
"Pre" <<
" "
544 << right << setw(7) <<
"HLT" <<
" "
545 << right << setw(9) <<
"%L1sPre" <<
" "
546 << right << setw(7) <<
"Rate" <<
" "
547 << right << setw(7) <<
"RateHi" <<
" "
548 << right << setw(7) <<
"HLTtot" <<
" "
549 << right << setw(7) <<
"RateTot" <<
" "
550 << right << setw(7) <<
"Errors" <<
" "
554 for (
unsigned int i=0;
i!=
n; ++
i) {
556 << right << setw(7) <<
i <<
" "
558 << right << setw(7) <<
hltL1s_[
i] <<
" "
559 << right << setw(7) <<
hltPre_[
i] <<
" "
561 << right << setw(9) << fixed << setprecision(5)
564 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccept_[
i] <<
" "
565 << right << setw(7) << fixed << setprecision(1) <<
568 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTot_[
i] <<
" "
574 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
578 << right << setw(7) <<
"HLT #" <<
" "
579 << right << setw(7) <<
"WasRun" <<
" "
580 << right << setw(7) <<
"L1S" <<
" "
581 << right << setw(7) <<
"Pre" <<
" "
582 << right << setw(7) <<
"HLT" <<
" "
583 << right << setw(9) <<
"%L1sPre" <<
" "
584 << right << setw(7) <<
"Rate" <<
" "
585 << right << setw(7) <<
"RateHi" <<
" "
586 << right << setw(7) <<
"HLTtot" <<
" "
587 << right << setw(7) <<
"RateTot" <<
" "
588 << right << setw(7) <<
"Errors" <<
" "
592 << right << setw(7) <<
p <<
" "
597 << right << setw(9) << fixed << setprecision(5)
601 << right << setw(7) << fixed << setprecision(1) <<
604 << right << setw(7) << fixed << setprecision(1) <<
scale*
hlAccTotDS_[ds][
p] <<
" "
615 << right << setw(10) <<
"Dataset #" <<
" "
616 << right << setw(10) <<
"Individual" <<
" "
617 << right << setw(10) <<
"Total" <<
" "
618 << right << setw(10) <<
"Rate" <<
" "
619 << right << setw(10) <<
"RateHi" <<
" "
620 << right << setw(10) <<
"RateTot" <<
" "
622 for (
size_t ds=0;ds<
dsIndex_[
s].size(); ++ds) {
625 << right << setw(10) << ds <<
" "
626 << right << setw(10) << acceptedDS <<
" "
628 << right << setw(10) << fixed << setprecision(1) <<
scale*acceptedDS <<
" "
629 << right << setw(10) << fixed << setprecision(1) <<
631 << right << setw(10) << fixed << setprecision(1) <<
scale*
dsAccTotS_[
s][ds] <<
" "
637 LogVerbatim(
"HLTrigReport") <<
"HLT-Report - No HLT paths found!" << endl;
641 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
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_
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