CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
const std::vector< unsigned int > & datasetCounts () const
 
const std::vector< std::string > & datasetNames () const
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
 HLTrigReport (const edm::ParameterSet &)
 
void reset (bool changed=false)
 
const std::vector< unsigned int > & streamCounts () const
 
const std::vector< std::string > & streamNames () const
 
 ~HLTrigReport ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

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

Private Types

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

Private Member Functions

void dumpReport (std::string const &header=std::string())
 

Private Attributes

bool configured_
 
std::vector< std::vector
< std::string > > 
datasetContents_
 
std::vector< std::string > datasetNames_
 
std::vector< std::vector
< unsigned int > > 
dsAccTotS_
 
std::vector< unsigned int > dsAllTotS_
 
std::vector< std::vector
< unsigned int > > 
dsIndex_
 
std::vector< unsigned int > hlAccept_
 
std::vector< unsigned int > hlAccTot_
 
std::vector< std::vector
< unsigned int > > 
hlAccTotDS_
 
std::vector< unsigned int > hlAllTotDS_
 
std::vector< unsigned int > hlErrors_
 
std::vector< std::vector
< unsigned int > > 
hlIndex_
 
std::vector< std::string > hlNames_
 
HLTConfigProvider hltConfig_
 
std::vector< unsigned int > hltL1s_
 
std::vector< unsigned int > hltPre_
 
edm::InputTag hlTriggerResults_
 
edm::EDGetTokenT
< edm::TriggerResults
hlTriggerResultsToken_
 
std::vector< unsigned int > hlWasRun_
 
bool isCustomDatasets_
 
bool isCustomStreams_
 
unsigned int nAccept_
 
unsigned int nErrors_
 
unsigned int nEvents_
 
unsigned int nWasRun_
 
std::vector< int > posL1s_
 
std::vector< int > posPre_
 
unsigned int refIndex_
 
std::string refPath_
 
double refRate_
 
ReportEvery reportBy_
 
ReportEvery resetBy_
 
ReportEvery serviceBy_
 
std::vector< std::vector
< std::string > > 
streamContents_
 
std::vector< std::string > streamNames_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Detailed Description

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

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 31 of file HLTrigReport.h.

Member Enumeration Documentation

Enumerator
NEVER 
EVERY_EVENT 
EVERY_LUMI 
EVERY_RUN 
EVERY_JOB 

Definition at line 33 of file HLTrigReport.h.

Constructor & Destructor Documentation

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

Definition at line 50 of file HLTrigReport.cc.

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

50  :
51  hlTriggerResults_ (iConfig.getParameter<edm::InputTag> ("HLTriggerResults")),
52  configured_(false),
53  nEvents_(0),
54  nWasRun_(0),
55  nAccept_(0),
56  nErrors_(0),
57  hlWasRun_(0),
58  hltL1s_(0),
59  hltPre_(0),
60  hlAccept_(0),
61  hlAccTot_(0),
62  hlErrors_(0),
63  posL1s_(0),
64  posPre_(0),
65  hlNames_(0),
66  hlIndex_(0),
67  hlAccTotDS_(0),
68  datasetNames_(0),
70  isCustomDatasets_(false),
71  dsIndex_(0),
72  dsAccTotS_(0),
73  streamNames_(0),
74  streamContents_(0),
75  isCustomStreams_(false),
76  refPath_("HLTriggerFinalPath"),
77  refIndex_(0),
78  refRate_(100.0),
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")) ),
82  hltConfig_()
83 {
84  hlTriggerResultsToken_ = consumes<edm::TriggerResults>(hlTriggerResults_);
85 
86  const edm::ParameterSet customDatasets(iConfig.getUntrackedParameter<edm::ParameterSet>("CustomDatasets", edm::ParameterSet()));
87  isCustomDatasets_ = (customDatasets != edm::ParameterSet());
88  if (isCustomDatasets_) {
89  datasetNames_ = customDatasets.getParameterNamesForType<std::vector<std::string> >();
90  for (std::vector<std::string>::const_iterator name = datasetNames_.begin(); name != datasetNames_.end(); name++) {
91  datasetContents_.push_back(customDatasets.getParameter<std::vector<std::string> >(*name));
92  }
93  }
94 
95  const edm::ParameterSet customStreams (iConfig.getUntrackedParameter<edm::ParameterSet>("CustomStreams" , edm::ParameterSet()));
96  isCustomStreams_ = (customStreams != edm::ParameterSet());
97  if (isCustomStreams_ ) {
98  streamNames_ = customStreams.getParameterNamesForType<std::vector<std::string> >();
99  for (std::vector<std::string>::const_iterator name = streamNames_.begin(); name != streamNames_.end(); name++) {
100  streamContents_.push_back(customStreams.getParameter<std::vector<std::string> >(*name));
101  }
102  }
103 
104  refPath_ = iConfig.getUntrackedParameter<std::string>("ReferencePath","HLTriggerFinalPath");
105  refRate_ = iConfig.getUntrackedParameter<double>("ReferenceRate", 100.0);
106  refIndex_= 0;
107 
108  LogDebug("HLTrigReport")
109  << "HL TiggerResults: " + hlTriggerResults_.encode()
110  << " using reference path and rate: " + refPath_ + " " << refRate_;
111 
113  edm::Service<HLTrigReportService>()->registerModule(this);
114  }
115 
116 }
#define LogDebug(id)
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:85
std::vector< std::vector< std::string > > datasetContents_
Definition: HLTrigReport.h:95
bool isCustomStreams_
Definition: HLTrigReport.h:102
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool isCustomDatasets_
Definition: HLTrigReport.h:96
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:84
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:89
ReportEvery reportBy_
Definition: HLTrigReport.h:107
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:92
unsigned int nWasRun_
Definition: HLTrigReport.h:76
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:94
double refRate_
Definition: HLTrigReport.h:105
static ReportEvery decode(const std::string &value)
Definition: HLTrigReport.cc:27
std::string encode() const
Definition: InputTag.cc:164
edm::EDGetTokenT< edm::TriggerResults > hlTriggerResultsToken_
Definition: HLTrigReport.h:72
std::vector< int > posL1s_
Definition: HLTrigReport.h:87
std::vector< int > posPre_
Definition: HLTrigReport.h:88
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:81
ReportEvery resetBy_
Definition: HLTrigReport.h:108
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:100
unsigned int nAccept_
Definition: HLTrigReport.h:77
unsigned int refIndex_
Definition: HLTrigReport.h:104
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:80
bool configured_
Definition: HLTrigReport.h:73
std::string refPath_
Definition: HLTrigReport.h:103
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:110
std::vector< std::vector< std::string > > streamContents_
Definition: HLTrigReport.h:101
unsigned int nEvents_
Definition: HLTrigReport.h:75
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:82
unsigned int nErrors_
Definition: HLTrigReport.h:78
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:91
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:83
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:98
edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:71
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:97
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
HLTrigReport::~HLTrigReport ( )

Definition at line 118 of file HLTrigReport.cc.

118 { }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 388 of file HLTrigReport.cc.

References accept(), configured_, datasetCounts(), dsAccTotS_, dsAllTotS_, dsIndex_, dumpReport(), edm::InputTag::encode(), EVERY_EVENT, edm::Event::getByToken(), hlAccept_, hlAccTot_, hlAccTotDS_, hlAllTotDS_, hlErrors_, hlIndex_, hlNames_, hltL1s_, hltPre_, hlTriggerResults_, hlTriggerResultsToken_, hlWasRun_, i, edm::EventBase::id(), cmsHarvester::index, LogDebug, edm::EventBase::luminosityBlock(), gen::n, nAccept_, nErrors_, nEvents_, nWasRun_, or, AlCaHLTBitMon_ParallelJobs::p, posL1s_, posPre_, reportBy_, reset(), resetBy_, edm::Event::run(), alignCSCRings::s, serviceBy_, edmStreamStallGrapher::stream, and streamCounts().

389 {
390  // accumulation of statistics event by event
391 
392  using namespace std;
393  using namespace edm;
394 
395  if (resetBy_ == EVERY_EVENT) reset();
396 
397  nEvents_++;
398 
399  // get hold of TriggerResults
401  iEvent.getByToken(hlTriggerResultsToken_, HLTR);
402  if (HLTR.isValid()) {
403  if (HLTR->wasrun()) nWasRun_++;
404  const bool accept(HLTR->accept());
405  LogDebug("HLTrigReport") << "HLT TriggerResults decision: " << accept;
406  if (accept) ++nAccept_;
407  if (HLTR->error()) nErrors_++;
408  } else {
409  LogDebug("HLTrigReport") << "HLT TriggerResults with label ["+hlTriggerResults_.encode()+"] not found!";
410  nErrors_++;
411  return;
412  }
413 
414  // HLTConfigProvider not configured - cannot produce any detailed statistics
415  if (not configured_)
416  return;
417 
418  // decision for each HL algorithm
419  const unsigned int n(hlNames_.size());
420  bool acceptedByPrevoiusPaths = false;
421  for (unsigned int i=0; i!=n; ++i) {
422  if (HLTR->wasrun(i)) hlWasRun_[i]++;
423  if (HLTR->accept(i)) {
424  acceptedByPrevoiusPaths = true;
425  hlAccept_[i]++;
426  }
427  if (acceptedByPrevoiusPaths) hlAccTot_[i]++;
428  if (HLTR->error(i) ) hlErrors_[i]++;
429  const int index(static_cast<int>(HLTR->index(i)));
430  if (HLTR->accept(i)) {
431  if (index >= posL1s_[i]) hltL1s_[i]++;
432  if (index >= posPre_[i]) hltPre_[i]++;
433  } else {
434  if (index > posL1s_[i]) hltL1s_[i]++;
435  if (index > posPre_[i]) hltPre_[i]++;
436  }
437  }
438 
439  // calculate accumulation of accepted events by a path within a dataset
440  std::vector<bool> acceptedByDS(hlIndex_.size(), false);
441  for (size_t ds=0; ds<hlIndex_.size(); ++ds) {
442  for (size_t p=0; p<hlIndex_[ds].size(); ++p) {
443  if (acceptedByDS[ds] or HLTR->accept(hlIndex_[ds][p])) {
444  acceptedByDS[ds] = true;
445  hlAccTotDS_[ds][p]++;
446  }
447  }
448  if (acceptedByDS[ds]) hlAllTotDS_[ds]++;
449  }
450 
451  // calculate accumulation of accepted events by a dataset within a stream
452  for (size_t s=0; s<dsIndex_.size(); ++s) {
453  bool acceptedByS = false;
454  for (size_t ds=0; ds<dsIndex_[s].size(); ++ds) {
455  if (acceptedByS or acceptedByDS[dsIndex_[s][ds]]) {
456  acceptedByS = true;
457  dsAccTotS_[s][ds]++;
458  }
459  }
460  if (acceptedByS) dsAllTotS_[s]++;
461  }
462 
463  if (reportBy_ == EVERY_EVENT) {
464  std::stringstream stream;
465  stream << "Summary for Run " << iEvent.run() << ", LumiSection " << iEvent.luminosityBlock() << ", Event " << iEvent.id();
466  dumpReport(stream.str());
467  }
469  edm::Service<HLTrigReportService>()->setDatasetCounts(datasetCounts());
470  edm::Service<HLTrigReportService>()->setStreamCounts(streamCounts());
471  }
472 
473 }
#define LogDebug(id)
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:85
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:84
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:89
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:99
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
Definition: Activities.doc:12
const std::vector< unsigned int > & streamCounts() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
ReportEvery reportBy_
Definition: HLTrigReport.h:107
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:92
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
unsigned int nWasRun_
Definition: HLTrigReport.h:76
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:25
std::string encode() const
Definition: InputTag.cc:164
edm::EDGetTokenT< edm::TriggerResults > hlTriggerResultsToken_
Definition: HLTrigReport.h:72
std::vector< int > posL1s_
Definition: HLTrigReport.h:87
std::vector< int > posPre_
Definition: HLTrigReport.h:88
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:81
RunNumber_t run() const
Definition: Event.h:85
ReportEvery resetBy_
Definition: HLTrigReport.h:108
void dumpReport(std::string const &header=std::string())
unsigned int nAccept_
Definition: HLTrigReport.h:77
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:80
bool configured_
Definition: HLTrigReport.h:73
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:93
const std::vector< unsigned int > & datasetCounts() const
unsigned int nEvents_
Definition: HLTrigReport.h:75
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:82
unsigned int nErrors_
Definition: HLTrigReport.h:78
edm::EventID id() const
Definition: EventBase.h:60
void reset(bool changed=false)
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:91
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:83
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:98
edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:71
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:97
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
void HLTrigReport::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 303 of file HLTrigReport.cc.

References EVERY_JOB, reset(), and resetBy_.

303  {
304  if (resetBy_ == EVERY_JOB)
305  reset();
306 }
ReportEvery resetBy_
Definition: HLTrigReport.h:108
void reset(bool changed=false)
void HLTrigReport::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 369 of file HLTrigReport.cc.

References EVERY_LUMI, reset(), and resetBy_.

369  {
370  if (resetBy_ == EVERY_LUMI) reset();
371 }
ReportEvery resetBy_
Definition: HLTrigReport.h:108
void reset(bool changed=false)
void HLTrigReport::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 319 of file HLTrigReport.cc.

References configured_, dsAccTotS_, dsAllTotS_, dsIndex_, dumpReport(), EVERY_RUN, hlAccept_, hlAccTot_, hlAccTotDS_, hlAllTotDS_, hlErrors_, hlIndex_, hlNames_, hltConfig_, hltL1s_, hltPre_, hlTriggerResults_, hlWasRun_, HLTConfigProvider::init(), nAccept_, nErrors_, nEvents_, nWasRun_, posL1s_, posPre_, edm::InputTag::process(), reset(), and resetBy_.

320 {
321  bool changed = true;
322  if (hltConfig_.init(iRun, iSetup, hlTriggerResults_.process(), changed)) {
323  configured_ = true;
324  if (changed) {
325  dumpReport("Summary for this HLT table");
326  reset(true);
327  }
328  } else {
329  dumpReport("Summary for this HLT table");
330  // cannot initialize the HLT menu - reset and clear all counters and tables
331  configured_ = false;
332  nEvents_ = 0;
333  nWasRun_ = 0;
334  nAccept_ = 0;
335  nErrors_ = 0;
336  hlWasRun_.clear();
337  hltL1s_.clear();
338  hltPre_.clear();
339  hlAccept_.clear();
340  hlAccTot_.clear();
341  hlErrors_.clear();
342  posL1s_.clear();
343  posPre_.clear();
344  hlNames_.clear();
345  hlIndex_.clear();
346  hlAccTotDS_.clear();
347  hlAllTotDS_.clear();
348  dsIndex_.clear();
349  dsAccTotS_.clear();
350  dsAllTotS_.clear();
351  }
352 
353  if (resetBy_ == EVERY_RUN) reset();
354 
355 }
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:85
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:84
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:89
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:99
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:92
unsigned int nWasRun_
Definition: HLTrigReport.h:76
std::vector< int > posL1s_
Definition: HLTrigReport.h:87
std::vector< int > posPre_
Definition: HLTrigReport.h:88
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:81
ReportEvery resetBy_
Definition: HLTrigReport.h:108
void dumpReport(std::string const &header=std::string())
unsigned int nAccept_
Definition: HLTrigReport.h:77
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:80
bool configured_
Definition: HLTrigReport.h:73
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:110
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:93
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
unsigned int nEvents_
Definition: HLTrigReport.h:75
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:82
std::string const & process() const
Definition: InputTag.h:46
unsigned int nErrors_
Definition: HLTrigReport.h:78
void reset(bool changed=false)
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:91
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:83
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:98
edm::InputTag hlTriggerResults_
Definition: HLTrigReport.h:71
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:97
const std::vector< unsigned int > & HLTrigReport::datasetCounts ( ) const

Definition at line 148 of file HLTrigReport.cc.

References hlAllTotDS_.

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

148  {
149  return hlAllTotDS_;
150 }
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:93
const std::vector< std::string > & HLTrigReport::datasetNames ( ) const

Definition at line 142 of file HLTrigReport.cc.

References datasetNames_.

142  {
143  return datasetNames_;
144 }
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:94
HLTrigReport::ReportEvery HLTrigReport::decode ( const std::string &  value)
static

Definition at line 27 of file HLTrigReport.cc.

References EVERY_EVENT, EVERY_JOB, EVERY_LUMI, EVERY_RUN, edm::hlt::Exception, and NEVER.

27  {
28  if (value == "never")
29  return NEVER;
30 
31  if (value == "job")
32  return EVERY_JOB;
33 
34  if (value == "run")
35  return EVERY_RUN;
36 
37  if (value == "lumi")
38  return EVERY_LUMI;
39 
40  if (value == "event")
41  return EVERY_EVENT;
42 
43  throw cms::Exception("Configuration") << "Invalid option value \"" << value << "\". Legal values are \"job\", \"run\", \"lumi\", \"event\" and \"never\".";
44 }
void HLTrigReport::dumpReport ( std::string const &  header = std::string())
private

Definition at line 476 of file HLTrigReport.cc.

References alpha, configured_, datasetNames_, TauDecayModes::dec, dsAccTotS_, dsAllTotS_, dsIndex_, hlAccept_, hlAccTot_, hlAccTotDS_, hlAllTotDS_, hlErrors_, hlIndex_, hlNames_, hltL1s_, hltPre_, hlWasRun_, i, bookConverter::max, gen::n, nAccept_, nErrors_, nEvents_, nWasRun_, AlCaHLTBitMon_ParallelJobs::p, refIndex_, refRate_, alignCSCRings::s, pileupReCalc_HLTpaths::scale, and streamNames_.

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

477 {
478  // final printout of accumulated statistics
479 
480  using namespace std;
481  using namespace edm;
482  const unsigned int n(hlNames_.size());
483 
484  if ((n==0) and (nEvents_==0)) return;
485 
486  LogVerbatim("HLTrigReport") << dec << endl;
487  LogVerbatim("HLTrigReport") << "HLT-Report " << "---------- Event Summary ------------" << endl;
488  if (not header.empty())
489  LogVerbatim("HLTrigReport") << "HLT-Report " << header << endl;
490  LogVerbatim("HLTrigReport") << "HLT-Report"
491  << " Events total = " << nEvents_
492  << " wasrun = " << nWasRun_
493  << " passed = " << nAccept_
494  << " errors = " << nErrors_
495  << endl;
496 
497  // HLTConfigProvider not configured - cannot produce any detailed statistics
498  if (not configured_)
499  return;
500 
501  double scale = hlAccept_[refIndex_]>0 ? refRate_/hlAccept_[refIndex_] : 0.;
502  double alpha = 1 - (1.0 - .6854)/2; // for the Clopper-Pearson 68% CI
503 
504  LogVerbatim("HLTrigReport") << endl;
505  LogVerbatim("HLTrigReport") << "HLT-Report " << "---------- HLTrig Summary ------------" << endl;
506  LogVerbatim("HLTrigReport") << "HLT-Report "
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" << " "
516  << "Name" << endl;
517 
518  if (n>0) {
519  for (unsigned int i=0; i!=n; ++i) {
520  LogVerbatim("HLTrigReport") << "HLT-Report "
521  << right << setw(7) << i << " "
522  << right << setw(7) << hlWasRun_[i] << " "
523  << right << setw(7) << hltL1s_[i] << " "
524  << right << setw(7) << hltPre_[i] << " "
525  << right << setw(7) << hlAccept_[i] << " "
526  << right << setw(9) << fixed << setprecision(5)
527  << static_cast<float>(100*hlAccept_[i])/
528  static_cast<float>(max(hltPre_[i], 1u)) << " "
529  << right << setw(7) << fixed << setprecision(1) << scale*hlAccept_[i] << " "
530  << right << setw(7) << fixed << setprecision(1) <<
531  ((hlAccept_[refIndex_]-hlAccept_[i] > 0) ? refRate_*ROOT::Math::beta_quantile(alpha, hlAccept_[i]+1, hlAccept_[refIndex_]-hlAccept_[i]) : 0) << " "
532  << right << setw(7) << hlErrors_[i] << " "
533  << hlNames_[i] << endl;
534  }
535  }
536 
537  LogVerbatim("HLTrigRprtTt") << endl;
538  LogVerbatim("HLTrigRprtTt") << "HLT-Report " << "---------- HLTrig Summary ------------" << endl;
539  LogVerbatim("HLTrigRprtTt") << "HLT-Report "
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" << " "
551  << "Name" << endl;
552 
553  if (n>0) {
554  for (unsigned int i=0; i!=n; ++i) {
555  LogVerbatim("HLTrigRprtTt") << "HLT-Report "
556  << right << setw(7) << i << " "
557  << right << setw(7) << hlWasRun_[i] << " "
558  << right << setw(7) << hltL1s_[i] << " "
559  << right << setw(7) << hltPre_[i] << " "
560  << right << setw(7) << hlAccept_[i] << " "
561  << right << setw(9) << fixed << setprecision(5)
562  << static_cast<float>(100*hlAccept_[i])/
563  static_cast<float>(max(hltPre_[i], 1u)) << " "
564  << right << setw(7) << fixed << setprecision(1) << scale*hlAccept_[i] << " "
565  << right << setw(7) << fixed << setprecision(1) <<
566  ((hlAccept_[refIndex_]-hlAccept_[i] > 0) ? refRate_*ROOT::Math::beta_quantile(alpha, hlAccept_[i]+1, hlAccept_[refIndex_]-hlAccept_[i]) : 0) << " "
567  << right << setw(7) << hlAccTot_[i] << " "
568  << right << setw(7) << fixed << setprecision(1) << scale*hlAccTot_[i] << " "
569  << right << setw(7) << hlErrors_[i] << " "
570  << hlNames_[i] << endl;
571  }
572 
573  // now for each dataset
574  for (size_t ds=0; ds<hlIndex_.size(); ++ds) {
575  LogVerbatim("HLTrigRprtPD") << endl;
576  LogVerbatim("HLTrigRprtPD") << "HLT-Report " << "---------- Dataset Summary: " << datasetNames_[ds] << " ------------" << hlAllTotDS_[ds] << endl;
577  LogVerbatim("HLTrigRprtPD") << "HLT-Report "
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" << " "
589  << "Name" << endl;
590  for (size_t p=0; p<hlIndex_[ds].size(); ++p) {
591  LogVerbatim("HLTrigRprtPD") << "HLT-Report "
592  << right << setw(7) << p << " "
593  << right << setw(7) << hlWasRun_[hlIndex_[ds][p]] << " "
594  << right << setw(7) << hltL1s_[hlIndex_[ds][p]] << " "
595  << right << setw(7) << hltPre_[hlIndex_[ds][p]] << " "
596  << right << setw(7) << hlAccept_[hlIndex_[ds][p]] << " "
597  << right << setw(9) << fixed << setprecision(5)
598  << static_cast<float>(100*hlAccept_[hlIndex_[ds][p]])/
599  static_cast<float>(max(hltPre_[hlIndex_[ds][p]], 1u)) << " "
600  << right << setw(7) << fixed << setprecision(1) << scale*hlAccept_[hlIndex_[ds][p]] << " "
601  << right << setw(7) << fixed << setprecision(1) <<
602  ((hlAccept_[refIndex_]-hlAccept_[hlIndex_[ds][p]] > 0) ? refRate_*ROOT::Math::beta_quantile(alpha, hlAccept_[hlIndex_[ds][p]]+1, hlAccept_[refIndex_]-hlAccept_[hlIndex_[ds][p]]) : 0) << " "
603  << right << setw(7) << hlAccTotDS_[ds][p] << " "
604  << right << setw(7) << fixed << setprecision(1) << scale*hlAccTotDS_[ds][p] << " "
605  << right << setw(7) << hlErrors_[hlIndex_[ds][p]] << " "
606  << hlNames_[hlIndex_[ds][p]] << endl;
607  }
608  }
609 
610  // now for each stream
611  for (size_t s=0; s<dsIndex_.size(); ++s) {
612  LogVerbatim("HLTrigRprtST") << endl;
613  LogVerbatim("HLTrigRprtST") << "HLT-Report " << "---------- Stream Summary: " << streamNames_[s] << " ------------" << dsAllTotS_[s] << endl;
614  LogVerbatim("HLTrigRprtST") << "HLT-Report "
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" << " "
621  << "Name" << endl;
622  for (size_t ds=0;ds<dsIndex_[s].size(); ++ds) {
623  unsigned int acceptedDS = hlAccTotDS_[dsIndex_[s][ds]][hlIndex_[dsIndex_[s][ds]].size()-1];
624  LogVerbatim("HLTrigRprtST") << "HLT-Report "
625  << right << setw(10) << ds << " "
626  << right << setw(10) << acceptedDS << " "
627  << right << setw(10) << dsAccTotS_[s][ds] << " "
628  << right << setw(10) << fixed << setprecision(1) << scale*acceptedDS << " "
629  << right << setw(10) << fixed << setprecision(1) <<
630  ((hlAccept_[refIndex_]-acceptedDS > 0) ? refRate_*ROOT::Math::beta_quantile(alpha, acceptedDS+1, hlAccept_[refIndex_]-acceptedDS) : 0) << " "
631  << right << setw(10) << fixed << setprecision(1) << scale*dsAccTotS_[s][ds] << " "
632  << datasetNames_[dsIndex_[s][ds]] << endl;
633  }
634  }
635 
636  } else {
637  LogVerbatim("HLTrigReport") << "HLT-Report - No HLT paths found!" << endl;
638  }
639 
640  LogVerbatim("HLTrigReport") << endl;
641  LogVerbatim("HLTrigReport") << "HLT-Report end!" << endl;
642  LogVerbatim("HLTrigReport") << endl;
643 
644  return;
645 }
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:85
int i
Definition: DBlmapReader.cc:9
float alpha
Definition: AMPTWrapper.h:95
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:84
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:89
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:99
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:92
unsigned int nWasRun_
Definition: HLTrigReport.h:76
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:94
double refRate_
Definition: HLTrigReport.h:105
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:81
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:100
unsigned int nAccept_
Definition: HLTrigReport.h:77
unsigned int refIndex_
Definition: HLTrigReport.h:104
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:80
bool configured_
Definition: HLTrigReport.h:73
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:93
unsigned int nEvents_
Definition: HLTrigReport.h:75
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:82
unsigned int nErrors_
Definition: HLTrigReport.h:78
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:91
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:83
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:98
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:97
void HLTrigReport::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 308 of file HLTrigReport.cc.

References datasetCounts(), dumpReport(), EVERY_JOB, reportBy_, serviceBy_, and streamCounts().

308  {
309  if (reportBy_ == EVERY_JOB)
310  dumpReport("Summary for Job");
312  edm::Service<HLTrigReportService>()->setDatasetCounts(datasetCounts());
313  edm::Service<HLTrigReportService>()->setStreamCounts(streamCounts());
314  }
315 
316 }
const std::vector< unsigned int > & streamCounts() const
ReportEvery reportBy_
Definition: HLTrigReport.h:107
void dumpReport(std::string const &header=std::string())
const std::vector< unsigned int > & datasetCounts() const
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
void HLTrigReport::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 373 of file HLTrigReport.cc.

References datasetCounts(), dumpReport(), EVERY_LUMI, edm::LuminosityBlockBase::luminosityBlock(), reportBy_, edm::LuminosityBlockBase::run(), serviceBy_, edmStreamStallGrapher::stream, and streamCounts().

373  {
374  if (reportBy_ == EVERY_LUMI) {
375  std::stringstream stream;
376  stream << "Summary for Run " << lumi.run() << ", LumiSection " << lumi.luminosityBlock();
377  dumpReport(stream.str());
378  }
380  edm::Service<HLTrigReportService>()->setDatasetCounts(datasetCounts());
381  edm::Service<HLTrigReportService>()->setStreamCounts(streamCounts());
382  }
383 }
const std::vector< unsigned int > & streamCounts() const
tuple lumi
Definition: fjr2json.py:35
ReportEvery reportBy_
Definition: HLTrigReport.h:107
void dumpReport(std::string const &header=std::string())
const std::vector< unsigned int > & datasetCounts() const
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
void HLTrigReport::endRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 357 of file HLTrigReport.cc.

References datasetCounts(), dumpReport(), EVERY_RUN, reportBy_, edm::RunBase::run(), serviceBy_, edmStreamStallGrapher::stream, and streamCounts().

357  {
358  if (reportBy_ == EVERY_RUN) {
359  std::stringstream stream;
360  stream << "Summary for Run " << run.run();
361  dumpReport(stream.str());
362  }
364  edm::Service<HLTrigReportService>()->setDatasetCounts(datasetCounts());
365  edm::Service<HLTrigReportService>()->setStreamCounts(streamCounts());
366  }
367 }
const std::vector< unsigned int > & streamCounts() const
ReportEvery reportBy_
Definition: HLTrigReport.h:107
void dumpReport(std::string const &header=std::string())
const std::vector< unsigned int > & datasetCounts() const
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
void HLTrigReport::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 121 of file HLTrigReport.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_25ns14e33_v1_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

121  {
123  desc.add<edm::InputTag>("HLTriggerResults",edm::InputTag("TriggerResults","","HLT"));
124  desc.addUntracked<std::string>("reportBy","job");
125  desc.addUntracked<std::string>("resetBy","never");
126  desc.addUntracked<std::string>("serviceBy","never");
127 
128  edm::ParameterSetDescription customDatasetsParameters;
129  desc.addUntracked<edm::ParameterSetDescription>("CustomDatasets" ,customDatasetsParameters);
130  edm::ParameterSetDescription customStreamsParameters;
131  desc.addUntracked<edm::ParameterSetDescription>("CustomStreams" ,customStreamsParameters);
132  desc.addUntracked<std::string>("ReferencePath","HLTriggerFinalPath");
133  desc.addUntracked<double>("ReferenceRate",100.0);
134 
135  descriptions.add("hltTrigReport",desc);
136 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HLTrigReport::reset ( bool  changed = false)

Definition at line 155 of file HLTrigReport.cc.

References HLTConfigProvider::datasetContents(), datasetContents_, HLTConfigProvider::datasetNames(), datasetNames_, dsAccTotS_, dsAllTotS_, dsIndex_, hlAccept_, hlAccTot_, hlAccTotDS_, hlAllTotDS_, hlErrors_, hlIndex_, hlNames_, hltConfig_, hltL1s_, hltPre_, hlWasRun_, i, isCustomDatasets_, isCustomStreams_, j, diffTwoXMLs::label, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), gen::n, nAccept_, nErrors_, nEvents_, NEVER, nWasRun_, 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 analyze(), beginJob(), beginLuminosityBlock(), and beginRun().

155  {
156 
157  // reset global counters
158  nEvents_ = 0;
159  nWasRun_ = 0;
160  nAccept_ = 0;
161  nErrors_ = 0;
162 
163  // update trigger names
164  if (changed)
166 
167  const unsigned int n = hlNames_.size();
168 
169  if (changed) {
170  // resize per-path counters
171  hlWasRun_.resize(n);
172  hltL1s_.resize(n);
173  hltPre_.resize(n);
174  hlAccept_.resize(n);
175  hlAccTot_.resize(n);
176  hlErrors_.resize(n);
177  // find the positions of seeding and prescaler modules
178  posL1s_.resize(n);
179  posPre_.resize(n);
180  for (unsigned int i = 0; i < n; ++i) {
181  posL1s_[i] = -1;
182  posPre_[i] = -1;
183  const std::vector<std::string> & moduleLabels(hltConfig_.moduleLabels(i));
184  for (unsigned int j = 0; j < moduleLabels.size(); ++j) {
185  const std::string & label = hltConfig_.moduleType(moduleLabels[j]);
186  if (label == "HLTLevel1GTSeed")
187  posL1s_[i] = j;
188  else if (label == "HLTPrescaler")
189  posPre_[i] = j;
190  }
191  }
192  }
193 
194  // reset per-path counters
195  for (unsigned int i = 0; i < n; ++i) {
196  hlWasRun_[i] = 0;
197  hltL1s_[i] = 0;
198  hltPre_[i] = 0;
199  hlAccept_[i] = 0;
200  hlAccTot_[i] = 0;
201  hlErrors_[i] = 0;
202  }
203 
204  // if not overridden, reload the datasets and streams
205  if (changed and not isCustomDatasets_) {
208  }
209  if (changed and not isCustomStreams_) {
212  }
213 
214  if (changed) {
215  // fill the matrices of hlIndex_, hlAccTotDS_
216  hlIndex_.clear();
217  hlIndex_.resize(datasetNames_.size());
218  hlAccTotDS_.clear();
219  hlAllTotDS_.clear();
220  hlAccTotDS_.resize(datasetNames_.size());
221  hlAllTotDS_.resize(datasetNames_.size());
222  for (unsigned int ds = 0; ds < datasetNames_.size(); ds++) {
223  unsigned int size = datasetContents_[ds].size();
224  hlIndex_[ds].reserve(size);
225  hlAccTotDS_[ds].reserve(size);
226  hlAllTotDS_[ds]=0;
227  for (unsigned int p = 0; p < size; ++p) {
228  unsigned int i = hltConfig_.triggerIndex(datasetContents_[ds][p]);
229  if (i<n) {
230  hlIndex_[ds].push_back(i);
231  hlAccTotDS_[ds].push_back(0);
232  }
233  }
234  }
235  } else {
236  // reset the matrix of hlAccTotDS_
237  for (unsigned int ds = 0; ds < datasetNames_.size(); ds++) {
238  hlAllTotDS_[ds]=0;
239  for (unsigned int i = 0; i < hlAccTotDS_[ds].size(); ++i)
240  hlAccTotDS_[ds][i] = 0;
241  }
242  }
243 
244  if (changed) {
245  // fill the matrices of dsIndex_, dsAccTotS_
246  dsIndex_.clear();
247  dsIndex_.resize(streamNames_.size());
248  dsAccTotS_.clear();
249  dsAllTotS_.clear();
250  dsAccTotS_.resize(streamNames_.size());
251  dsAllTotS_.resize(streamNames_.size());
252  for (unsigned int s = 0; s < streamNames_.size(); ++s) {
253  unsigned int size = streamContents_[s].size();
254  dsIndex_.reserve(size);
255  dsAccTotS_.reserve(size);
256  dsAllTotS_[s]=0;
257  for (unsigned int ds = 0; ds < size; ++ds) {
258  unsigned int i = 0;
259  for (; i<datasetNames_.size(); i++) if (datasetNames_[i] == streamContents_[s][ds])
260  break;
261  // report only datasets that have at least one path otherwise crash
262  if (i < datasetNames_.size() and hlIndex_[i].size() > 0) {
263  dsIndex_[s].push_back(i);
264  dsAccTotS_[s].push_back(0);
265  }
266  }
267  }
268  } else {
269  // reset the matrix of dsAccTotS_
270  for (unsigned int s = 0; s < streamNames_.size(); ++s) {
271  dsAllTotS_[s]=0;
272  for (unsigned int i = 0; i < dsAccTotS_[s].size(); ++i)
273  dsAccTotS_[s][i] = 0;
274  }
275  }
276 
277  // if needed, update the reference path
278  if (changed) {
280  if (refIndex_ >= n) {
281  refIndex_ = 0;
282  edm::LogWarning("HLTrigReport")
283  << "Requested reference path '"+refPath_+"' not in HLT menu. "
284  << "Using HLTriggerFinalPath instead.";
285  refPath_ = "HLTriggerFinalPath";
287  if (refIndex_ >= n) {
288  refIndex_ = 0;
289  edm::LogWarning("HLTrigReport")
290  << "Requested reference path '"+refPath_+"' not in HLT menu. "
291  << "Using first path in table (index=0) instead.";
292  }
293  }
294  }
295 
296  if (changed and serviceBy_ != NEVER and edm::Service<HLTrigReportService>()) {
299  }
300 
301 }
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:85
std::vector< std::vector< std::string > > datasetContents_
Definition: HLTrigReport.h:95
bool isCustomStreams_
Definition: HLTrigReport.h:102
int i
Definition: DBlmapReader.cc:9
bool isCustomDatasets_
Definition: HLTrigReport.h:96
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:84
std::vector< std::string > hlNames_
Definition: HLTrigReport.h:89
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_
Definition: HLTrigReport.h:99
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:92
const std::vector< std::string > & triggerNames() const
names of trigger paths
unsigned int nWasRun_
Definition: HLTrigReport.h:76
std::vector< std::string > datasetNames_
Definition: HLTrigReport.h:94
std::vector< int > posL1s_
Definition: HLTrigReport.h:87
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
std::vector< int > posPre_
Definition: HLTrigReport.h:88
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:81
const std::vector< std::string > & streamNames() const
int j
Definition: DBlmapReader.cc:9
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:100
unsigned int nAccept_
Definition: HLTrigReport.h:77
unsigned int refIndex_
Definition: HLTrigReport.h:104
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:80
std::string refPath_
Definition: HLTrigReport.h:103
HLTConfigProvider hltConfig_
Definition: HLTrigReport.h:110
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:93
std::vector< std::vector< std::string > > streamContents_
Definition: HLTrigReport.h:101
unsigned int nEvents_
Definition: HLTrigReport.h:75
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:82
unsigned int nErrors_
Definition: HLTrigReport.h:78
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
std::vector< std::vector< unsigned int > > hlIndex_
Definition: HLTrigReport.h:91
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:83
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:98
std::vector< std::vector< unsigned int > > dsIndex_
Definition: HLTrigReport.h:97
tuple size
Write out results.
const std::vector< std::string > & datasetNames() const
ReportEvery serviceBy_
Definition: HLTrigReport.h:109
const std::vector< unsigned int > & HLTrigReport::streamCounts ( ) const

Definition at line 151 of file HLTrigReport.cc.

References dsAllTotS_.

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

151  {
152  return dsAllTotS_;
153 }
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:99
const std::vector< std::string > & HLTrigReport::streamNames ( ) const

Definition at line 145 of file HLTrigReport.cc.

References streamNames_.

145  {
146  return streamNames_;
147 }
std::vector< std::string > streamNames_
Definition: HLTrigReport.h:100

Member Data Documentation

bool HLTrigReport::configured_
private

Definition at line 73 of file HLTrigReport.h.

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

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

Definition at line 95 of file HLTrigReport.h.

Referenced by HLTrigReport(), and reset().

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

Definition at line 94 of file HLTrigReport.h.

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

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

Definition at line 98 of file HLTrigReport.h.

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

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

Definition at line 99 of file HLTrigReport.h.

Referenced by analyze(), beginRun(), dumpReport(), reset(), and streamCounts().

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

Definition at line 97 of file HLTrigReport.h.

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

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

Definition at line 83 of file HLTrigReport.h.

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

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

Definition at line 84 of file HLTrigReport.h.

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

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

Definition at line 92 of file HLTrigReport.h.

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

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

Definition at line 93 of file HLTrigReport.h.

Referenced by analyze(), beginRun(), datasetCounts(), dumpReport(), and reset().

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

Definition at line 85 of file HLTrigReport.h.

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

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

Definition at line 91 of file HLTrigReport.h.

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

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

Definition at line 89 of file HLTrigReport.h.

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

HLTConfigProvider HLTrigReport::hltConfig_
private

Definition at line 110 of file HLTrigReport.h.

Referenced by beginRun(), and reset().

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

Definition at line 81 of file HLTrigReport.h.

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

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

Definition at line 82 of file HLTrigReport.h.

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

edm::InputTag HLTrigReport::hlTriggerResults_
private

Definition at line 71 of file HLTrigReport.h.

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

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

Definition at line 72 of file HLTrigReport.h.

Referenced by analyze(), and HLTrigReport().

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

Definition at line 80 of file HLTrigReport.h.

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

bool HLTrigReport::isCustomDatasets_
private

Definition at line 96 of file HLTrigReport.h.

Referenced by HLTrigReport(), and reset().

bool HLTrigReport::isCustomStreams_
private

Definition at line 102 of file HLTrigReport.h.

Referenced by HLTrigReport(), and reset().

unsigned int HLTrigReport::nAccept_
private

Definition at line 77 of file HLTrigReport.h.

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

unsigned int HLTrigReport::nErrors_
private

Definition at line 78 of file HLTrigReport.h.

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

unsigned int HLTrigReport::nEvents_
private

Definition at line 75 of file HLTrigReport.h.

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

unsigned int HLTrigReport::nWasRun_
private

Definition at line 76 of file HLTrigReport.h.

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

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

Definition at line 87 of file HLTrigReport.h.

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

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

Definition at line 88 of file HLTrigReport.h.

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

unsigned int HLTrigReport::refIndex_
private

Definition at line 104 of file HLTrigReport.h.

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

std::string HLTrigReport::refPath_
private

Definition at line 103 of file HLTrigReport.h.

Referenced by HLTrigReport(), and reset().

double HLTrigReport::refRate_
private

Definition at line 105 of file HLTrigReport.h.

Referenced by dumpReport(), and HLTrigReport().

ReportEvery HLTrigReport::reportBy_
private

Definition at line 107 of file HLTrigReport.h.

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

ReportEvery HLTrigReport::resetBy_
private

Definition at line 108 of file HLTrigReport.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), and beginRun().

ReportEvery HLTrigReport::serviceBy_
private

Definition at line 109 of file HLTrigReport.h.

Referenced by analyze(), endJob(), endLuminosityBlock(), endRun(), HLTrigReport(), and reset().

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

Definition at line 101 of file HLTrigReport.h.

Referenced by HLTrigReport(), and reset().

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

Definition at line 100 of file HLTrigReport.h.

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