14 #include <boost/algorithm/string.hpp> 18 : egHLTSumHistName_(
"egHLTTrigSum"), isSetup_(
false) {
24 <<
"unable to get DQMStore service, no summary histograms will be produced";
72 std::vector<std::string> activeFilters;
73 std::vector<std::string> activeEleFilters;
74 std::vector<std::string> activeEle2LegFilters;
75 std::vector<std::string> activePhoFilters;
76 std::vector<std::string> activePho2LegFilters;
79 hltConfig, activeFilters, activeEleFilters, activeEle2LegFilters, activePhoFilters, activePho2LegFilters);
123 if (hltEleSumBit ==
nullptr)
125 if (hltPhoSumBit ==
nullptr)
128 float eleSumBit = 1.;
136 hltEleSumBit->
Fill(eleSumBit);
138 float phoSumBit = 1.;
146 hltPhoSumBit->
Fill(phoSumBit);
149 std::vector<std::pair<std::string, std::string> >& splitStrings) {
150 splitStrings.clear();
151 splitStrings.reserve(stringsToSplit.size());
152 for (
auto const& stringNr : stringsToSplit) {
153 std::vector<std::string> tempSplitStrings;
155 if (tempSplitStrings.size() == 2) {
156 splitStrings.push_back(std::make_pair(tempSplitStrings[0], tempSplitStrings[1]));
159 <<
" Error : entry " << stringNr
160 <<
" is not of form A:B, ignoring (ie this quailty test isnt being included in the sumamry hist) ";
167 if (egHLTSumHist ==
nullptr) {
169 "E/g HLT Offline Summary",
189 hist->SetBinContent(xBinNr + 1, yBinNr + 1, -2);
209 std::set<std::string> filterNameSet;
211 filterNameSet.insert(eleHLTFilterName);
213 filterNameSet.insert(phoHLTFilterName);
217 std::vector<std::string>(filterNameSet.begin(), filterNameSet.end()).
swap(filterNames);
223 const std::vector<std::string>& patterns)
const {
226 for (
auto const&
pattern : patterns) {
230 for (
auto& monElem : monElems) {
231 const auto&
name = monElem->getName();
232 int match = fnmatch(filterpattern.c_str(),
name.c_str(), 0);
233 if (
match == FNM_NOMATCH)
236 std::vector<QReport*> qTests = monElem->getQReports();
237 nrQTests += qTests.size();
239 if (monElem->hasError())
245 else if (nrFail == 0)
252 std::vector<SumHistBinData>& qTests,
254 std::vector<edm::ParameterSet> qTestPara = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
label);
255 qTests.resize(qTestPara.size());
256 for (
size_t testNr = 0; testNr < qTestPara.size(); testNr++) {
257 qTests[testNr].name = qTestPara[testNr].getParameter<
std::string>(
"name");
258 qTests[testNr].qTestPatterns = qTestPara[testNr].getParameter<std::vector<std::string> >(
"qTestsToCheck");
std::vector< std::string > phoHLTFilterNamesForSumBit_
T getParameter(std::string const &) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
void splitStringsToPairs_(const std::vector< std::string > &stringsToSplit, std::vector< std::pair< std::string, std::string > > &splitStrings)
std::vector< std::string > egHLTFiltersToMonPaths_
std::vector< std::string > eleHLTFilterNamesForSumBit_
std::string egHLTSumHistName_
void setCurrentFolder(std::string const &fullpath) override
std::vector< SumHistBinData > egHLTSumHistXBins_
std::vector< std::string > eleHLTFilterNames_
std::vector< SumHistBinData > eleQTestsForSumBit_
std::vector< std::string > egHLTFiltersToMon_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
Log< level::Error, false > LogError
int getQTestResults_(const std::string &filterName, const std::vector< std::string > &pattern) const
void swap(Association< C > &lhs, Association< C > &rhs)
void endRun(const edm::Run &run, const edm::EventSetup &c) override
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
~EgHLTOfflineSummaryClient() override
bool filterInactiveTriggers_
std::vector< SumHistBinData > phoQTestsForSumBit_
def split(sequence, size)
MonitorElement * getEgHLTSumHist_()
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
std::vector< std::string > phoHLTFilterNames_
void getEgHLTFiltersToMon_(std::vector< std::string > &filterNames) const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
EgHLTOfflineSummaryClient(const EgHLTOfflineSummaryClient &rhs)
bool runClientEndLumiBlock_
Log< level::Warning, false > LogWarning
static void fillQTestData_(const edm::ParameterSet &iConfig, std::vector< SumHistBinData > &qTests, const std::string &label)