CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTScalers Class Reference

#include <HLTScalers.h>

Inheritance diagram for HLTScalers:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &run, const edm::EventSetup &c) override
 
void dqmEndRun (const edm::Run &run, const edm::EventSetup &c) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 DQM Client Diagnostic should be performed here: More...
 
 HLTScalers (const edm::ParameterSet &ps)
 
 ~HLTScalers () override=default
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

int currentRun_
 
MonitorElementdetailedScalers_
 
MonitorElementdiagnostic_
 
std::string folderName_
 
MonitorElementhltBx_
 
MonitorElementhltBxVsPath_
 
HLTConfigProvider hltConfig_
 
MonitorElementhltCorrelations_
 
MonitorElementhltOverallScaler_
 
MonitorElementhltOverallScalerN_
 
bool monitorDaemon_
 
int nev_
 
int nLumi_
 
MonitorElementnLumiBlock_
 
MonitorElementnProc_
 
std::vector< std::pair< std::string, std::vector< std::string > > > pairPDPaths_
 
std::string processname_
 
bool resetMe_
 
MonitorElementscalers_
 
MonitorElementscalersException_
 
MonitorElementscalersN_
 
MonitorElementscalersPD_
 
bool sentPaths_
 
edm::EDGetTokenT< edm::TriggerResultstrigResultsSource_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 65 of file HLTScalers.h.

Constructor & Destructor Documentation

HLTScalers::HLTScalers ( const edm::ParameterSet ps)

Definition at line 78 of file HLTScalers.cc.

References LogDebug.

79  : folderName_(ps.getUntrackedParameter<std::string>("dqmFolder", "HLT/HLTScalers_EvF")),
80  processname_(ps.getParameter<std::string>("processname")),
81  pairPDPaths_(),
82  trigResultsSource_(consumes<TriggerResults>(ps.getParameter<edm::InputTag>("triggerResults"))),
83  scalersN_(nullptr),
84  scalersException_(nullptr),
85  hltCorrelations_(nullptr),
86  detailedScalers_(nullptr),
87  nProc_(nullptr),
88  nLumiBlock_(nullptr),
89  hltBx_(nullptr),
90  hltBxVsPath_(nullptr),
91  hltOverallScaler_(nullptr),
92  hltOverallScalerN_(nullptr),
93  diagnostic_(nullptr),
94  sentPaths_(false),
95  monitorDaemon_(ps.getUntrackedParameter<bool>("MonitorDaemon", false)),
96  nev_(0),
97  nLumi_(0) {
98  LogDebug("HLTScalers") << "HLTScalers: constructor....";
99 }
#define LogDebug(id)
std::vector< std::pair< std::string, std::vector< std::string > > > pairPDPaths_
Definition: HLTScalers.h:82
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * scalersN_
Definition: HLTScalers.h:87
MonitorElement * detailedScalers_
Definition: HLTScalers.h:90
std::string processname_
Definition: HLTScalers.h:81
MonitorElement * hltOverallScaler_
Definition: HLTScalers.h:94
MonitorElement * diagnostic_
Definition: HLTScalers.h:96
MonitorElement * hltBxVsPath_
Definition: HLTScalers.h:93
MonitorElement * hltCorrelations_
Definition: HLTScalers.h:89
MonitorElement * scalersException_
Definition: HLTScalers.h:88
MonitorElement * nLumiBlock_
Definition: HLTScalers.h:92
MonitorElement * hltOverallScalerN_
Definition: HLTScalers.h:95
bool sentPaths_
Definition: HLTScalers.h:98
std::string folderName_
Definition: HLTScalers.h:80
bool monitorDaemon_
Definition: HLTScalers.h:98
MonitorElement * hltBx_
Definition: HLTScalers.h:93
MonitorElement * nProc_
Definition: HLTScalers.h:91
edm::EDGetTokenT< edm::TriggerResults > trigResultsSource_
Definition: HLTScalers.h:83
HLTScalers::~HLTScalers ( )
overridedefault

Member Function Documentation

void HLTScalers::analyze ( const edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 180 of file HLTScalers.cc.

References accept(), edm::HLTGlobalStatus::accept(), b, edm::EventBase::bunchCrossing(), l1GtPatternGenerator_cfi::bx, detailedScalers_, diagnostic_, Exception, dqm::impl::MonitorElement::Fill(), dqmdumpme::first, edm::Event::getByToken(), dqm::impl::MonitorElement::getTH1(), hltBx_, hltBxVsPath_, hltCorrelations_, hltOverallScaler_, hltOverallScalerN_, PDWG_DiJetAODSkim_cff::hltResults, mps_fire::i, edm::HLTGlobalStatus::index(), dqmiolumiharvest::j, cmsLHEtoEOSManager::l, edm::EDConsumerBase::labelsForToken(), LogDebug, edm::ProductLabels::module, names, nev_, nProc_, pairPDPaths_, Pass, data-class-funcs::q, scalers_, scalersException_, scalersN_, scalersPD_, edm::second(), sentPaths_, dqm::impl::MonitorElement::setBinContent(), edm::HLTGlobalStatus::size(), edm::HLTGlobalStatus::state(), AlCaHLTBitMon_QueryRunRegistry::string, edm::TriggerNames::triggerIndex(), edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), trigNames, and trigResultsSource_.

180  {
181  nProc_->Fill(++nev_);
182  diagnostic_->setBinContent(1, 1); // this ME is never touched -
183  // it just tells you how the merging is doing.
184 
186  bool b = e.getByToken(trigResultsSource_, hltResults);
187  if (!b) {
188  Labels l;
190 
191  edm::LogInfo("HLTScalers") << "getByLabel for TriggerResults failed"
192  << " with label " << l.module;
193  return;
194  }
195  int npath = hltResults->size();
196  unsigned int nPD = pairPDPaths_.size();
198 
199  const edm::TriggerNames& trigNames = e.triggerNames(*hltResults);
200  // for some reason this doesn't appear to work on the first event sometimes
201  if (!sentPaths_) {
202  const edm::TriggerNames& names = e.triggerNames(*hltResults);
203 
204  // save path names in DQM-accessible format
205  int q = 0;
206  for (TriggerNames::Strings::const_iterator j = names.triggerNames().begin(); j != names.triggerNames().end(); ++j) {
207  LogDebug("HLTScalers") << q << ": " << *j;
208  ++q;
209  scalers_->getTH1()->GetXaxis()->SetBinLabel(q, j->c_str());
210  }
211 
212  for (unsigned int i = 0; i < nPD; i++) {
213  LogDebug("HLTScalers") << i << ": " << pairPDPaths_[i].first << std::endl;
214  scalersPD_->getTH1()->GetXaxis()->SetBinLabel(i + 1, pairPDPaths_[i].first.c_str());
215  }
216 
217  sentPaths_ = true;
218  }
219 
220  bool accept = false;
221  int bx = e.bunchCrossing();
222  for (int i = 0; i < npath; ++i) {
223  // state returns 0 on ready, 1 on accept, 2 on fail, 3 on exception.
224  // these are defined in HLTEnums.h
225  for (unsigned int j = 0; j < hltResults->index(i); ++j) {
226  detailedScalers_->Fill(i, j);
227  }
228  if (hltResults->state(i) == hlt::Pass) {
229  scalers_->Fill(i);
230  scalersN_->Fill(i);
231  hltBxVsPath_->Fill(bx, i);
232  accept = true;
233  for (int j = i + 1; j < npath; ++j) {
234  if (hltResults->state(j) == hlt::Pass) {
235  hltCorrelations_->Fill(i, j); // fill
236  hltCorrelations_->Fill(j, i);
237  }
238  }
239  } else if (hltResults->state(i) == hlt::Exception) {
241  }
242  }
243  if (accept) {
244  hltOverallScaler_->Fill(1.0);
245  hltOverallScalerN_->Fill(1.0);
246  hltBx_->Fill(int(bx));
247  }
248 
249  bool anyGroupPassed = false;
250  for (unsigned int mi = 0; mi < pairPDPaths_.size(); mi++) {
251  bool groupPassed = false;
252 
253  for (unsigned int i = 0; i < pairPDPaths_[mi].second.size(); i++) {
254  // string hltPathName = hist_2d->GetXaxis()->GetBinLabel(i);
255  std::string hltPathName = pairPDPaths_[mi].second[i];
256 
257  // check if this is hlt path name
258  // unsigned int pathByIndex = triggerNames.triggerIndex(hltPathName);
259  unsigned int pathByIndex = trigNames.triggerIndex(pairPDPaths_[mi].second[i]);
260  if (pathByIndex >= hltResults->size())
261  continue;
262 
263  // check if its L1 passed
264  // comment out below but set groupL1Passed to true always
265  // if(hasL1Passed(hltPathName,triggerNames)) groupL1Passed = true;
266  // groupL1Passed = true;
267 
268  // Fill HLTPassed Matrix and HLTPassFail Matrix
269  // --------------------------------------------------------
270 
271  if (hltResults->accept(pathByIndex)) {
272  groupPassed = true;
273  break;
274  }
275  }
276 
277  if (groupPassed) {
278  scalersPD_->Fill(mi);
279  anyGroupPassed = true;
280  }
281  }
282 
283  if (anyGroupPassed)
284  scalersPD_->Fill(pairPDPaths_.size() - 1);
285 }
#define LogDebug(id)
std::vector< std::pair< std::string, std::vector< std::string > > > pairPDPaths_
Definition: HLTScalers.h:82
Definition: hltDiff.cc:244
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
MonitorElement * scalersN_
Definition: HLTScalers.h:87
MonitorElement * detailedScalers_
Definition: HLTScalers.h:90
bool accept() const
Has at least one path accepted the event?
int bunchCrossing() const
Definition: EventBase.h:64
MonitorElement * hltOverallScaler_
Definition: HLTScalers.h:94
MonitorElement * scalers_
Definition: HLTScalers.h:86
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
MonitorElement * diagnostic_
Definition: HLTScalers.h:96
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
const std::string names[nVars_]
void Fill(long long x)
U second(std::pair< T, U > const &p)
MonitorElement * hltBxVsPath_
Definition: HLTScalers.h:93
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:24
unsigned int size() const
Get number of paths stored.
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
MonitorElement * hltCorrelations_
Definition: HLTScalers.h:89
ProductLabels Labels
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
MonitorElement * scalersException_
Definition: HLTScalers.h:88
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * hltOverallScalerN_
Definition: HLTScalers.h:95
double b
Definition: hdecay.h:118
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
bool sentPaths_
Definition: HLTScalers.h:98
MonitorElement * hltBx_
Definition: HLTScalers.h:93
MonitorElement * nProc_
Definition: HLTScalers.h:91
MonitorElement * scalersPD_
Definition: HLTScalers.h:85
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:265
hlt::HLTState state(const unsigned int i) const
Get status of ith path.
edm::EDGetTokenT< edm::TriggerResults > trigResultsSource_
Definition: HLTScalers.h:83
void HLTScalers::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
override

Definition at line 171 of file HLTScalers.cc.

References hltOverallScalerN_, LogDebug, dqm::impl::MonitorElement::Reset(), and scalersN_.

171  {
172  LogDebug("HLTScalers") << "Start of luminosity block.";
173  // reset the N guys
174  if (scalersN_)
175  scalersN_->Reset();
176  if (hltOverallScalerN_)
178 }
#define LogDebug(id)
MonitorElement * scalersN_
Definition: HLTScalers.h:87
virtual void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * hltOverallScalerN_
Definition: HLTScalers.h:95
void HLTScalers::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 135 of file HLTScalers.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookInt(), detailedScalers_, diagnostic_, folderName_, hltBx_, hltBxVsPath_, hltConfig_, hltCorrelations_, hltOverallScaler_, hltOverallScalerN_, nLumiBlock_, nProc_, pairPDPaths_, scalers_, scalersException_, scalersN_, scalersPD_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), HLTConfigProvider::size(), and AlCaHLTBitMon_QueryRunRegistry::string.

135  {
136  std::string rawdir(folderName_ + "/raw");
137  iBooker.setCurrentFolder(rawdir);
138 
139  nProc_ = iBooker.bookInt("nProcessed");
140  nLumiBlock_ = iBooker.bookInt("nLumiBlock");
141  diagnostic_ = iBooker.book1D("hltMerge", "HLT merging diagnostic", 1, 0.5, 1.5);
142  // fill for ever accepted event
143  hltOverallScaler_ = iBooker.book1D("hltOverallScaler", "HLT Overall Scaler", 1, 0.5, 1.5);
144  hltOverallScalerN_ = iBooker.book1D("hltOverallScalerN", "Reset HLT Overall Scaler", 1, 0.5, 1.5);
145 
146  // DQM: Previously the number of trigger paths was determined on the first
147  // event, by taking the size of the htlResults to book the histogram.
148  // Now we use the size of the hltConfig instead.
149  int npath = hltConfig_.size();
150  unsigned int nPD = pairPDPaths_.size();
151 
152  // need to get maxModules dynamically
153  int maxModules = 200;
154 
155  scalersPD_ = iBooker.book1D("pdScalers", "PD scalers (stream A)", nPD, -0.5, nPD - 0.5);
157  iBooker.book2D("detailedHltScalers", "HLT Scalers", npath, -0.5, npath - 0.5, maxModules, 0, maxModules - 1);
158  scalers_ = iBooker.book1D("hltScalers", "HLT scalers", npath, -0.5, npath - 0.5);
159  scalersN_ = iBooker.book1D("hltScalersN", "Reset HLT scalers", npath, -0.5, npath - 0.5);
160  scalersException_ = iBooker.book1D("hltExceptions", "HLT Exception scalers", npath, -0.5, npath - 0.5);
162  iBooker.book2D("hltCorrelations", "HLT Scalers", npath, -0.5, npath - 0.5, npath, -0.5, npath - 0.5);
163 
164  // these two belong in top-level
165  iBooker.setCurrentFolder(folderName_);
166  hltBxVsPath_ =
167  iBooker.book2D("hltBxVsPath", "HLT Accept vs Bunch Number", 3600, -0.5, 3599.5, npath, -0.5, npath - 0.5);
168  hltBx_ = iBooker.book1D("hltBx", "Bx of HLT Accepted Events ", 3600, -0.5, 3599.5);
169 }
unsigned int size() const
number of trigger paths in trigger table
std::vector< std::pair< std::string, std::vector< std::string > > > pairPDPaths_
Definition: HLTScalers.h:82
MonitorElement * scalersN_
Definition: HLTScalers.h:87
MonitorElement * detailedScalers_
Definition: HLTScalers.h:90
MonitorElement * hltOverallScaler_
Definition: HLTScalers.h:94
MonitorElement * scalers_
Definition: HLTScalers.h:86
MonitorElement * diagnostic_
Definition: HLTScalers.h:96
MonitorElement * hltBxVsPath_
Definition: HLTScalers.h:93
MonitorElement * hltCorrelations_
Definition: HLTScalers.h:89
HLTConfigProvider hltConfig_
Definition: HLTScalers.h:79
MonitorElement * scalersException_
Definition: HLTScalers.h:88
MonitorElement * nLumiBlock_
Definition: HLTScalers.h:92
MonitorElement * hltOverallScalerN_
Definition: HLTScalers.h:95
std::string folderName_
Definition: HLTScalers.h:80
MonitorElement * hltBx_
Definition: HLTScalers.h:93
MonitorElement * nProc_
Definition: HLTScalers.h:91
MonitorElement * scalersPD_
Definition: HLTScalers.h:85
void HLTScalers::dqmBeginRun ( const edm::Run run,
const edm::EventSetup c 
)
override

Definition at line 101 of file HLTScalers.cc.

References HLTConfigProvider::datasetContent(), hltConfig_, mps_fire::i, edm::RunBase::id(), HLTConfigProvider::init(), LogDebug, pairPDPaths_, processname_, HLTConfigProvider::streamContent(), HLTConfigProvider::streamIndex(), and HLTConfigProvider::streamNames().

101  {
102  LogDebug("HLTScalers") << "HLTScalers::beginRun, run " << run.id();
103 
104  // HLT config does not change within runs!
105  bool changed = false;
106 
107  // clear vector pairPDPaths_
108  pairPDPaths_.clear();
109 
110  if (not hltConfig_.init(run, c, processname_, changed)) {
111  edm::LogError("TrigXMonitor") << "HLTConfigProvider failed to initialize.";
112  } else {
113  // check if trigger name in (new) config
114  // cout << "Available TriggerNames are: " << endl;
115  // hltConfig_.dump("Triggers");
116 
117  if (hltConfig_.streamIndex("A") < hltConfig_.streamNames().size()) {
118  // get hold of PD names and constituent path names
119  const std::vector<std::string>& PD = hltConfig_.streamContent("A");
120 
121  for (unsigned int i = 0; i < PD.size(); i++) {
122  const std::vector<std::string>& datasetPaths = hltConfig_.datasetContent(PD[i]);
123  pairPDPaths_.push_back(make_pair(PD[i], datasetPaths));
124  }
125 
126  // push stream A and its PDs
127  pairPDPaths_.push_back(make_pair("A", PD));
128 
129  } else {
130  LogDebug("HLTScalers") << "HLTScalers::beginRun, steamm A not in the HLT menu ";
131  }
132  }
133 }
#define LogDebug(id)
std::vector< std::pair< std::string, std::vector< std::string > > > pairPDPaths_
Definition: HLTScalers.h:82
RunID const & id() const
Definition: RunBase.h:39
std::string processname_
Definition: HLTScalers.h:81
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::vector< std::string > & streamNames() const
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
HLTConfigProvider hltConfig_
Definition: HLTScalers.h:79
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void HLTScalers::dqmEndRun ( const edm::Run run,
const edm::EventSetup c 
)
override

Definition at line 295 of file HLTScalers.cc.

References edm::RunBase::id(), and LogDebug.

295  {
296  LogDebug("HLTScalers") << "HLTScalers::endRun , run " << run.id();
297 }
#define LogDebug(id)
RunID const & id() const
Definition: RunBase.h:39
void HLTScalers::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
override

DQM Client Diagnostic should be performed here:

Definition at line 287 of file HLTScalers.cc.

References dqm::impl::MonitorElement::Fill(), edm::LuminosityBlockBase::id(), LogDebug, edm::LuminosityBlockID::luminosityBlock(), and nLumiBlock_.

287  {
288  // put this in as a first-pass for figuring out the rate
289  // each lumi block is 23 seconds in length
290  nLumiBlock_->Fill(lumiSeg.id().luminosityBlock());
291 
292  LogDebug("HLTScalers") << "End of luminosity block.";
293 }
#define LogDebug(id)
LuminosityBlockID id() const
void Fill(long long x)
MonitorElement * nLumiBlock_
Definition: HLTScalers.h:92
LuminosityBlockNumber_t luminosityBlock() const

Member Data Documentation

int HLTScalers::currentRun_
private

Definition at line 102 of file HLTScalers.h.

MonitorElement* HLTScalers::detailedScalers_
private

Definition at line 90 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HLTScalers::diagnostic_
private

Definition at line 96 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

std::string HLTScalers::folderName_
private

Definition at line 80 of file HLTScalers.h.

Referenced by bookHistograms().

MonitorElement* HLTScalers::hltBx_
private

Definition at line 93 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * HLTScalers::hltBxVsPath_
private

Definition at line 93 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

HLTConfigProvider HLTScalers::hltConfig_
private

Definition at line 79 of file HLTScalers.h.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement* HLTScalers::hltCorrelations_
private

Definition at line 89 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HLTScalers::hltOverallScaler_
private

Definition at line 94 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HLTScalers::hltOverallScalerN_
private

Definition at line 95 of file HLTScalers.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

bool HLTScalers::monitorDaemon_
private

Definition at line 98 of file HLTScalers.h.

int HLTScalers::nev_
private

Definition at line 100 of file HLTScalers.h.

Referenced by analyze().

int HLTScalers::nLumi_
private

Definition at line 101 of file HLTScalers.h.

MonitorElement* HLTScalers::nLumiBlock_
private

Definition at line 92 of file HLTScalers.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* HLTScalers::nProc_
private

Definition at line 91 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

std::vector<std::pair<std::string, std::vector<std::string> > > HLTScalers::pairPDPaths_
private

Definition at line 82 of file HLTScalers.h.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

std::string HLTScalers::processname_
private

Definition at line 81 of file HLTScalers.h.

Referenced by dqmBeginRun().

bool HLTScalers::resetMe_
private

Definition at line 98 of file HLTScalers.h.

MonitorElement* HLTScalers::scalers_
private

Definition at line 86 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HLTScalers::scalersException_
private

Definition at line 88 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HLTScalers::scalersN_
private

Definition at line 87 of file HLTScalers.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

MonitorElement* HLTScalers::scalersPD_
private

Definition at line 85 of file HLTScalers.h.

Referenced by analyze(), and bookHistograms().

bool HLTScalers::sentPaths_
private

Definition at line 98 of file HLTScalers.h.

Referenced by analyze().

edm::EDGetTokenT<edm::TriggerResults> HLTScalers::trigResultsSource_
private

Definition at line 83 of file HLTScalers.h.

Referenced by analyze().