22 #include <boost/regex.hpp>
27 return &dummyHLTConfigData;
46 LogInfo(
"HLTConfigData") <<
"Called (R) with processName '"
48 <<
"' for " << iRun.
id() << endl;
75 if ((processPSet!=0) && (processPSet->
exists(
"hltTriggerSummaryAOD"))) {
80 LogInfo(
"HLTConfigData") <<
"Auto-discovered processName: '"
85 LogError(
"HLTConfigData") <<
"Auto-discovery of processName failed!"
99 <<
" times in history!" << endl;
114 LogError(
"HLTConfigProvider") <<
"Falling back to ProcessName-only init using ProcessName '"<<
processName_<<
"' !";
134 edm::LogError(
"HLTConfigProvider") <<
"ProcessPSet found is empty!";
149 edm::LogError(
"HLTConfigProvider") <<
"ProcessPSet not found in regsistry!";
170 unsigned int nPSets(0);
175 if (
i->second.exists(
"@process_name")) {
176 const std::string pName(
i->second.getParameter<
string>(
"@process_name"));
178 if ( pName == processName ) {
183 }
else if ( 0 != (pset = registry_->
getMapped(psetID))) {
184 if (pset->exists(
"HLTConfigVersion")) {
185 const ParameterSet& HLTPSet(pset->getParameterSet(
"HLTConfigVersion"));
186 if (HLTPSet.exists(
"tableName")) {
187 hNames += HLTPSet.
getParameter<
string>(
"tableName")+
" ";
195 LogVerbatim(
"HLTConfigProvider") <<
"Unordered list of all process names found: "
196 << pNames <<
"." << endl;
198 LogVerbatim(
"HLTConfigProvider") <<
"HLT TableName of each selected process: "
199 << hNames <<
"." << endl;
202 LogError(
"HLTConfigProvider") <<
" Process name '"
204 <<
"' not found in registry!" << endl;
209 LogError(
"HLTConfigProvider") <<
" Process name '"
211 <<
"' found but ParameterSetID invalid!"
217 LogError(
"HLTConfigProvider") <<
" Process name '"
219 <<
" found " << nPSets
220 <<
" times in registry!" << endl;
246 std::vector<std::string>
matched;
248 const unsigned int n(inputs.size());
249 for (
unsigned int i=0;
i<
n; ++
i) {
251 if (boost::regex_match(input,regexp)) matched.push_back(input);
257 const boost::regex regexp(
"_v[0-9]+$");
258 return boost::regex_replace(trigger,regexp,
"");
262 return matched(inputs,trigger+
"_v[0-9]+$");
collection_type::const_iterator const_iterator
T getParameter(std::string const &) const
const_iterator begin() const
map_type::const_iterator const_iterator
static const std::vector< std::string > matched(const std::vector< std::string > &inputs, const std::string &pattern)
regexp processing
bool insertMapped(value_type const &v)
const_iterator end() const
static PFTauRenderPlugin instance
void getDataFrom(const edm::ParameterSetID &iID)
ParameterSetID id() const
std::string glob2reg(std::string const &pattern)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
static const HLTConfigData * s_dummyHLTConfigData()
const std::string & tableName() const
HLT ConfDB table name.
std::string processName_
data members
static const std::string removeVersion(const std::string &trigger)
static std::string const input
static ThreadSafeRegistry * instance()
const HLTConfigData * hltConfigData_
bool getConfigurationForProcess(std::string const &name, ProcessConfiguration &config) const
const edm::ParameterSet & processPSet() const
ParameterSet of process.
bool getMapped(key_type const &k, value_type &result) const
const_iterator begin() const
ProcessHistory const & processHistory() const
bool getMapped(key_type const &k, value_type &result) const
Hash< ParameterSetType > ParameterSetID
HLTConfigProvider()
c'tor
const std::string & processName() const
process name
static const std::vector< std::string > restoreVersion(const std::vector< std::string > &inputs, const std::string &trigger)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const_iterator end() const
volatile std::atomic< bool > shutdown_flag false
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
static Registry * instance()