CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
EgHLTOfflineSummaryClient Class Reference

#include <EgHLTOfflineSummaryClient.h>

Inheritance diagram for EgHLTOfflineSummaryClient:
edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  SumHistBinData
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &c) override
 
 EgHLTOfflineSummaryClient (const edm::ParameterSet &)
 
void endJob () override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &run, const edm::EventSetup &c) override
 
 ~EgHLTOfflineSummaryClient () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

 EgHLTOfflineSummaryClient (const EgHLTOfflineSummaryClient &rhs)
 
void getEgHLTFiltersToMon_ (std::vector< std::string > &filterNames) const
 
MonitorElementgetEgHLTSumHist_ ()
 
int getQTestBinData_ (const edm::ParameterSet &)
 
int getQTestResults_ (const std::string &filterName, const std::vector< std::string > &pattern) const
 
EgHLTOfflineSummaryClientoperator= (const EgHLTOfflineSummaryClient &rhs)
 
void runClient_ ()
 
void splitStringsToPairs_ (const std::vector< std::string > &stringsToSplit, std::vector< std::pair< std::string, std::string > > &splitStrings)
 

Static Private Member Functions

static void fillQTestData_ (const edm::ParameterSet &iConfig, std::vector< SumHistBinData > &qTests, const std::string &label)
 

Private Attributes

DQMStoredbe_
 
std::string dirName_
 
std::vector< std::string > egHLTFiltersToMon_
 
std::vector< std::string > egHLTFiltersToMonPaths_
 
std::string egHLTSumHistName_
 
std::vector< SumHistBinDataegHLTSumHistXBins_
 
std::vector< std::string > eleHLTFilterNames_
 
std::vector< std::string > eleHLTFilterNamesForSumBit_
 
std::vector< SumHistBinDataeleQTestsForSumBit_
 
bool filterInactiveTriggers_
 
std::string hltTag_
 
bool isSetup_
 
std::vector< std::string > phoHLTFilterNames_
 
std::vector< std::string > phoHLTFilterNamesForSumBit_
 
std::vector< SumHistBinDataphoQTestsForSumBit_
 
bool runClientEndJob_
 
bool runClientEndLumiBlock_
 
bool runClientEndRun_
 
bool usePathNames_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 30 of file EgHLTOfflineSummaryClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 34 of file EgHLTOfflineSummaryClient.h.

◆ MonitorElement

Definition at line 33 of file EgHLTOfflineSummaryClient.h.

Constructor & Destructor Documentation

◆ EgHLTOfflineSummaryClient() [1/2]

EgHLTOfflineSummaryClient::EgHLTOfflineSummaryClient ( const EgHLTOfflineSummaryClient rhs)
inlineprivate

Definition at line 70 of file EgHLTOfflineSummaryClient.h.

70 {}

◆ EgHLTOfflineSummaryClient() [2/2]

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

Definition at line 17 of file EgHLTOfflineSummaryClient.cc.

References dbe_, dirName_, egHLTSumHistXBins_, eleHLTFilterNames_, eleHLTFilterNamesForSumBit_, eleQTestsForSumBit_, fillQTestData_(), filterInactiveTriggers_, edm::ParameterSet::getParameter(), hltTag_, Utilities::operator, phoHLTFilterNames_, phoHLTFilterNamesForSumBit_, phoQTestsForSumBit_, runClientEndJob_, runClientEndLumiBlock_, runClientEndRun_, dqm::implementation::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and usePathNames_.

18  : egHLTSumHistName_("egHLTTrigSum"), isSetup_(false) {
19  usesResource("DQMStore");
21  "DQMDirName"); //only one chance to get this, if we every have another shot, remember to check isSetup is okay
23  if (!dbe_) {
24  edm::LogError("EgHLTOfflineSummaryClient")
25  << "unable to get DQMStore service, no summary histograms will be produced";
26  } else {
28  }
29 
30  eleHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNames");
31  phoHLTFilterNames_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNames");
32  eleHLTFilterNamesForSumBit_ = iConfig.getParameter<std::vector<std::string> >("eleHLTFilterNamesForSumBit");
33  phoHLTFilterNamesForSumBit_ = iConfig.getParameter<std::vector<std::string> >("phoHLTFilterNamesForSumBit");
34 
35  filterInactiveTriggers_ = iConfig.getParameter<bool>("filterInactiveTriggers");
36  hltTag_ = iConfig.getParameter<std::string>("hltTag");
37 
38  usePathNames_ = iConfig.getParameter<bool>("usePathNames");
39 
40  //std::vector<std::string> egHLTSumQTests = iConfig.getParameter<std::vector<std::string> >("egHLTSumQTests");
41  // splitStringsToPairs_(egHLTSumQTests,egHLTSumHistXBins_);
42 
43  fillQTestData_(iConfig, egHLTSumHistXBins_, "egHLTSumQTests");
44  fillQTestData_(iConfig, eleQTestsForSumBit_, "egHLTEleQTestsForSumBit");
45  fillQTestData_(iConfig, phoQTestsForSumBit_, "egHLTPhoQTestsForSumBit");
46 
47  runClientEndLumiBlock_ = iConfig.getParameter<bool>("runClientEndLumiBlock");
48  runClientEndRun_ = iConfig.getParameter<bool>("runClientEndRun");
49  runClientEndJob_ = iConfig.getParameter<bool>("runClientEndJob");
50 
51  //egHLTSumHistXBins_.push_back(std::make_pair("Ele Rel Trig Eff",&EgHLTOfflineSummaryClient::eleTrigRelEffQTestResult_));
52  //egHLTSumHistXBins_.push_back(std::make_pair("Pho Rel Trig Eff",&EgHLTOfflineSummaryClient::phoTrigRelEffQTestResult_));
53  //egHLTSumHistXBins_.push_back(std::make_pair("Ele T&P Trig Eff",&EgHLTOfflineSummaryClient::eleTrigTPEffQTestResult_));
54  //egHLTSumHistXBins_.push_back(std::make_pair("Triggered Ele",&EgHLTOfflineSummaryClient::trigEleQTestResult_));
55  //egHLTSumHistXBins_.push_back(std::make_pair("Triggered Pho",&EgHLTOfflineSummaryClient::trigPhoQTestResult_));
56 }
std::vector< std::string > phoHLTFilterNamesForSumBit_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::string > eleHLTFilterNamesForSumBit_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::vector< SumHistBinData > egHLTSumHistXBins_
std::vector< std::string > eleHLTFilterNames_
std::vector< SumHistBinData > eleQTestsForSumBit_
Log< level::Error, false > LogError
std::vector< SumHistBinData > phoQTestsForSumBit_
std::vector< std::string > phoHLTFilterNames_
static void fillQTestData_(const edm::ParameterSet &iConfig, std::vector< SumHistBinData > &qTests, const std::string &label)

◆ ~EgHLTOfflineSummaryClient()

EgHLTOfflineSummaryClient::~EgHLTOfflineSummaryClient ( )
overridedefault

Member Function Documentation

◆ analyze()

void EgHLTOfflineSummaryClient::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 101 of file EgHLTOfflineSummaryClient.cc.

101 {}

◆ beginJob()

void EgHLTOfflineSummaryClient::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 60 of file EgHLTOfflineSummaryClient.cc.

60 {}

◆ beginLuminosityBlock()

void EgHLTOfflineSummaryClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlineoverride

Definition at line 83 of file EgHLTOfflineSummaryClient.h.

83 {}

◆ beginRun()

void EgHLTOfflineSummaryClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
override

Definition at line 67 of file EgHLTOfflineSummaryClient.cc.

References HltBtagPostValidation_cff::c, egHLTFiltersToMon_, egHLTFiltersToMonPaths_, eleHLTFilterNames_, eleHLTFilterNamesForSumBit_, egHLT::trigTools::filterInactiveTriggers(), filterInactiveTriggers_, egHLT::trigTools::getActiveFilters(), getEgHLTFiltersToMon_(), HltComparatorCreateWorkflow::hltConfig, hltTag_, isSetup_, phoHLTFilterNames_, phoHLTFilterNamesForSumBit_, writedatasetfile::run, egHLT::trigTools::translateFiltersToPathNames(), and usePathNames_.

67  {
68  if (!isSetup_) {
69  bool changed;
71  hltConfig.init(run, c, hltTag_, changed);
73  std::vector<std::string> activeFilters;
74  std::vector<std::string> activeEleFilters;
75  std::vector<std::string> activeEle2LegFilters;
76  std::vector<std::string> activePhoFilters;
77  std::vector<std::string> activePho2LegFilters;
78 
80  hltConfig, activeFilters, activeEleFilters, activeEle2LegFilters, activePhoFilters, activePho2LegFilters);
81 
86  }
88 
89  if (usePathNames_)
91  isSetup_ = true;
92  }
93 }
std::vector< std::string > phoHLTFilterNamesForSumBit_
std::vector< std::string > egHLTFiltersToMonPaths_
std::vector< std::string > eleHLTFilterNamesForSumBit_
std::vector< std::string > eleHLTFilterNames_
std::vector< std::string > egHLTFiltersToMon_
void getActiveFilters(const HLTConfigProvider &hltConfig, std::vector< std::string > &activeFilters, std::vector< std::string > &activeEleFilters, std::vector< std::string > &activeEle2LegFilters, std::vector< std::string > &activePhoFilters, std::vector< std::string > &activePho2LegFilters)
std::vector< std::string > phoHLTFilterNames_
void getEgHLTFiltersToMon_(std::vector< std::string > &filterNames) const
void filterInactiveTriggers(std::vector< std::string > &namesToFilter, std::vector< std::string > &activeFilters)
void translateFiltersToPathNames(const HLTConfigProvider &hltConfig, const std::vector< std::string > &filters, std::vector< std::string > &paths)

◆ endJob()

void EgHLTOfflineSummaryClient::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 62 of file EgHLTOfflineSummaryClient.cc.

References runClient_(), and runClientEndJob_.

◆ endLuminosityBlock()

void EgHLTOfflineSummaryClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
override

◆ endRun()

void EgHLTOfflineSummaryClient::endRun ( const edm::Run run,
const edm::EventSetup c 
)
override

◆ fillQTestData_()

void EgHLTOfflineSummaryClient::fillQTestData_ ( const edm::ParameterSet iConfig,
std::vector< SumHistBinData > &  qTests,
const std::string &  label 
)
staticprivate

Definition at line 252 of file EgHLTOfflineSummaryClient.cc.

References edm::ParameterSet::getParameter(), label, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EgHLTOfflineSummaryClient().

254  {
255  std::vector<edm::ParameterSet> qTestPara = iConfig.getParameter<std::vector<edm::ParameterSet> >(label);
256  qTests.resize(qTestPara.size());
257  for (size_t testNr = 0; testNr < qTestPara.size(); testNr++) {
258  qTests[testNr].name = qTestPara[testNr].getParameter<std::string>("name");
259  qTests[testNr].qTestPatterns = qTestPara[testNr].getParameter<std::vector<std::string> >("qTestsToCheck");
260  }
261 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
char const * label

◆ getEgHLTFiltersToMon_()

void EgHLTOfflineSummaryClient::getEgHLTFiltersToMon_ ( std::vector< std::string > &  filterNames) const
private

Definition at line 209 of file EgHLTOfflineSummaryClient.cc.

References eleHLTFilterNames_, phoHLTFilterNames_, and edm::swap().

Referenced by beginRun().

209  {
210  std::set<std::string> filterNameSet;
211  for (auto const& eleHLTFilterName : eleHLTFilterNames_)
212  filterNameSet.insert(eleHLTFilterName);
213  for (auto const& phoHLTFilterName : phoHLTFilterNames_)
214  filterNameSet.insert(phoHLTFilterName);
215 
216  //right all the triggers are inserted once and only once in the set, convert to vector
217  //very lazy, create a new vector so can use the constructor and then use swap to transfer
218  std::vector<std::string>(filterNameSet.begin(), filterNameSet.end()).swap(filterNames);
219 }
std::vector< std::string > eleHLTFilterNames_
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
std::vector< std::string > phoHLTFilterNames_

◆ getEgHLTSumHist_()

EgHLTOfflineSummaryClient::MonitorElement * EgHLTOfflineSummaryClient::getEgHLTSumHist_ ( )
private

Definition at line 166 of file EgHLTOfflineSummaryClient.cc.

References dqm::implementation::IBooker::book2D(), dbe_, dirName_, egHLTFiltersToMon_, egHLTFiltersToMonPaths_, egHLTSumHistName_, egHLTSumHistXBins_, dqm::implementation::IGetter::get(), compareTotals::hist, Skims_PA_cff::name, dqm::implementation::DQMStore::setCurrentFolder(), and usePathNames_.

Referenced by runClient_().

166  {
167  MonitorElement* egHLTSumHist = dbe_->get(dirName_ + "/" + egHLTSumHistName_);
168  if (egHLTSumHist == nullptr) {
169  auto* hist = new TH2F(egHLTSumHistName_.c_str(),
170  "E/g HLT Offline Summary",
171  egHLTSumHistXBins_.size(),
172  0.,
173  1.,
174  egHLTFiltersToMon_.size(),
175  0.,
176  1.);
177  for (size_t xBinNr = 0; xBinNr < egHLTSumHistXBins_.size(); xBinNr++) {
178  hist->GetXaxis()->SetBinLabel(xBinNr + 1, egHLTSumHistXBins_[xBinNr].name.c_str());
179  }
180 
181  for (size_t yBinNr = 0; yBinNr < egHLTFiltersToMon_.size(); yBinNr++) {
182  if (usePathNames_ && egHLTFiltersToMonPaths_.size() == egHLTFiltersToMon_.size()) {
183  hist->GetYaxis()->SetBinLabel(yBinNr + 1, egHLTFiltersToMonPaths_[yBinNr].c_str());
184  } else {
185  hist->GetYaxis()->SetBinLabel(yBinNr + 1, egHLTFiltersToMon_[yBinNr].c_str());
186  }
187  }
188  for (size_t xBinNr = 0; xBinNr < egHLTSumHistXBins_.size(); xBinNr++) {
189  for (size_t yBinNr = 0; yBinNr < egHLTFiltersToMon_.size(); yBinNr++) {
190  hist->SetBinContent(xBinNr + 1, yBinNr + 1, -2);
191  }
192  }
193 
195  egHLTSumHist = dbe_->book2D(egHLTSumHistName_, hist);
196  }
197  return egHLTSumHist;
198 }
std::vector< std::string > egHLTFiltersToMonPaths_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::vector< SumHistBinData > egHLTSumHistXBins_
std::vector< std::string > egHLTFiltersToMon_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712

◆ getQTestBinData_()

int EgHLTOfflineSummaryClient::getQTestBinData_ ( const edm::ParameterSet )
private

◆ getQTestResults_()

int EgHLTOfflineSummaryClient::getQTestResults_ ( const std::string &  filterName,
const std::vector< std::string > &  pattern 
) const
private

Definition at line 223 of file EgHLTOfflineSummaryClient.cc.

References dbe_, dirName_, pdwgDoubleElectron_cfi::filterName, dqm::implementation::IGetter::getAllContents(), match(), Skims_PA_cff::name, and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by runClient_().

224  {
225  int nrFail = 0;
226  int nrQTests = 0;
227  for (auto const& pattern : patterns) {
228  auto filterpattern = filterName + pattern;
229  std::vector<MonitorElement*> monElems = dbe_->getAllContents(dirName_);
230  // std::cout <<"mon elem "<<dirName_+"/"+filterName+patterns[patternNr]<<"nr monElems "<<monElems.size()<<std::endl;
231  for (auto& monElem : monElems) {
232  const auto& name = monElem->getName();
233  int match = fnmatch(filterpattern.c_str(), name.c_str(), 0);
234  if (match == FNM_NOMATCH)
235  continue;
236 
237  std::vector<QReport*> qTests = monElem->getQReports();
238  nrQTests += qTests.size();
239  // std::cout <<monElems[monElemNr]->getName()<<" "<<monElems[monElemNr]->hasError()<<" nr test "<<qTests.size()<<std::endl;
240  if (monElem->hasError())
241  nrFail++;
242  }
243  }
244  if (nrQTests == 0)
245  return -1;
246  else if (nrFail == 0)
247  return 1;
248  else
249  return 0;
250 }
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
Definition: DQMStore.cc:641
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ operator=()

EgHLTOfflineSummaryClient& EgHLTOfflineSummaryClient::operator= ( const EgHLTOfflineSummaryClient rhs)
inlineprivate

Definition at line 71 of file EgHLTOfflineSummaryClient.h.

71 { return *this; }

◆ runClient_()

void EgHLTOfflineSummaryClient::runClient_ ( )
private

Definition at line 108 of file EgHLTOfflineSummaryClient.cc.

References dqm::implementation::IBooker::bookFloat(), dbe_, egHLTFiltersToMon_, egHLTSumHistXBins_, eleHLTFilterNamesForSumBit_, eleQTestsForSumBit_, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), getEgHLTSumHist_(), getQTestResults_(), phoHLTFilterNamesForSumBit_, phoQTestsForSumBit_, dqm::impl::MonitorElement::setBinContent(), and dqm::implementation::DQMStore::setCurrentFolder().

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

108  {
109  MonitorElement* egHLTSumME = getEgHLTSumHist_();
110 
111  for (size_t filterNr = 0; filterNr < egHLTFiltersToMon_.size(); filterNr++) {
112  for (size_t xBinNr = 0; xBinNr < egHLTSumHistXBins_.size(); xBinNr++) {
113  //egHLTSumHist->setBinContent(xBinNr+1,filterNr+1,(*egHLTSumHistXBins_[xBinNr].second)(egHLTFiltersToMon_[filterNr].c_str()));
114  egHLTSumME->setBinContent(
115  xBinNr + 1,
116  filterNr + 1,
117  getQTestResults_(egHLTFiltersToMon_[filterNr], egHLTSumHistXBins_[xBinNr].qTestPatterns));
118  }
119  }
120 
121  MonitorElement* hltEleSumBit = dbe_->get("HLT/EventInfo/reportSummaryContents/HLT_Electron");
122  MonitorElement* hltPhoSumBit = dbe_->get("HLT/EventInfo/reportSummaryContents/HLT_Photon");
123  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents/");
124  if (hltEleSumBit == nullptr)
125  hltEleSumBit = dbe_->bookFloat("HLT_Electron");
126  if (hltPhoSumBit == nullptr)
127  hltPhoSumBit = dbe_->bookFloat("HLT_Photon");
128 
129  float eleSumBit = 1.;
130  for (size_t filterNr = 0; filterNr < eleHLTFilterNamesForSumBit_.size() && eleSumBit == 1;
131  filterNr++) { //breaks as soon as a test fails
132  for (size_t testNr = 0; testNr < eleQTestsForSumBit_.size() && eleSumBit == 1; testNr++) {
133  if (getQTestResults_(eleHLTFilterNamesForSumBit_[filterNr], eleQTestsForSumBit_[testNr].qTestPatterns) == 0)
134  eleSumBit = 0;
135  }
136  }
137  hltEleSumBit->Fill(eleSumBit);
138 
139  float phoSumBit = 1.;
140  for (size_t filterNr = 0; filterNr < phoHLTFilterNamesForSumBit_.size() && phoSumBit == 1;
141  filterNr++) { //breaks as soon as a test fails
142  for (size_t testNr = 0; testNr < phoQTestsForSumBit_.size() && phoSumBit == 1; testNr++) {
143  if (getQTestResults_(phoHLTFilterNamesForSumBit_[filterNr], phoQTestsForSumBit_[testNr].qTestPatterns) == 0)
144  phoSumBit = 0;
145  }
146  }
147  hltPhoSumBit->Fill(phoSumBit);
148 }
std::vector< std::string > phoHLTFilterNamesForSumBit_
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
std::vector< std::string > eleHLTFilterNamesForSumBit_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::vector< SumHistBinData > egHLTSumHistXBins_
std::vector< SumHistBinData > eleQTestsForSumBit_
std::vector< std::string > egHLTFiltersToMon_
int getQTestResults_(const std::string &filterName, const std::vector< std::string > &pattern) const
void Fill(long long x)
std::vector< SumHistBinData > phoQTestsForSumBit_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712

◆ splitStringsToPairs_()

void EgHLTOfflineSummaryClient::splitStringsToPairs_ ( const std::vector< std::string > &  stringsToSplit,
std::vector< std::pair< std::string, std::string > > &  splitStrings 
)
private

Definition at line 149 of file EgHLTOfflineSummaryClient.cc.

References submitPVValidationJobs::split(), and AlCaHLTBitMon_QueryRunRegistry::string.

150  {
151  splitStrings.clear();
152  splitStrings.reserve(stringsToSplit.size());
153  for (auto const& stringNr : stringsToSplit) {
154  std::vector<std::string> tempSplitStrings;
155  boost::split(tempSplitStrings, stringNr, boost::is_any_of(std::string(":")));
156  if (tempSplitStrings.size() == 2) {
157  splitStrings.push_back(std::make_pair(tempSplitStrings[0], tempSplitStrings[1]));
158  } else {
159  edm::LogWarning("EgHLTOfflineSummaryClient")
160  << " Error : entry " << stringNr
161  << " is not of form A:B, ignoring (ie this quailty test isnt being included in the sumamry hist) ";
162  }
163  }
164 }
Log< level::Warning, false > LogWarning

Member Data Documentation

◆ dbe_

DQMStore* EgHLTOfflineSummaryClient::dbe_
private

◆ dirName_

std::string EgHLTOfflineSummaryClient::dirName_
private

◆ egHLTFiltersToMon_

std::vector<std::string> EgHLTOfflineSummaryClient::egHLTFiltersToMon_
private

Definition at line 48 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), getEgHLTSumHist_(), and runClient_().

◆ egHLTFiltersToMonPaths_

std::vector<std::string> EgHLTOfflineSummaryClient::egHLTFiltersToMonPaths_
private

Definition at line 62 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), and getEgHLTSumHist_().

◆ egHLTSumHistName_

std::string EgHLTOfflineSummaryClient::egHLTSumHistName_
private

Definition at line 44 of file EgHLTOfflineSummaryClient.h.

Referenced by getEgHLTSumHist_().

◆ egHLTSumHistXBins_

std::vector<SumHistBinData> EgHLTOfflineSummaryClient::egHLTSumHistXBins_
private

◆ eleHLTFilterNames_

std::vector<std::string> EgHLTOfflineSummaryClient::eleHLTFilterNames_
private

◆ eleHLTFilterNamesForSumBit_

std::vector<std::string> EgHLTOfflineSummaryClient::eleHLTFilterNamesForSumBit_
private

Definition at line 50 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), EgHLTOfflineSummaryClient(), and runClient_().

◆ eleQTestsForSumBit_

std::vector<SumHistBinData> EgHLTOfflineSummaryClient::eleQTestsForSumBit_
private

Definition at line 55 of file EgHLTOfflineSummaryClient.h.

Referenced by EgHLTOfflineSummaryClient(), and runClient_().

◆ filterInactiveTriggers_

bool EgHLTOfflineSummaryClient::filterInactiveTriggers_
private

Definition at line 65 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), and EgHLTOfflineSummaryClient().

◆ hltTag_

std::string EgHLTOfflineSummaryClient::hltTag_
private

Definition at line 67 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), and EgHLTOfflineSummaryClient().

◆ isSetup_

bool EgHLTOfflineSummaryClient::isSetup_
private

Definition at line 66 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun().

◆ phoHLTFilterNames_

std::vector<std::string> EgHLTOfflineSummaryClient::phoHLTFilterNames_
private

◆ phoHLTFilterNamesForSumBit_

std::vector<std::string> EgHLTOfflineSummaryClient::phoHLTFilterNamesForSumBit_
private

Definition at line 51 of file EgHLTOfflineSummaryClient.h.

Referenced by beginRun(), EgHLTOfflineSummaryClient(), and runClient_().

◆ phoQTestsForSumBit_

std::vector<SumHistBinData> EgHLTOfflineSummaryClient::phoQTestsForSumBit_
private

Definition at line 56 of file EgHLTOfflineSummaryClient.h.

Referenced by EgHLTOfflineSummaryClient(), and runClient_().

◆ runClientEndJob_

bool EgHLTOfflineSummaryClient::runClientEndJob_
private

Definition at line 60 of file EgHLTOfflineSummaryClient.h.

Referenced by EgHLTOfflineSummaryClient(), and endJob().

◆ runClientEndLumiBlock_

bool EgHLTOfflineSummaryClient::runClientEndLumiBlock_
private

Definition at line 58 of file EgHLTOfflineSummaryClient.h.

Referenced by EgHLTOfflineSummaryClient(), and endLuminosityBlock().

◆ runClientEndRun_

bool EgHLTOfflineSummaryClient::runClientEndRun_
private

Definition at line 59 of file EgHLTOfflineSummaryClient.h.

Referenced by EgHLTOfflineSummaryClient(), and endRun().

◆ usePathNames_

bool EgHLTOfflineSummaryClient::usePathNames_
private