20 #include "Math/QuantFuncMathCore.h" 41 throw cms::Exception(
"Configuration") <<
"Invalid option value \"" << value <<
"\". Legal values are \"job\", \"run\", \"lumi\", \"event\" and \"never\".";
132 descriptions.
add(
"hltTrigReport",desc);
177 for (
unsigned int i = 0;
i <
n; ++
i) {
181 for (
unsigned int j = 0; j < moduleLabels.size(); ++j) {
183 if (label ==
"HLTLevel1GTSeed")
185 else if (label ==
"HLTPrescaler")
192 for (
unsigned int i = 0;
i <
n; ++
i) {
224 for (
unsigned int p = 0;
p <
size; ++
p) {
254 for (
unsigned int ds = 0; ds <
size; ++ds) {
280 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. " 281 <<
"Using HLTriggerFinalPath instead.";
287 <<
"Requested reference path '"+
refPath_+
"' not in HLT menu. " 288 <<
"Using first path in table (index=0) instead.";
356 std::stringstream stream;
357 stream <<
"Summary for Run " << run.
run();
372 std::stringstream stream;
373 stream <<
"Summary for Run " << lumi.
run() <<
", LumiSection " << lumi.
luminosityBlock();
402 LogDebug(
"HLTrigReport") <<
"HLT TriggerResults decision: " <<
accept;
417 bool acceptedByPrevoiusPaths =
false;
418 for (
unsigned int i=0;
i!=
n; ++
i) {
421 acceptedByPrevoiusPaths =
true;
437 std::vector<bool> acceptedByDS(
hlIndex_.size(),
false);
438 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
441 acceptedByDS[ds] =
true;
450 bool acceptedByS =
false;
451 for (
size_t ds=0; ds<
dsIndex_[
s].size(); ++ds) {
452 if (acceptedByS
or acceptedByDS[
dsIndex_[
s][ds]]) {
461 std::stringstream stream;
462 stream <<
"Summary for Run " << iEvent.
run() <<
", LumiSection " << iEvent.
luminosityBlock() <<
", Event " << iEvent.
id();
484 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- Event Summary ------------" << endl;
485 if (not header.empty())
486 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " << header << endl;
499 double alpha = 1 - (1.0 - .6854)/2;
502 LogVerbatim(
"HLTrigReport") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
504 << right << setw(7) <<
"HLT #" <<
" " 505 << right << setw(7) <<
"WasRun" <<
" " 506 << right << setw(7) <<
"L1S" <<
" " 507 << right << setw(7) <<
"Pre" <<
" " 508 << right << setw(7) <<
"HLT" <<
" " 509 << right << setw(9) <<
"%L1sPre" <<
" " 510 << right << setw(7) <<
"Rate" <<
" " 511 << right << setw(7) <<
"RateHi" <<
" " 512 << right << setw(7) <<
"Errors" <<
" " 516 for (
unsigned int i=0;
i!=
n; ++
i) {
518 << right << setw(7) <<
i <<
" " 520 << right << setw(7) <<
hltL1s_[
i] <<
" " 521 << right << setw(7) <<
hltPre_[
i] <<
" " 523 << right << setw(9) <<
fixed << setprecision(5)
526 << right << setw(7) <<
fixed << setprecision(1) << scale*
hlAccept_[
i] <<
" " 527 << right << setw(7) <<
fixed << setprecision(1) <<
535 LogVerbatim(
"HLTrigRprtTt") <<
"HLT-Report " <<
"---------- HLTrig Summary ------------" << endl;
537 << right << setw(7) <<
"HLT #" <<
" " 538 << right << setw(7) <<
"WasRun" <<
" " 539 << right << setw(7) <<
"L1S" <<
" " 540 << right << setw(7) <<
"Pre" <<
" " 541 << right << setw(7) <<
"HLT" <<
" " 542 << right << setw(9) <<
"%L1sPre" <<
" " 543 << right << setw(7) <<
"Rate" <<
" " 544 << right << setw(7) <<
"RateHi" <<
" " 545 << right << setw(7) <<
"HLTtot" <<
" " 546 << right << setw(7) <<
"RateTot" <<
" " 547 << right << setw(7) <<
"Errors" <<
" " 551 for (
unsigned int i=0;
i!=
n; ++
i) {
553 << right << setw(7) <<
i <<
" " 555 << right << setw(7) <<
hltL1s_[
i] <<
" " 556 << right << setw(7) <<
hltPre_[
i] <<
" " 558 << right << setw(9) <<
fixed << setprecision(5)
561 << right << setw(7) <<
fixed << setprecision(1) << scale*
hlAccept_[
i] <<
" " 562 << right << setw(7) <<
fixed << setprecision(1) <<
565 << right << setw(7) <<
fixed << setprecision(1) << scale*
hlAccTot_[
i] <<
" " 571 for (
size_t ds=0; ds<
hlIndex_.size(); ++ds) {
575 << right << setw(7) <<
"HLT #" <<
" " 576 << right << setw(7) <<
"WasRun" <<
" " 577 << right << setw(7) <<
"L1S" <<
" " 578 << right << setw(7) <<
"Pre" <<
" " 579 << right << setw(7) <<
"HLT" <<
" " 580 << right << setw(9) <<
"%L1sPre" <<
" " 581 << right << setw(7) <<
"Rate" <<
" " 582 << right << setw(7) <<
"RateHi" <<
" " 583 << right << setw(7) <<
"HLTtot" <<
" " 584 << right << setw(7) <<
"RateTot" <<
" " 585 << right << setw(7) <<
"Errors" <<
" " 589 << right << setw(7) <<
p <<
" " 594 << right << setw(9) <<
fixed << setprecision(5)
598 << right << setw(7) <<
fixed << setprecision(1) <<
601 << right << setw(7) <<
fixed << setprecision(1) << scale*
hlAccTotDS_[ds][
p] <<
" " 612 << right << setw(10) <<
"Dataset #" <<
" " 613 << right << setw(10) <<
"Individual" <<
" " 614 << right << setw(10) <<
"Total" <<
" " 615 << right << setw(10) <<
"Rate" <<
" " 616 << right << setw(10) <<
"RateHi" <<
" " 617 << right << setw(10) <<
"RateTot" <<
" " 619 for (
size_t ds=0;ds<
dsIndex_[
s].size(); ++ds) {
622 << right << setw(10) << ds <<
" " 623 << right << setw(10) << acceptedDS <<
" " 625 << right << setw(10) <<
fixed << setprecision(1) << scale*acceptedDS <<
" " 626 << right << setw(10) <<
fixed << setprecision(1) <<
628 << right << setw(10) <<
fixed << setprecision(1) << scale*
dsAccTotS_[
s][ds] <<
" " 634 LogVerbatim(
"HLTrigReport") <<
"HLT-Report - No HLT paths found!" << endl;
638 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
bool wasrun() const
Was at least one path run?
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_
const std::vector< unsigned int > & streamCounts() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< std::vector< unsigned int > > hlAccTotDS_
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< std::string > & datasetNames() const
edm::LuminosityBlockNumber_t luminosityBlock() const
def setup(process, global_tag, zero_tesla=False)
std::vector< std::string > datasetNames_
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_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< int > posL1s_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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_
void endRun(edm::Run const &, edm::EventSetup const &) override
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
const std::vector< std::string > & streamNames() 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
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
bool error() const
Has any path encountered an error (exception)
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)
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_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< std::vector< unsigned int > > dsAccTotS_
const std::vector< std::string > & streamNames() const
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::InputTag hlTriggerResults_
const ReportEvery serviceBy_
std::vector< std::vector< unsigned int > > dsIndex_
const std::vector< std::string > & datasetNames() const