14 #include <boost/algorithm/string.hpp> 18 : egHLTSumHistName_(
"egHLTTrigSum"), isSetup_(
false) {
19 usesResource(
"DQMStore");
25 <<
"unable to get DQMStore service, no summary histograms will be produced";
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;
80 hltConfig, activeFilters, activeEleFilters, activeEle2LegFilters, activePhoFilters, activePho2LegFilters);
124 if (hltEleSumBit ==
nullptr)
126 if (hltPhoSumBit ==
nullptr)
129 float eleSumBit = 1.;
137 hltEleSumBit->
Fill(eleSumBit);
139 float phoSumBit = 1.;
147 hltPhoSumBit->
Fill(phoSumBit);
150 std::vector<std::pair<std::string, std::string> >& splitStrings) {
151 splitStrings.clear();
152 splitStrings.reserve(stringsToSplit.size());
153 for (
auto const& stringNr : stringsToSplit) {
154 std::vector<std::string> tempSplitStrings;
156 if (tempSplitStrings.size() == 2) {
157 splitStrings.push_back(std::make_pair(tempSplitStrings[0], tempSplitStrings[1]));
160 <<
" Error : entry " << stringNr
161 <<
" is not of form A:B, ignoring (ie this quailty test isnt being included in the sumamry hist) ";
168 if (egHLTSumHist ==
nullptr) {
170 "E/g HLT Offline Summary",
190 hist->SetBinContent(xBinNr + 1, yBinNr + 1, -2);
210 std::set<std::string> filterNameSet;
212 filterNameSet.insert(eleHLTFilterName);
214 filterNameSet.insert(phoHLTFilterName);
218 std::vector<std::string>(filterNameSet.begin(), filterNameSet.end()).
swap(filterNames);
224 const std::vector<std::string>& patterns)
const {
227 for (
auto const&
pattern : patterns) {
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)
237 std::vector<QReport*> qTests = monElem->getQReports();
238 nrQTests += qTests.size();
240 if (monElem->hasError())
246 else if (nrFail == 0)
253 std::vector<SumHistBinData>& qTests,
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");
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
#define DEFINE_FWK_MODULE(type)
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)