21 triggerResultsTag_(
"TriggerResults::HLT"),
23 l1GtTriggerMenuLiteTag_(
"l1GtTriggerMenuLite"),
26 if (
config.exists(
"prescaleWeightVerbosityLevel"))
28 if (
config.exists(
"prescaleWeightTriggerResults"))
30 if (
config.exists(
"prescaleWeightL1GtTriggerMenuLite"))
32 if (
config.exists(
"prescaleWeightHltPaths"))
33 hltPaths_ =
config.getParameter<std::vector<std::string> >(
"prescaleWeightHltPaths");
39 edm::LogWarning(
"PrescaleWeightProvider") <<
"Process name not configured via TriggerResults InputTag";
43 edm::LogWarning(
"PrescaleWeightProvider") <<
"TriggerResults label not configured";
47 edm::LogWarning(
"PrescaleWeightProvider") <<
"L1GtTriggerMenuLite label not configured";
51 edm::LogError(
"PrescaleWeightProvider") <<
"HLT paths of interest not configured";
65 edm::LogWarning(
"PrescaleWeightProvider") <<
"Run initialisation failed due to failing configuration";
70 bool hltChanged(
false);
78 edm::LogError(
"PrescaleWeightProvider") <<
"HLT config size error";
80 }
else if (hltChanged) {
82 edm::LogInfo(
"PrescaleWeightProvider") <<
"HLT configuration changed";
98 std::stringstream
ss(l1Seeds);
101 while (
ss.good() && !
ss.eof()) {
103 if (
buf[0] ==
'(' ||
buf[
buf.size() - 1] ==
')' ||
buf ==
"AND" ||
buf ==
"NOT") {
106 edm::LogWarning(
"PrescaleWeightProvider::parseL1Seeds") <<
"Only supported logical expression is OR";
108 }
else if (
buf ==
"OR")
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
PrescaleWeightProvider(const edm::ParameterSet &config, edm::ConsumesCollector &&iC, T &module)
edm::Handle< L1GtTriggerMenuLite > triggerMenuLite_
edm::InputTag triggerResultsTag_
Log< level::Error, false > LogError
std::vector< std::string > l1SeedPaths_
std::vector< std::string > hltPaths_
std::unique_ptr< HLTPrescaleProvider > hltPrescaleProvider_
void initRun(const edm::Run &run, const edm::EventSetup &setup)
edm::EDGetTokenT< L1GtTriggerMenuLite > l1GtTriggerMenuLiteToken_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Log< level::Warning, false > LogWarning
edm::InputTag l1GtTriggerMenuLiteTag_
void parseL1Seeds(const std::string &l1Seeds)