CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HLTConfigProvider Class Reference

#include <HLTConfigProvider.h>

Public Member Functions

const bool changed () const
 changed? More...
 
const std::vector< std::string > & datasetContent (unsigned int dataset) const
 names of trigger paths in dataset with index i More...
 
const std::vector< std::string > & datasetContent (const std::string &dataset) const
 names of trigger paths in dataset with name More...
 
const std::vector< std::vector
< std::string > > & 
datasetContents () const
 names of trigger paths for all datasets More...
 
unsigned int datasetIndex (const std::string &dataset) const
 index of dataset with name More...
 
const std::string & datasetName (unsigned int dataset) const
 name of dataset with index i More...
 
const std::vector< std::string > & datasetNames () const
 
void dump (const std::string &what) const
 Dumping config info to cout. More...
 
 HLTConfigProvider ()
 c'tor More...
 
const std::vector< std::vector
< std::pair< bool, std::string > > > & 
hltL1GTSeeds () const
 
const std::vector< std::pair
< bool, std::string > > & 
hltL1GTSeeds (const std::string &trigger) const
 HLTLevel1GTSeed modules for trigger path with name. More...
 
const std::vector< std::pair
< bool, std::string > > & 
hltL1GTSeeds (unsigned int trigger) const
 HLTLevel1GTSeed modules for trigger path with index i. More...
 
bool init (const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
 
const bool inited () const
 initialised? More...
 
const std::string moduleEDMType (const std::string &module) const
 C++ base class name of module. More...
 
unsigned int moduleIndex (unsigned int trigger, const std::string &module) const
 slot position of module on trigger path (0 to size-1) More...
 
unsigned int moduleIndex (const std::string &trigger, const std::string &module) const
 
const std::string & moduleLabel (unsigned int trigger, unsigned int module) const
 
const std::string & moduleLabel (const std::string &trigger, unsigned int module) const
 
const std::vector< std::string > & moduleLabels (unsigned int trigger) const
 label(s) of module(s) on a trigger path More...
 
const std::vector< std::string > & moduleLabels (const std::string &trigger) const
 
const edm::ParameterSetmodulePSet (const std::string &module) const
 ParameterSet of module. More...
 
const std::string moduleType (const std::string &module) const
 C++ class name of module. More...
 
const std::vector< std::string > & prescaleLabels () const
 low-level data member access More...
 
int prescaleSet (const edm::Event &iEvent, const edm::EventSetup &iSetup) const
 
unsigned int prescaleSize () const
 
const std::map< std::string,
std::vector< unsigned int > > & 
prescaleTable () const
 
unsigned int prescaleValue (unsigned int set, const std::string &trigger) const
 HLT prescale value in specific prescale set for a specific trigger path. More...
 
unsigned int prescaleValue (const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
 combining the two methods above More...
 
std::pair< int, int > prescaleValues (const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
 Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path. More...
 
const std::string & processName () const
 Accessors (const methods) More...
 
const edm::ParameterSetprocessPSet () const
 ParameterSet of process. More...
 
const bool saveTags (const std::string &module) const
 Is module an L3 filter (ie, tracked saveTags=true) More...
 
const std::vector< std::string > & saveTagsModules (unsigned int trigger) const
 
const std::vector< std::string > & saveTagsModules (const std::string &trigger) const
 
unsigned int size () const
 number of trigger paths in trigger table More...
 
unsigned int size (unsigned int trigger) const
 number of modules on a specific trigger path More...
 
unsigned int size (const std::string &trigger) const
 
const std::vector< std::string > & streamContent (unsigned int stream) const
 names of datasets in stream with index i More...
 
const std::vector< std::string > & streamContent (const std::string &stream) const
 names of datasets in stream with name More...
 
const std::vector< std::vector
< std::string > > & 
streamContents () const
 names of datasets for all streams More...
 
unsigned int streamIndex (const std::string &stream) const
 index of stream with name More...
 
const std::string & streamName (unsigned int stream) const
 name of stream with index i More...
 
const std::vector< std::string > & streamNames () const
 
const std::string & tableName () const
 HLT ConfDB table name. More...
 
unsigned int triggerIndex (const std::string &triggerName) const
 slot position of trigger path in trigger table (0 to size-1) More...
 
const std::string & triggerName (unsigned int triggerIndex) const
 
const std::vector< std::string > & triggerNames () const
 names of trigger paths More...
 

Static Public Member Functions

static const std::vector
< std::string > 
matched (const std::vector< std::string > &inputs, const std::string &pattern)
 regexp processing More...
 
static const std::string removeVersion (const std::string &trigger)
 
static const std::vector
< std::string > 
restoreVersion (const std::vector< std::string > &inputs, const std::string &trigger)
 

Private Member Functions

void clear ()
 
void getDataFrom (const edm::ParameterSetID &iID)
 
void init (const edm::ProcessHistory &iHistory, const std::string &processName)
 
void init (const std::string &processName)
 

Private Attributes

bool changed_
 
const HLTConfigDatahltConfigData_
 
bool inited_
 
boost::shared_ptr< L1GtUtilsl1GtUtils_
 
std::string processName_
 data members More...
 

Detailed Description

This class provides access routines to get hold of the HLT Configuration

Date:
2011/05/28 13:30:42
Revision:
1.41
Author
Martin Grunewald

See header file for documentation

Date:
2011/05/28 13:31:22
Revision:
1.63
Author
Martin Grunewald

Definition at line 34 of file HLTConfigProvider.h.

Constructor & Destructor Documentation

HLTConfigProvider::HLTConfigProvider ( )

c'tor

Definition at line 33 of file HLTConfigProvider.cc.

33  :
34  processName_(""),
35  inited_(false),
36  changed_(true),
38  l1GtUtils_(new L1GtUtils())
39 {
40 }
static const HLTConfigData * s_dummyHLTConfigData()
std::string processName_
data members
const HLTConfigData * hltConfigData_
boost::shared_ptr< L1GtUtils > l1GtUtils_

Member Function Documentation

const bool HLTConfigProvider::changed ( ) const
inline

changed?

Definition at line 63 of file HLTConfigProvider.h.

References changed_.

Referenced by EmDQMFeeder::beginRun().

63  {
64  return changed_;
65  }
void HLTConfigProvider::clear ( void  )
private

Definition at line 242 of file HLTConfigProvider.cc.

References changed_, hltConfigData_, inited_, l1GtUtils_, processName_, and s_dummyHLTConfigData().

Referenced by python.Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), getDataFrom(), init(), python.Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), and python.Vispa.Views.BoxDecayView.BoxDecayView::updateContent().

243 {
244  // clear all data members
245 
246  processName_ = "";
247  inited_ = false;
248  changed_ = true;
250  *l1GtUtils_ = L1GtUtils();
251 
252  return;
253 }
static const HLTConfigData * s_dummyHLTConfigData()
std::string processName_
data members
const HLTConfigData * hltConfigData_
boost::shared_ptr< L1GtUtils > l1GtUtils_
const std::vector<std::string>& HLTConfigProvider::datasetContent ( unsigned int  dataset) const
inline

names of trigger paths in dataset with index i

Definition at line 211 of file HLTConfigProvider.h.

References HLTConfigData::datasetContent(), and hltConfigData_.

Referenced by HLTScalers::beginRun(), FourVectorHLTOnline::beginRun(), TrigResRateMon::beginRun(), and FourVectorHLTOffline::beginRun().

211  {
213  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
const std::vector<std::string>& HLTConfigProvider::datasetContent ( const std::string &  dataset) const
inline

names of trigger paths in dataset with name

Definition at line 215 of file HLTConfigProvider.h.

References HLTConfigData::datasetContent(), and hltConfigData_.

215  {
217  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
const std::vector<std::vector<std::string> >& HLTConfigProvider::datasetContents ( ) const
inline

names of trigger paths for all datasets

Definition at line 207 of file HLTConfigProvider.h.

References HLTConfigData::datasetContents(), and hltConfigData_.

Referenced by HLTrigReport::reset().

207  {
209  }
const HLTConfigData * hltConfigData_
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
unsigned int HLTConfigProvider::datasetIndex ( const std::string &  dataset) const
inline

index of dataset with name

Definition at line 203 of file HLTConfigProvider.h.

References HLTConfigData::datasetIndex(), and hltConfigData_.

203  {
205  }
const HLTConfigData * hltConfigData_
unsigned int datasetIndex(const std::string &dataset) const
index of dataset with name
const std::string& HLTConfigProvider::datasetName ( unsigned int  dataset) const
inline

name of dataset with index i

Definition at line 199 of file HLTConfigProvider.h.

References HLTConfigData::datasetName(), and hltConfigData_.

199  {
201  }
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
const HLTConfigData * hltConfigData_
const std::vector<std::string>& HLTConfigProvider::datasetNames ( ) const
inline

Datasets list of names of all datasets

Definition at line 195 of file HLTConfigProvider.h.

References HLTConfigData::datasetNames(), and hltConfigData_.

Referenced by FourVectorHLTOnline::beginRun(), FourVectorHLTOffline::beginRun(), and HLTrigReport::reset().

195  {
196  return hltConfigData_->datasetNames();
197  }
const std::vector< std::string > & datasetNames() const
Datasets.
const HLTConfigData * hltConfigData_
void HLTConfigProvider::dump ( const std::string &  what) const
inline

Dumping config info to cout.

Definition at line 48 of file HLTConfigProvider.h.

References HLTConfigData::dump(), and hltConfigData_.

Referenced by HLTEventAnalyzerAOD::beginRun(), HLTEventAnalyzerRAW::beginRun(), TriggerValidator::beginRun(), and prescaleValues().

48  {
49  hltConfigData_->dump(what);
50  }
const HLTConfigData * hltConfigData_
void dump(const std::string &what) const
Dumping config info to cout.
void HLTConfigProvider::getDataFrom ( const edm::ParameterSetID iID)
private

Definition at line 131 of file HLTConfigProvider.cc.

References changed_, clear(), edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped(), hltConfigData_, edm::ParameterSet::id(), inited_, edm::detail::ThreadSafeRegistry< KEY, T, E >::insertMapped(), edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), edm::Hash< I >::isValid(), processPSet(), and s_dummyHLTConfigData().

Referenced by init().

132 {
133  //is it in our registry?
135  const HLTConfigData* d = reg->getMapped(iID);
136  if(0 != d) {
137  changed_ = true;
138  inited_ = true;
139  hltConfigData_ = d;
140  } else {
141  const edm::ParameterSet* processPSet = 0;
142  if ( 0 != (processPSet = edm::pset::Registry::instance()->getMapped(iID))) {
143  if (not processPSet->id().isValid()) {
144  clear();
145  edm::LogError("HLTConfigProvider") << "ProcessPSet found is empty!";
146  changed_ = true;
147  inited_ = false;
149  return;
150  } else {
151  clear();
152  reg->insertMapped( HLTConfigData(processPSet));
153  changed_ = true;
154  inited_ = true;
155  hltConfigData_ = reg->getMapped(processPSet->id());
156  return;
157  }
158  } else {
159  clear();
160  edm::LogError("HLTConfigProvider") << "ProcessPSet not found in regsistry!";
161  changed_ = true;
162  inited_ = false;
164  return;
165  }
166  }
167  return;
168 }
ParameterSetID id() const
bool getMapped(key_type const &k, value_type &result) const
static const HLTConfigData * s_dummyHLTConfigData()
bool insertMapped(value_type const &v)
const HLTConfigData * hltConfigData_
const edm::ParameterSet & processPSet() const
ParameterSet of process.
bool isValid() const
Definition: Hash.h:136
static ThreadSafeRegistry * instance()
const std::vector<std::vector<std::pair<bool,std::string> > >& HLTConfigProvider::hltL1GTSeeds ( ) const
inline

HLTLevel1GTSeed module HLTLevel1GTSeed modules for all trigger paths

Definition at line 153 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

Referenced by prescaleValues(), PrescaleWeightProvider::prescaleWeight(), and pat::PATTriggerProducer::produce().

153  {
154  return hltConfigData_->hltL1GTSeeds();
155  }
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const HLTConfigData * hltConfigData_
const std::vector<std::pair<bool,std::string> >& HLTConfigProvider::hltL1GTSeeds ( const std::string &  trigger) const
inline

HLTLevel1GTSeed modules for trigger path with name.

Definition at line 157 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

157  {
158  return hltConfigData_->hltL1GTSeeds(trigger);
159  }
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const HLTConfigData * hltConfigData_
const std::vector<std::pair<bool,std::string> >& HLTConfigProvider::hltL1GTSeeds ( unsigned int  trigger) const
inline

HLTLevel1GTSeed modules for trigger path with index i.

Definition at line 161 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

161  {
162  return hltConfigData_->hltL1GTSeeds(trigger);
163  }
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const HLTConfigData * hltConfigData_
bool HLTConfigProvider::init ( const edm::Run iRun,
const edm::EventSetup iSetup,
const std::string &  processName,
bool &  changed 
)

Run-dependent initialisation (non-const method) "init" return value indicates whether intitialisation has succeeded "changed" parameter indicates whether the config has actually changed

defer iSetup access to when actually needed: l1GtUtils_->retrieveL1EventSetup(iSetup);

Definition at line 42 of file HLTConfigProvider.cc.

References changed_, edm::RunBase::id(), inited_, edm::Run::processHistory(), processName(), and processName_.

Referenced by EwkMuDQM::beginRun(), HLTEventAnalyzerAOD::beginRun(), HLTEventAnalyzerRAW::beginRun(), CandidateTriggerObjectProducer::beginRun(), HLTMonBTagIPSource::beginRun(), HLTMonBTagMuSource::beginRun(), EwkMuLumiMonitorDQM::beginRun(), TopElectronHLTOfflineSource::beginRun(), HLTMonBitSummary::beginRun(), LumiCalculator::beginRun(), HLTrigReport::beginRun(), HLTJetMETDQMSource::beginRun(), HLTMuonOfflineAnalyzer::beginRun(), pat::PATTriggerEventProducer::beginRun(), EmDQMFeeder::beginRun(), HeavyFlavorValidation::beginRun(), QcdUeDQM::beginRun(), pat::PATTriggerProducer::beginRun(), JetMETHLTOfflineSource::beginRun(), HLTMuonValidator::beginRun(), TriggerValidator::beginRun(), BTagHLTOfflineSource::beginRun(), HLTJetMETValidation::beginRun(), HLTInfo::beginRun(), EmDQMReco::beginRun(), EgHLTOfflineSummaryClient::beginRun(), EgHLTOfflineClient::beginRun(), HLTScalers::beginRun(), FourVectorHLTOnline::beginRun(), QcdLowPtDQM::beginRun(), EgHLTOfflineSource::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTriggerOffline::beginRun(), FourVectorHLTOffline::beginRun(), TrackerDpgAnalysis::beginRun(), HLTOniaSource::checkHLTConfiguration(), MuScleFit::duringLoop(), init(), PrescaleWeightProvider::initRun(), TriggerHelper::initRun(), GenericTriggerEventFlag::initRun(), and DQMProvInfo::makeHLTKeyInfo().

45  {
46 
47  using namespace std;
48  using namespace edm;
49 
50  LogInfo("HLTConfigData") << "Called (R) with processName '"
51  << processName
52  << "' for " << iRun.id() << endl;
53 
55 
58 
61  return inited_;
62 
63 }
RunID const & id() const
Definition: RunBase.h:43
const bool changed() const
changed?
std::string processName_
data members
ProcessHistory const & processHistory() const
Definition: Run.cc:100
const std::string & processName() const
Accessors (const methods)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
void HLTConfigProvider::init ( const edm::ProcessHistory iHistory,
const std::string &  processName 
)
private

Check uniqueness (uniqueness should [soon] be enforced by Fw)

Definition at line 65 of file HLTConfigProvider.cc.

References edm::ProcessHistory::begin(), changed_, clear(), edm::ProcessHistory::end(), edm::ParameterSet::exists(), edm::ProcessHistory::getConfigurationForProcess(), getDataFrom(), edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped(), hltConfigData_, HLTConfigData::id(), init(), inited_, edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), n, processName(), processName_, processPSet(), and s_dummyHLTConfigData().

65  {
66 
67  using namespace std;
68  using namespace edm;
69 
70  const ProcessHistory::const_iterator hb(iHistory.begin());
71  const ProcessHistory::const_iterator he(iHistory.end());
72 
73  ProcessConfiguration processConfiguration;
75 
77  if (processName_=="*") {
78  // auto-discovery of process name
79  for (ProcessHistory::const_iterator hi=hb; hi!=he; ++hi) {
80  if (iHistory.getConfigurationForProcess(hi->processName(),processConfiguration)) {
81  processPSet = edm::pset::Registry::instance()->getMapped(processConfiguration.parameterSetID());
82  if ((processPSet!=0) && (processPSet->exists("hltTriggerSummaryAOD"))) {
83  processName_=hi->processName();
84  }
85  }
86  }
87  LogInfo("HLTConfigData") << "Auto-discovered processName: '"
88  << processName_ << "'"
89  << endl;
90  }
91  if (processName_=="*") {
92  clear();
93  LogError("HLTConfigData") << "Auto-discovery of processName failed!"
94  << endl;
95  return;
96  }
97 
99  unsigned int n(0);
100  for (ProcessHistory::const_iterator hi=hb; hi!=he; ++hi) {
101  if (hi->processName()==processName_) {n++;}
102  }
103  if (n>1) {
104  clear();
105  LogError("HLTConfigProvider") << " ProcessName '"<< processName_
106  << " found " << n
107  << " times in history!" << endl;
108  return;
109  }
110 
112  if (iHistory.getConfigurationForProcess(processName_,processConfiguration)) {
113  if ((hltConfigData_ !=s_dummyHLTConfigData()) && (processConfiguration.parameterSetID() == hltConfigData_->id())) {
114  changed_ = false;
115  inited_ = true;
116  return;
117  } else {
118  getDataFrom(processConfiguration.parameterSetID());
119  }
120  } else {
121  LogError("HLTConfigProvider") << "Falling back to processName-only init!";
122  clear();
124  if (!inited_) {
125  LogError("HLTConfigProvider") << "ProcessName not found in history!";
126  }
127  return;
128  }
129 }
collection_type::const_iterator const_iterator
const_iterator begin() const
void getDataFrom(const edm::ParameterSetID &iID)
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool getMapped(key_type const &k, value_type &result) const
static const HLTConfigData * s_dummyHLTConfigData()
std::string processName_
data members
const HLTConfigData * hltConfigData_
bool getConfigurationForProcess(std::string const &name, ProcessConfiguration &config) const
const edm::ParameterSet & processPSet() const
ParameterSet of process.
const std::string & processName() const
Accessors (const methods)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
const_iterator end() const
static ThreadSafeRegistry * instance()
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
void HLTConfigProvider::init ( const std::string &  processName)
private

Definition at line 170 of file HLTConfigProvider.cc.

References edm::detail::ThreadSafeRegistry< KEY, T, E >::begin(), clear(), edm::detail::ThreadSafeRegistry< KEY, T, E >::end(), getDataFrom(), edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped(), edm::ParameterSet::getParameter(), hltConfigData_, i, HLTConfigData::id(), MultipleCompare::pset, s_dummyHLTConfigData(), and tableName().

171 {
172  using namespace std;
173  using namespace edm;
174 
175  // Obtain ParameterSetID for requested process (with name
176  // processName) from pset registry
177  string pNames("");
178  string hNames("");
179  const ParameterSet* pset = 0;
180  ParameterSetID psetID;
181  unsigned int nPSets(0);
182  const edm::pset::Registry * registry_(pset::Registry::instance());
183  const edm::pset::Registry::const_iterator rb(registry_->begin());
184  const edm::pset::Registry::const_iterator re(registry_->end());
185  for (edm::pset::Registry::const_iterator i = rb; i != re; ++i) {
186  if (i->second.exists("@process_name")) {
187  const std::string pName(i->second.getParameter<string>("@process_name"));
188  pNames += pName+" ";
189  if ( pName == processName ) {
190  psetID = i->first;
191  nPSets++;
192  if ((hltConfigData_ != s_dummyHLTConfigData()) && (hltConfigData_->id()==psetID)) {
193  hNames += tableName();
194  } else if ( 0 != (pset = registry_->getMapped(psetID))) {
195  if (pset->exists("HLTConfigVersion")) {
196  const ParameterSet& HLTPSet(pset->getParameterSet("HLTConfigVersion"));
197  if (HLTPSet.exists("tableName")) {
198  hNames += HLTPSet.getParameter<string>("tableName")+" ";
199  }
200  }
201  }
202  }
203  }
204  }
205 
206  LogVerbatim("HLTConfigProvider") << "Unordered list of all process names found: "
207  << pNames << "." << endl;
208 
209  LogVerbatim("HLTConfigProvider") << "HLT TableName of each selected process: "
210  << hNames << "." << endl;
211 
212  if (nPSets==0) {
213  clear();
214  LogError("HLTConfigProvider") << " Process name '"
215  << processName
216  << "' not found in registry!" << endl;
217  return;
218  }
219  if (psetID==ParameterSetID()) {
220  clear();
221  LogError("HLTConfigProvider") << " Process name '"
222  << processName
223  << "' found but ParameterSetID invalid!"
224  << endl;
225  return;
226  }
227  if (nPSets>1) {
228  clear();
229  LogError("HLTConfigProvider") << " Process name '"
230  << processName
231  << " found " << nPSets
232  << " times in registry!" << endl;
233  return;
234  }
235 
236  getDataFrom(psetID);
237 
238  return;
239 
240 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void getDataFrom(const edm::ParameterSetID &iID)
static const HLTConfigData * s_dummyHLTConfigData()
const std::string & tableName() const
HLT ConfDB table name.
const HLTConfigData * hltConfigData_
collection_type::const_iterator const_iterator
Hash< ParameterSetType > ParameterSetID
const std::string & processName() const
Accessors (const methods)
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
const bool HLTConfigProvider::inited ( ) const
inline

initialised?

Definition at line 59 of file HLTConfigProvider.h.

References inited_.

Referenced by EmDQMFeeder::beginRun().

59  {
60  return inited_;
61  }
const std::vector< std::string > HLTConfigProvider::matched ( const std::vector< std::string > &  inputs,
const std::string &  pattern 
)
static

regexp processing

Definition at line 335 of file HLTConfigProvider.cc.

References edm::glob2reg(), i, collect_tpl::input, and n.

Referenced by restoreVersion().

335  {
336  std::vector<std::string> matched;
337  const boost::regex regexp(edm::glob2reg(pattern));
338  const unsigned int n(inputs.size());
339  for (unsigned int i=0; i<n; ++i) {
340  const std::string& input(inputs[i]);
341  if (boost::regex_match(input,regexp)) matched.push_back(input);
342  }
343  return matched;
344 }
int i
Definition: DBlmapReader.cc:9
static const std::vector< std::string > matched(const std::vector< std::string > &inputs, const std::string &pattern)
regexp processing
std::string glob2reg(std::string const &pattern)
Definition: RegexMatch.cc:14
tuple input
Definition: collect_tpl.py:10
const std::string HLTConfigProvider::moduleEDMType ( const std::string &  module) const
inline

C++ base class name of module.

Definition at line 131 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleEDMType().

Referenced by FourVectorHLTOnline::beginRun(), FourVectorHLTOffline::beginRun(), and EmDQMFeeder::getFilterModules().

131  {
133  }
const HLTConfigData * hltConfigData_
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
Definition: vlib.h:209
unsigned int HLTConfigProvider::moduleIndex ( unsigned int  trigger,
const std::string &  module 
) const
inline

slot position of module on trigger path (0 to size-1)

Definition at line 118 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleIndex().

Referenced by HLTMonBTagIPSource::beginRun(), HLTMonBTagMuSource::beginRun(), HLTMonBitSummary::beginRun(), FourVectorHLTOnline::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTOffline::beginRun(), FourVectorHLTOnline::hasL1Passed(), and pat::PATTriggerProducer::produce().

118  {
119  return hltConfigData_->moduleIndex(trigger,module);
120  }
const HLTConfigData * hltConfigData_
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 - size-1)
Definition: vlib.h:209
unsigned int HLTConfigProvider::moduleIndex ( const std::string &  trigger,
const std::string &  module 
) const
inline

Definition at line 121 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleIndex().

121  {
122  return hltConfigData_->moduleIndex(trigger,module);
123  }
const HLTConfigData * hltConfigData_
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 - size-1)
Definition: vlib.h:209
const std::string& HLTConfigProvider::moduleLabel ( unsigned int  trigger,
unsigned int  module 
) const
inline

Definition at line 110 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabel().

Referenced by EmDQMFeeder::getFilterModules(), and pat::PATTriggerProducer::produce().

110  {
111  return hltConfigData_->moduleLabel(trigger,module);
112  }
const HLTConfigData * hltConfigData_
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
Definition: vlib.h:209
const std::string& HLTConfigProvider::moduleLabel ( const std::string &  trigger,
unsigned int  module 
) const
inline

Definition at line 113 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabel().

113  {
114  return hltConfigData_->moduleLabel(trigger,module);
115  }
const HLTConfigData * hltConfigData_
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
Definition: vlib.h:209
const std::vector<std::string>& HLTConfigProvider::moduleLabels ( unsigned int  trigger) const
inline

label(s) of module(s) on a trigger path

Definition at line 98 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabels().

Referenced by EwkMuLumiMonitorDQM::analyze(), HLTJetMETDQMSource::analyze(), FourVectorHLTOnline::analyze(), FourVectorHLTriggerOffline::analyze(), FourVectorHLTOffline::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), HLTMonBitSummary::beginRun(), LumiCalculator::beginRun(), HLTJetMETDQMSource::beginRun(), HeavyFlavorValidation::beginRun(), JetMETHLTOfflineSource::beginRun(), BTagHLTOfflineSource::beginRun(), FourVectorHLTOnline::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTriggerOffline::beginRun(), FourVectorHLTOffline::beginRun(), HLTOniaSource::checkHLTConfiguration(), FourVectorHLTOnline::getL1ConditionModuleName(), TrigResRateMon::getL1ConditionModuleName(), FourVectorHLTOffline::getL1ConditionModuleName(), egHLT::trigTools::getL1SeedFilterOfPath(), HLTMuonValidator::initializeHists(), HLTMuonOfflineAnalyzer::moduleLabels(), CandidateTriggerObjectProducer::produce(), HLTrigReport::reset(), and egHLT::trigTools::translateFiltersToPathNames().

98  {
99  return hltConfigData_->moduleLabels(trigger);
100  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::vector<std::string>& HLTConfigProvider::moduleLabels ( const std::string &  trigger) const
inline

Definition at line 101 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabels().

101  {
102  return hltConfigData_->moduleLabels(trigger);
103  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const edm::ParameterSet& HLTConfigProvider::modulePSet ( const std::string &  module) const
inline
const std::string HLTConfigProvider::moduleType ( const std::string &  module) const
inline
const std::vector<std::string>& HLTConfigProvider::prescaleLabels ( ) const
inline

low-level data member access

Definition at line 244 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleLabels().

Referenced by pat::PATTriggerProducer::produce().

244  {
245  return hltConfigData_->prescaleLabels();
246  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & prescaleLabels() const
low-level data member access
int HLTConfigProvider::prescaleSet ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) const

HLT prescale values via (L1) EventSetup current (default) prescale set index - to be taken from L1GtUtil via Event

error - notify user!

Definition at line 256 of file HLTConfigProvider.cc.

References L1GtUtils::AlgorithmTrigger, l1GtUtils_, and L1GtUtils::TechnicalTrigger.

Referenced by prescaleValue(), prescaleValues(), and pat::PATTriggerProducer::produce().

256  {
257  // return hltPrescaleTable_.set();
258  l1GtUtils_->retrieveL1EventSetup(iSetup);
259  int errorTech(0);
260  const int psfsiTech(l1GtUtils_->prescaleFactorSetIndex(iEvent,L1GtUtils::TechnicalTrigger,errorTech));
261  int errorPhys(0);
262  const int psfsiPhys(l1GtUtils_->prescaleFactorSetIndex(iEvent,L1GtUtils::AlgorithmTrigger,errorPhys));
263  assert(psfsiTech==psfsiPhys);
264  if ( (errorTech==0) && (errorPhys==0) &&
265  (psfsiTech>=0) && (psfsiPhys>=0) && (psfsiTech==psfsiPhys) ) {
266  return psfsiPhys;
267  } else {
269  edm::LogError("HLTConfigData")
270  << " Error in determining HLT prescale set index from L1 data using L1GtUtils: "
271  << " Tech/Phys error = " << errorTech << "/" << errorPhys
272  << " Tech/Phys psfsi = " << psfsiTech << "/" << psfsiPhys;
273  return -1;
274  }
275 }
boost::shared_ptr< L1GtUtils > l1GtUtils_
unsigned int HLTConfigProvider::prescaleSize ( ) const
inline

HLT prescale info Number of HLT prescale sets

Definition at line 222 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleSize().

Referenced by EwkMuDQM::analyze(), EwkMuLumiMonitorDQM::analyze(), and pat::PATTriggerProducer::produce().

222  {
223  return hltConfigData_->prescaleSize();
224  }
const HLTConfigData * hltConfigData_
unsigned int prescaleSize() const
const std::map<std::string,std::vector<unsigned int> >& HLTConfigProvider::prescaleTable ( ) const
inline

Definition at line 247 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleTable().

Referenced by pat::PATTriggerProducer::produce().

247  {
248  return hltConfigData_->prescaleTable();
249  }
const HLTConfigData * hltConfigData_
const std::map< std::string, std::vector< unsigned int > > & prescaleTable() const
unsigned int HLTConfigProvider::prescaleValue ( unsigned int  set,
const std::string &  trigger 
) const
inline

HLT prescale value in specific prescale set for a specific trigger path.

Definition at line 226 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleValue().

Referenced by EwkMuDQM::analyze(), EwkMuLumiMonitorDQM::analyze(), HLTInfo::analyze(), prescaleValue(), prescaleValues(), PrescaleWeightProvider::prescaleWeight(), and pat::PATTriggerProducer::produce().

226  {
227  return hltConfigData_->prescaleValue(set,trigger);
228  }
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
const HLTConfigData * hltConfigData_
unsigned int HLTConfigProvider::prescaleValue ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const std::string &  trigger 
) const

combining the two methods above

Definition at line 277 of file HLTConfigProvider.cc.

References prescaleSet(), and prescaleValue().

277  {
278  const int set(prescaleSet(iEvent,iSetup));
279  if (set<0) {
280  return 1;
281  } else {
282  return prescaleValue(static_cast<unsigned int>(set),trigger);
283  }
284 }
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup) const
std::pair< int, int > HLTConfigProvider::prescaleValues ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const std::string &  trigger 
) const

Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.

error - can't handle properly multiple L1GTSeed modules

Definition at line 286 of file HLTConfigProvider.cc.

References asciidump::at, dump(), hltL1GTSeeds(), i, l1GtUtils_, prescaleSet(), prescaleValue(), query::result, edm::second(), and size().

Referenced by HLTEventAnalyzerAOD::analyzeTrigger(), and CandidateTriggerObjectProducer::produce().

286  {
287 
288  // start with setting both L1T and HLT prescale values to 0
289  std::pair<int,int> result(std::pair<int,int>(0,0));
290 
291  // get HLT prescale (possible if HLT prescale set index is correctly found)
292  const int set(prescaleSet(iEvent,iSetup));
293  if (set<0) {
294  result.second = -1;
295  } else {
296  result.second = static_cast<int>(prescaleValue(static_cast<unsigned int>(set),trigger));
297  }
298 
299  // get L1T prescale - works only for those hlt trigger paths with
300  // exactly one L1GT seed module which has exactly one L1T name as seed
301  const unsigned int nL1GTSeedModules(hltL1GTSeeds(trigger).size());
302  if (nL1GTSeedModules==0) {
303  // no L1 seed module on path hence no L1 seed hence formally no L1 prescale
304  result.first=1;
305  } else if (nL1GTSeedModules==1) {
306  l1GtUtils_->retrieveL1EventSetup(iSetup);
307  const std::string l1tname(hltL1GTSeeds(trigger).at(0).second);
308  int l1error(0);
309  result.first = l1GtUtils_->prescaleFactor(iEvent,l1tname,l1error);
310  if (l1error!=0) {
311  edm::LogError("HLTConfigData")
312  << " Error in determining L1T prescale for HLT path: '" << trigger
313  << "' with L1T seed: '" << l1tname
314  << "' using L1GtUtils: error code: " << l1error
315  << ". (Note: only a single L1T name, not a bit number, is allowed as seed for a proper determination of the L1T prescale!)";
316  result.first = -1;
317  }
318  } else {
320  std::string dump("'"+hltL1GTSeeds(trigger).at(0).second+"'");
321  for (unsigned int i=1; i!=nL1GTSeedModules; ++i) {
322  dump += " * '"+hltL1GTSeeds(trigger).at(i).second+"'";
323  }
324  edm::LogError("HLTConfigData")
325  << " Error in determining L1T prescale for HLT path: '" << trigger
326  << "' has multiple L1GTSeed modules, " << nL1GTSeedModules
327  << ", with L1 seeds: " << dump
328  << ". (Note: at most one L1GTSeed module is allowed for a proper determination of the L1T prescale!)";
329  result.first = -1;
330  }
331 
332  return result;
333 }
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
int i
Definition: DBlmapReader.cc:9
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
U second(std::pair< T, U > const &p)
boost::shared_ptr< L1GtUtils > l1GtUtils_
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
tuple result
Definition: query.py:137
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup) const
list at
Definition: asciidump.py:428
const std::string& HLTConfigProvider::processName ( ) const
inline

Accessors (const methods)

process name

Definition at line 55 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::processName().

Referenced by EmDQMFeeder::beginRun(), and init().

55  {
56  return hltConfigData_->processName();
57  }
const HLTConfigData * hltConfigData_
const std::string & processName() const
Accessors (const methods)
const edm::ParameterSet& HLTConfigProvider::processPSet ( ) const
inline

ParameterSet of process.

Definition at line 136 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::processPSet().

Referenced by getDataFrom(), and init().

136  {
137  return hltConfigData_->processPSet();
138  }
const HLTConfigData * hltConfigData_
const edm::ParameterSet & processPSet() const
ParameterSet of process.
const std::string HLTConfigProvider::removeVersion ( const std::string &  trigger)
static

Definition at line 346 of file HLTConfigProvider.cc.

Referenced by EmDQMFeeder::beginRun().

346  {
347  const boost::regex regexp("_v[0-9]+$");
348  return boost::regex_replace(trigger,regexp,"");
349 }
const std::vector< std::string > HLTConfigProvider::restoreVersion ( const std::vector< std::string > &  inputs,
const std::string &  trigger 
)
static

Definition at line 351 of file HLTConfigProvider.cc.

References matched().

351  {
352  return matched(inputs,trigger+"_v[0-9]+$");
353 }
static const std::vector< std::string > matched(const std::vector< std::string > &inputs, const std::string &pattern)
regexp processing
const bool HLTConfigProvider::saveTags ( const std::string &  module) const
inline

Is module an L3 filter (ie, tracked saveTags=true)

Definition at line 146 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::saveTags().

Referenced by EmDQMFeeder::makePSetForEgammaGenericFilter(), EmDQMFeeder::makePSetForEgammaGenericQuadraticFilter(), and pat::PATTriggerProducer::produce().

146  {
147  return hltConfigData_->saveTags(module);
148  }
const HLTConfigData * hltConfigData_
const bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
Definition: vlib.h:209
const std::vector<std::string>& HLTConfigProvider::saveTagsModules ( unsigned int  trigger) const
inline

Definition at line 104 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::saveTagsModules().

Referenced by egHLT::trigTools::getActiveFilters(), and pat::PATTriggerProducer::produce().

104  {
105  return hltConfigData_->saveTagsModules(trigger);
106  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
const std::vector<std::string>& HLTConfigProvider::saveTagsModules ( const std::string &  trigger) const
inline

Definition at line 107 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::saveTagsModules().

107  {
108  return hltConfigData_->saveTagsModules(trigger);
109  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
unsigned int HLTConfigProvider::size ( void  ) const
inline

number of trigger paths in trigger table

Definition at line 68 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::size().

Referenced by TriggerHelper::acceptHltLogicalExpression(), GenericTriggerEventFlag::acceptHltLogicalExpression(), HLTEventAnalyzerAOD::analyze(), HLTEventAnalyzerRAW::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), HLTEventAnalyzerAOD::beginRun(), HLTEventAnalyzerRAW::beginRun(), HLTMonBTagMuSource::beginRun(), HLTMonBTagIPSource::beginRun(), LumiCalculator::beginRun(), HLTJetMETDQMSource::beginRun(), pat::PATTriggerEventProducer::beginRun(), EmDQMFeeder::beginRun(), QcdUeDQM::beginRun(), pat::PATTriggerProducer::beginRun(), JetMETHLTOfflineSource::beginRun(), TriggerValidator::beginRun(), BTagHLTOfflineSource::beginRun(), FourVectorHLTOnline::beginRun(), QcdLowPtDQM::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTriggerOffline::beginRun(), FourVectorHLTOffline::beginRun(), EmDQMFeeder::findEgammaPaths(), egHLT::trigTools::getActiveFilters(), EmDQMFeeder::getFilterModules(), PrescaleWeightProvider::initRun(), TriggerHelper::initRun(), GenericTriggerEventFlag::initRun(), DQMProvInfo::makeHLTKeyInfo(), prescaleValues(), PrescaleWeightProvider::prescaleWeight(), CandidateTriggerObjectProducer::produce(), pat::PATTriggerProducer::produce(), egHLT::trigTools::translateFiltersToPathNames(), JetMETHLTOfflineSource::validPathHLT(), and BTagHLTOfflineSource::validPathHLT().

68  {
69  return hltConfigData_->size();
70  }
unsigned int size() const
number of trigger paths in trigger table
const HLTConfigData * hltConfigData_
unsigned int HLTConfigProvider::size ( unsigned int  trigger) const
inline

number of modules on a specific trigger path

Definition at line 72 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::size().

72  {
73  return hltConfigData_->size(trigger);
74  }
unsigned int size() const
number of trigger paths in trigger table
const HLTConfigData * hltConfigData_
unsigned int HLTConfigProvider::size ( const std::string &  trigger) const
inline

Definition at line 75 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::size().

75  {
76  return hltConfigData_->size(trigger);
77  }
unsigned int size() const
number of trigger paths in trigger table
const HLTConfigData * hltConfigData_
const std::vector<std::string>& HLTConfigProvider::streamContent ( unsigned int  stream) const
inline

names of datasets in stream with index i

Definition at line 184 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContent().

Referenced by HLTScalers::beginRun(), TrigResRateMon::beginRun(), TrigResRateMon::fillHltMatrix(), and TrigResRateMon::normalizeHLTMatrix().

184  {
185  return hltConfigData_->streamContent(stream);
186  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
const std::vector<std::string>& HLTConfigProvider::streamContent ( const std::string &  stream) const
inline

names of datasets in stream with name

Definition at line 188 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContent().

188  {
189  return hltConfigData_->streamContent(stream);
190  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
const std::vector<std::vector<std::string> >& HLTConfigProvider::streamContents ( ) const
inline

names of datasets for all streams

Definition at line 180 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContents().

Referenced by HLTrigReport::reset().

180  {
181  return hltConfigData_->streamContents();
182  }
const HLTConfigData * hltConfigData_
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
unsigned int HLTConfigProvider::streamIndex ( const std::string &  stream) const
inline

index of stream with name

Definition at line 176 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamIndex().

Referenced by HLTScalers::beginRun().

176  {
177  return hltConfigData_->streamIndex(stream);
178  }
const HLTConfigData * hltConfigData_
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::string& HLTConfigProvider::streamName ( unsigned int  stream) const
inline

name of stream with index i

Definition at line 172 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamName().

172  {
173  return hltConfigData_->streamName(stream);
174  }
const std::string & streamName(unsigned int stream) const
name of stream with index i
const HLTConfigData * hltConfigData_
const std::vector<std::string>& HLTConfigProvider::streamNames ( ) const
inline

Streams list of names of all streams

Definition at line 168 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamNames().

Referenced by HLTScalers::beginRun(), and HLTrigReport::reset().

168  {
169  return hltConfigData_->streamNames();
170  }
const HLTConfigData * hltConfigData_
const std::vector< std::string > & streamNames() const
Streams.
const std::string& HLTConfigProvider::tableName ( ) const
inline

HLT ConfDB table name.

Definition at line 80 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::tableName().

Referenced by LumiCalculator::beginRun(), EmDQMFeeder::beginRun(), init(), DQMProvInfo::makeHLTKeyInfo(), and pat::PATTriggerEventProducer::produce().

80  {
81  return hltConfigData_->tableName();
82  }
const HLTConfigData * hltConfigData_
const std::string & tableName() const
HLT ConfDB table name.
unsigned int HLTConfigProvider::triggerIndex ( const std::string &  triggerName) const
inline
const std::string& HLTConfigProvider::triggerName ( unsigned int  triggerIndex) const
inline
const std::vector<std::string>& HLTConfigProvider::triggerNames ( ) const
inline

Member Data Documentation

bool HLTConfigProvider::changed_
private

Definition at line 266 of file HLTConfigProvider.h.

Referenced by changed(), clear(), getDataFrom(), and init().

const HLTConfigData* HLTConfigProvider::hltConfigData_
private
bool HLTConfigProvider::inited_
private

Definition at line 265 of file HLTConfigProvider.h.

Referenced by clear(), getDataFrom(), init(), and inited().

boost::shared_ptr<L1GtUtils> HLTConfigProvider::l1GtUtils_
private

Definition at line 268 of file HLTConfigProvider.h.

Referenced by clear(), prescaleSet(), and prescaleValues().

std::string HLTConfigProvider::processName_
private

data members

Definition at line 264 of file HLTConfigProvider.h.

Referenced by clear(), and init().