CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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...
 
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...
 

Private Member Functions

void clear ()
 
void getDataFrom (const edm::ParameterSetID &iID, const std::string &iProcessName)
 
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/01/24 14:23:01
Revision:
1.36
Author
Martin Grunewald

See header file for documentation

Date:
2010/12/23 12:48:46
Revision:
1.60
Author
Martin Grunewald

Definition at line 34 of file HLTConfigProvider.h.

Constructor & Destructor Documentation

HLTConfigProvider::HLTConfigProvider ( )

c'tor

Definition at line 31 of file HLTConfigProvider.cc.

31  :
32  processName_(""),
33  inited_(false),
34  changed_(true),
36  l1GtUtils_(new L1GtUtils())
37 {
38 }
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_.

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

Definition at line 215 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().

216 {
217  // clear all data members
218 
219  processName_ = "";
220  inited_ = false;
221  changed_ = true;
223  *l1GtUtils_ = L1GtUtils();
224 
225  return;
226 }
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 200 of file HLTConfigProvider.h.

References HLTConfigData::datasetContent(), and hltConfigData_.

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

200  {
202  }
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 204 of file HLTConfigProvider.h.

References HLTConfigData::datasetContent(), and hltConfigData_.

204  {
206  }
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 196 of file HLTConfigProvider.h.

References HLTConfigData::datasetContents(), and hltConfigData_.

Referenced by HLTrigReport::reset().

196  {
198  }
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 192 of file HLTConfigProvider.h.

References HLTConfigData::datasetIndex(), and hltConfigData_.

192  {
194  }
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 188 of file HLTConfigProvider.h.

References HLTConfigData::datasetName(), and hltConfigData_.

188  {
190  }
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 184 of file HLTConfigProvider.h.

References HLTConfigData::datasetNames(), and hltConfigData_.

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

184  {
185  return hltConfigData_->datasetNames();
186  }
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,
const std::string &  iProcessName 
)
private

Definition at line 104 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().

105 {
106  //is it in our registry?
108  const HLTConfigData* d = reg->getMapped(iID);
109  if(0 != d) {
110  changed_ = true;
111  inited_ = true;
112  hltConfigData_ = d;
113  } else {
114  const edm::ParameterSet* processPSet = 0;
115  if ( 0 != (processPSet = edm::pset::Registry::instance()->getMapped(iID))) {
116  if (not processPSet->id().isValid()) {
117  clear();
118  edm::LogError("HLTConfigProvider") << "ProcessPSet found is empty!";
119  changed_ = true;
120  inited_ = false;
122  return;
123  } else {
124  clear();
125  reg->insertMapped( HLTConfigData(processPSet));
126  changed_ = true;
127  inited_ = true;
128  hltConfigData_ = reg->getMapped(processPSet->id());
129  return;
130  }
131  } else {
132  clear();
133  edm::LogError("HLTConfigProvider") << "ProcessPSet not found in regsistry!";
134  changed_ = true;
135  inited_ = false;
137  return;
138  }
139  }
140  return;
141 }
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 142 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

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

142  {
143  return hltConfigData_->hltL1GTSeeds();
144  }
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 146 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

146  {
147  return hltConfigData_->hltL1GTSeeds(trigger);
148  }
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 150 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::hltL1GTSeeds().

150  {
151  return hltConfigData_->hltL1GTSeeds(trigger);
152  }
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 40 of file HLTConfigProvider.cc.

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

Referenced by HLTEventAnalyzerAOD::beginRun(), HLTEventAnalyzerRAW::beginRun(), HLTMonBTagMuSource::beginRun(), EwkMuLumiMonitorDQM::beginRun(), HLTMonBTagIPSource::beginRun(), HLTMonBitSummary::beginRun(), LumiCalculator::beginRun(), HLTrigReport::beginRun(), HLTJetMETDQMSource::beginRun(), pat::PATTriggerEventProducer::beginRun(), HeavyFlavorValidation::beginRun(), QcdUeDQM::beginRun(), TopTrigAnalyzer::beginRun(), BPAGTrigAnalyzer::beginRun(), OfflineDQMMuonTrigAnalyzer::beginRun(), pat::PATTriggerProducer::beginRun(), JetMETHLTOfflineSource::beginRun(), HLTMuonValidator::beginRun(), TriggerValidator::beginRun(), HLTInfo::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(), HLTMuonMatchAndPlot::HLTMuonMatchAndPlot(), init(), PrescaleWeightProvider::initRun(), TriggerHelper::initRun(), GenericTriggerEventFlag::initRun(), and DQMProvInfo::makeHLTKeyInfo().

43  {
44 
45  using namespace std;
46  using namespace edm;
47 
48  LogInfo("HLTConfigData") << "Called (R) with processName '"
49  << processName
50  << "' for " << iRun.id() << endl;
51 
53 
56 
59  return inited_;
60 
61 }
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 63 of file HLTConfigProvider.cc.

References edm::ProcessHistory::begin(), changed_, clear(), edm::ProcessHistory::end(), edm::ProcessHistory::getConfigurationForProcess(), getDataFrom(), hltConfigData_, HLTConfigData::id(), init(), inited_, n, processName(), and s_dummyHLTConfigData().

63  {
64 
65  using namespace std;
66  using namespace edm;
67 
69  const ProcessHistory::const_iterator hb(iHistory.begin());
70  const ProcessHistory::const_iterator he(iHistory.end());
71  unsigned int n(0);
72  for (ProcessHistory::const_iterator hi=hb; hi!=he; ++hi) {
73  if (hi->processName()==processName) {n++;}
74  }
75  if (n>1) {
76  clear();
77  LogError("HLTConfigProvider") << " ProcessName '"<< processName
78  << " found " << n
79  << " times in history!" << endl;
80  return;
81  }
82 
84  ProcessConfiguration processConfiguration;
85  if (iHistory.getConfigurationForProcess(processName,processConfiguration)) {
86  if ((hltConfigData_ !=s_dummyHLTConfigData()) && (processConfiguration.parameterSetID() == hltConfigData_->id())) {
87  changed_ = false;
88  inited_ = true;
89  return;
90  } else {
91  getDataFrom(processConfiguration.parameterSetID(),processName);
92  }
93  } else {
94  LogError("HLTConfigProvider") << "Falling back to processName-only init!";
95  clear();
97  if (!inited_) {
98  LogError("HLTConfigProvider") << "ProcessName not found in history!";
99  }
100  return;
101  }
102 }
collection_type::const_iterator const_iterator
const_iterator begin() const
static const HLTConfigData * s_dummyHLTConfigData()
const HLTConfigData * hltConfigData_
bool getConfigurationForProcess(std::string const &name, ProcessConfiguration &config) const
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
void getDataFrom(const edm::ParameterSetID &iID, const std::string &iProcessName)
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
void HLTConfigProvider::init ( const std::string &  processName)
private

Definition at line 143 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(), CrabTask::pset, s_dummyHLTConfigData(), and tableName().

144 {
145  using namespace std;
146  using namespace edm;
147 
148  // Obtain ParameterSetID for requested process (with name
149  // processName) from pset registry
150  string pNames("");
151  string hNames("");
152  const ParameterSet* pset = 0;
153  ParameterSetID psetID;
154  unsigned int nPSets(0);
155  const edm::pset::Registry * registry_(pset::Registry::instance());
156  const edm::pset::Registry::const_iterator rb(registry_->begin());
157  const edm::pset::Registry::const_iterator re(registry_->end());
158  for (edm::pset::Registry::const_iterator i = rb; i != re; ++i) {
159  if (i->second.exists("@process_name")) {
160  const std::string pName(i->second.getParameter<string>("@process_name"));
161  pNames += pName+" ";
162  if ( pName == processName ) {
163  psetID = i->first;
164  nPSets++;
165  if ((hltConfigData_ != s_dummyHLTConfigData()) && (hltConfigData_->id()==psetID)) {
166  hNames += tableName();
167  } else if ( 0 != (pset = registry_->getMapped(psetID))) {
168  if (pset->exists("HLTConfigVersion")) {
169  const ParameterSet& HLTPSet(pset->getParameterSet("HLTConfigVersion"));
170  if (HLTPSet.exists("tableName")) {
171  hNames += HLTPSet.getParameter<string>("tableName")+" ";
172  }
173  }
174  }
175  }
176  }
177  }
178 
179  LogVerbatim("HLTConfigProvider") << "Unordered list of all process names found: "
180  << pNames << "." << endl;
181 
182  LogVerbatim("HLTConfigProvider") << "HLT TableName of each selected process: "
183  << hNames << "." << endl;
184 
185  if (nPSets==0) {
186  clear();
187  LogError("HLTConfigProvider") << " Process name '"
188  << processName
189  << "' not found in registry!" << endl;
190  return;
191  }
192  if (psetID==ParameterSetID()) {
193  clear();
194  LogError("HLTConfigProvider") << " Process name '"
195  << processName
196  << "' found but ParameterSetID invalid!"
197  << endl;
198  return;
199  }
200  if (nPSets>1) {
201  clear();
202  LogError("HLTConfigProvider") << " Process name '"
203  << processName
204  << " found " << nPSets
205  << " times in registry!" << endl;
206  return;
207  }
208 
209  getDataFrom(psetID,processName);
210 
211  return;
212 
213 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
static const HLTConfigData * s_dummyHLTConfigData()
const std::string & tableName() const
HLT ConfDB table name.
const HLTConfigData * hltConfigData_
collection_type::const_iterator const_iterator
tuple pset
Definition: CrabTask.py:85
Hash< ParameterSetType > ParameterSetID
const std::string & processName() const
Accessors (const methods)
void getDataFrom(const edm::ParameterSetID &iID, const std::string &iProcessName)
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_.

59  {
60  return inited_;
61  }
const std::string HLTConfigProvider::moduleEDMType ( const std::string &  module) const
inline

C++ base class name of module.

Definition at line 125 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleEDMType().

Referenced by FourVectorHLTOffline::beginRun().

125  {
127  }
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 112 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().

112  {
113  return hltConfigData_->moduleIndex(trigger,module);
114  }
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 115 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleIndex().

115  {
116  return hltConfigData_->moduleIndex(trigger,module);
117  }
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 104 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabel().

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

104  {
105  return hltConfigData_->moduleLabel(trigger,module);
106  }
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 107 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::moduleLabel().

107  {
108  return hltConfigData_->moduleLabel(trigger,module);
109  }
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(), TopTrigAnalyzer::beginRun(), BPAGTrigAnalyzer::beginRun(), JetMETHLTOfflineSource::beginRun(), OfflineDQMMuonTrigAnalyzer::beginRun(), FourVectorHLTOnline::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTriggerOffline::beginRun(), FourVectorHLTOffline::beginRun(), HLTOniaSource::checkHLTConfiguration(), egHLT::trigTools::getActiveFilters(), FourVectorHLTOnline::getL1ConditionModuleName(), TrigResRateMon::getL1ConditionModuleName(), FourVectorHLTOffline::getL1ConditionModuleName(), egHLT::trigTools::getL1SeedFilterOfPath(), HLTMuonValidator::initializeHists(), 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

ParameterSet of module.

Definition at line 135 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::modulePSet().

Referenced by LumiCalculator::beginRun(), HLTJetMETDQMSource::beginRun(), and FourVectorHLTriggerOffline::beginRun().

135  {
137  }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
const HLTConfigData * hltConfigData_
Definition: vlib.h:209
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 233 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleLabels().

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

233  {
234  return hltConfigData_->prescaleLabels();
235  }
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 229 of file HLTConfigProvider.cc.

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

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

229  {
230  // return hltPrescaleTable_.set();
231  l1GtUtils_->retrieveL1EventSetup(iSetup);
232  int errorTech(0);
233  const int psfsiTech(l1GtUtils_->prescaleFactorSetIndex(iEvent,L1GtUtils::TechnicalTrigger,errorTech));
234  int errorPhys(0);
235  const int psfsiPhys(l1GtUtils_->prescaleFactorSetIndex(iEvent,L1GtUtils::AlgorithmTrigger,errorPhys));
236  assert(psfsiTech==psfsiPhys);
237  if ( (errorTech==0) && (errorPhys==0) &&
238  (psfsiTech>=0) && (psfsiPhys>=0) && (psfsiTech==psfsiPhys) ) {
239  return psfsiPhys;
240  } else {
242  edm::LogError("HLTConfigData")
243  << " Error in determining HLT prescale set index from L1 data using L1GtUtils: "
244  << " Tech/Phys error = " << errorTech << "/" << errorPhys
245  << " Tech/Phys psfsi = " << psfsiTech << "/" << psfsiPhys;
246  return -1;
247  }
248 }
boost::shared_ptr< L1GtUtils > l1GtUtils_
unsigned int HLTConfigProvider::prescaleSize ( ) const
inline

HLT prescale info Number of HLT prescale sets

Definition at line 211 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleSize().

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

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

Definition at line 236 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleTable().

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

236  {
237  return hltConfigData_->prescaleTable();
238  }
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 215 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::prescaleValue().

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

215  {
216  return hltConfigData_->prescaleValue(set,trigger);
217  }
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 250 of file HLTConfigProvider.cc.

References prescaleSet(), and prescaleValue().

250  {
251  const int set(prescaleSet(iEvent,iSetup));
252  if (set<0) {
253  return 1;
254  } else {
255  return prescaleValue(static_cast<unsigned int>(set),trigger);
256  }
257 }
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 259 of file HLTConfigProvider.cc.

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

Referenced by HLTEventAnalyzerAOD::analyzeTrigger().

259  {
260 
261  // start with setting both L1T and HLT prescale values to 0
262  std::pair<int,int> result(std::pair<int,int>(0,0));
263 
264  // get HLT prescale (possible if HLT prescale set index is correctly found)
265  const int set(prescaleSet(iEvent,iSetup));
266  if (set<0) {
267  result.second = -1;
268  } else {
269  result.second = static_cast<int>(prescaleValue(static_cast<unsigned int>(set),trigger));
270  }
271 
272  // get L1T prescale - works only for those hlt trigger paths with
273  // exactly one L1GT seed module which has exactly one L1T name as seed
274  const unsigned int nL1GTSeedModules(hltL1GTSeeds(trigger).size());
275  if (nL1GTSeedModules==0) {
276  // no L1 seed module on path hence no L1 seed hence formally no L1 prescale
277  result.first=1;
278  } else if (nL1GTSeedModules==1) {
279  l1GtUtils_->retrieveL1EventSetup(iSetup);
280  const std::string l1tname(hltL1GTSeeds(trigger).at(0).second);
281  int l1error(0);
282  result.first = l1GtUtils_->prescaleFactor(iEvent,l1tname,l1error);
283  if (l1error!=0) {
284  edm::LogError("HLTConfigData")
285  << " Error in determining L1T prescale for HLT path: '" << trigger
286  << "' with L1T seed: '" << l1tname
287  << "' using L1GtUtils: error code: " << l1error
288  << ". (Note: only a single L1T name, not a bit number, is allowed as seed for a proper determination of the L1T prescale!)";
289  result.first = -1;
290  }
291  } else {
293  std::string dump("'"+hltL1GTSeeds(trigger).at(0).second+"'");
294  for (unsigned int i=1; i!=nL1GTSeedModules; ++i) {
295  dump += " * '"+hltL1GTSeeds(trigger).at(i).second+"'";
296  }
297  edm::LogError("HLTConfigData")
298  << " Error in determining L1T prescale for HLT path: '" << trigger
299  << "' has multiple L1GTSeed modules, " << nL1GTSeedModules
300  << ", with L1 seeds: " << dump
301  << ". (Note: at most one L1GTSeed module is allowed for a proper determination of the L1T prescale!)";
302  result.first = -1;
303  }
304 
305  return result;
306 }
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 processName_.

Referenced by init().

55  {
56  return processName_;
57  }
std::string processName_
data members
const edm::ParameterSet& HLTConfigProvider::processPSet ( ) const
inline

ParameterSet of process.

Definition at line 130 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::processPSet().

Referenced by getDataFrom().

130  {
131  return hltConfigData_->processPSet();
132  }
const HLTConfigData * hltConfigData_
const edm::ParameterSet & processPSet() const
ParameterSet of process.
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(), QcdUeDQM::beginRun(), JetMETHLTOfflineSource::beginRun(), pat::PATTriggerProducer::beginRun(), TriggerValidator::beginRun(), FourVectorHLTOnline::beginRun(), QcdLowPtDQM::beginRun(), TrigResRateMon::beginRun(), FourVectorHLTriggerOffline::beginRun(), FourVectorHLTOffline::beginRun(), egHLT::trigTools::getActiveFilters(), PrescaleWeightProvider::initRun(), TriggerHelper::initRun(), GenericTriggerEventFlag::initRun(), DQMProvInfo::makeHLTKeyInfo(), prescaleValues(), PrescaleWeightProvider::prescaleWeight(), pat::PATTriggerProducer::produce(), egHLT::trigTools::translateFiltersToPathNames(), and JetMETHLTOfflineSource::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 173 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContent().

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

173  {
174  return hltConfigData_->streamContent(stream);
175  }
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 177 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContent().

177  {
178  return hltConfigData_->streamContent(stream);
179  }
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 169 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamContents().

Referenced by HLTrigReport::reset().

169  {
170  return hltConfigData_->streamContents();
171  }
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 165 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamIndex().

Referenced by HLTScalers::beginRun().

165  {
166  return hltConfigData_->streamIndex(stream);
167  }
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 161 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamName().

161  {
162  return hltConfigData_->streamName(stream);
163  }
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 157 of file HLTConfigProvider.h.

References hltConfigData_, and HLTConfigData::streamNames().

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

157  {
158  return hltConfigData_->streamNames();
159  }
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(), 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 251 of file HLTConfigProvider.h.

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

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

Definition at line 250 of file HLTConfigProvider.h.

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

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

Definition at line 253 of file HLTConfigProvider.h.

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

std::string HLTConfigProvider::processName_
private

data members

Definition at line 249 of file HLTConfigProvider.h.

Referenced by clear(), init(), and processName().