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
HLTConfigData Class Reference

#include <HLTConfigData.h>

Public Member Functions

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
 Datasets. More...
 
void dump (const std::string &what) const
 Dumping config info to cout. More...
 
 HLTConfigData ()
 
 HLTConfigData (const edm::ParameterSet *iID)
 
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...
 
edm::ParameterSetID id () const
 technical: id() function needed for use with ThreadSafeRegistry 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 - 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...
 
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...
 
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
 Streams. More...
 
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 - 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 extract ()
 extract information into data members - called by init() methods More...
 

Private Attributes

std::vector< std::vector
< std::string > > 
datasetContents_
 
std::map< std::string,
unsigned int > 
datasetIndex_
 
std::vector< std::string > datasetNames_
 
std::vector< std::vector
< std::pair< bool, std::string > > > 
hltL1GTSeeds_
 
trigger::HLTPrescaleTable hltPrescaleTable_
 
std::vector< std::map
< std::string, unsigned int > > 
moduleIndex_
 
std::vector< std::vector
< std::string > > 
moduleLabels_
 
std::string processName_
 
const edm::ParameterSetprocessPSet_
 
std::vector< std::vector
< std::string > > 
saveTagsModules_
 
std::vector< std::vector
< std::string > > 
streamContents_
 
std::map< std::string,
unsigned int > 
streamIndex_
 
std::vector< std::string > streamNames_
 
std::string tableName_
 
std::map< std::string,
unsigned int > 
triggerIndex_
 
std::vector< std::string > triggerNames_
 

Detailed Description

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

Date:
2011/05/01 09:25:29
Revision:
1.12
Author
Martin Grunewald

See header file for documentation

Date:
2011/05/01 09:47:28
Revision:
1.14
Author
Martin Grunewald

Definition at line 27 of file HLTConfigData.h.

Constructor & Destructor Documentation

HLTConfigData::HLTConfigData ( )

Definition at line 24 of file HLTConfigData.cc.

References extract(), edm::ParameterSet::id(), edm::Hash< I >::isValid(), and processPSet_.

24  :
26  processName_(""),
29  hltL1GTSeeds_(),
33 {
34  if (processPSet_->id().isValid()) {
35  extract();
36  }
37 }
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
std::vector< std::map< std::string, unsigned int > > moduleIndex_
ParameterSetID id() const
std::map< std::string, unsigned int > datasetIndex_
std::vector< std::string > datasetNames_
std::vector< std::vector< std::string > > saveTagsModules_
std::vector< std::vector< std::string > > streamContents_
std::vector< std::string > triggerNames_
std::vector< std::vector< std::string > > datasetContents_
std::map< std::string, unsigned int > triggerIndex_
std::string tableName_
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
void extract()
extract information into data members - called by init() methods
const edm::ParameterSet * processPSet_
bool isValid() const
Definition: Hash.h:136
std::vector< std::string > streamNames_
std::map< std::string, unsigned int > streamIndex_
static const edm::ParameterSet * s_dummyPSet()
std::string processName_
HLTConfigData::HLTConfigData ( const edm::ParameterSet iID)

Definition at line 39 of file HLTConfigData.cc.

References extract(), edm::ParameterSet::id(), edm::Hash< I >::isValid(), and processPSet_.

39  :
40  processPSet_(iPSet),
41  processName_(""),
44  hltL1GTSeeds_(),
48 {
49  if (processPSet_->id().isValid()) {
50  extract();
51  }
52 }
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
std::vector< std::map< std::string, unsigned int > > moduleIndex_
ParameterSetID id() const
std::map< std::string, unsigned int > datasetIndex_
std::vector< std::string > datasetNames_
std::vector< std::vector< std::string > > saveTagsModules_
std::vector< std::vector< std::string > > streamContents_
std::vector< std::string > triggerNames_
std::vector< std::vector< std::string > > datasetContents_
std::map< std::string, unsigned int > triggerIndex_
std::string tableName_
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
void extract()
extract information into data members - called by init() methods
const edm::ParameterSet * processPSet_
bool isValid() const
Definition: Hash.h:136
std::vector< std::string > streamNames_
std::map< std::string, unsigned int > streamIndex_
std::string processName_

Member Function Documentation

const std::vector< std::string > & HLTConfigData::datasetContent ( unsigned int  dataset) const

names of trigger paths in dataset with index i

Definition at line 484 of file HLTConfigData.cc.

References datasetContents_.

Referenced by datasetContent(), and HLTConfigProvider::datasetContent().

484  {
485  return datasetContents_.at(dataset);
486 }
std::vector< std::vector< std::string > > datasetContents_
const std::vector< std::string > & HLTConfigData::datasetContent ( const std::string &  dataset) const

names of trigger paths in dataset with name

Definition at line 488 of file HLTConfigData.cc.

References datasetContent(), and datasetIndex().

488  {
490 }
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
unsigned int datasetIndex(const std::string &dataset) const
index of dataset with name
const std::vector< std::vector< std::string > > & HLTConfigData::datasetContents ( ) const

names of trigger paths for all datasets

Definition at line 480 of file HLTConfigData.cc.

References datasetContents_.

Referenced by HLTConfigProvider::datasetContents().

480  {
481  return datasetContents_;
482 }
std::vector< std::vector< std::string > > datasetContents_
unsigned int HLTConfigData::datasetIndex ( const std::string &  dataset) const

index of dataset with name

Definition at line 471 of file HLTConfigData.cc.

References datasetIndex_, datasetNames_, and getHLTprescales::index.

Referenced by datasetContent(), and HLTConfigProvider::datasetIndex().

471  {
472  const std::map<std::string,unsigned int>::const_iterator index(datasetIndex_.find(dataset));
473  if (index==datasetIndex_.end()) {
474  return datasetNames_.size();
475  } else {
476  return index->second;
477  }
478 }
std::map< std::string, unsigned int > datasetIndex_
std::vector< std::string > datasetNames_
const std::string & HLTConfigData::datasetName ( unsigned int  dataset) const

name of dataset with index i

Definition at line 467 of file HLTConfigData.cc.

References datasetNames_.

Referenced by HLTConfigProvider::datasetName().

467  {
468  return datasetNames_.at(dataset);
469 }
std::vector< std::string > datasetNames_
const std::vector< std::string > & HLTConfigData::datasetNames ( ) const

Datasets.

Datasets list of names of all datasets

Definition at line 463 of file HLTConfigData.cc.

References datasetNames_.

Referenced by HLTConfigProvider::datasetNames().

463  {
464  return datasetNames_;
465 }
std::vector< std::string > datasetNames_
void HLTConfigData::dump ( const std::string &  what) const

Dumping config info to cout.

Definition at line 209 of file HLTConfigData.cc.

References gather_cfg::cout, datasetContents_, datasetNames_, hltL1GTSeeds_, hltPrescaleTable_, i, j, label, L1TDQM_cfg::labels, trigger::HLTPrescaleTable::labels(), m, python.multivaluedict::map(), moduleEDMType(), moduleLabels_, moduleType(), n, processName_, processPSet_, saveTags(), trigger::HLTPrescaleTable::size(), size(), streamContents_, streamNames_, trigger::HLTPrescaleTable::table(), asciidump::table, tableName_, o2o::tags, and triggerNames_.

Referenced by HLTConfigProvider::dump().

209  {
210  using namespace std;
211  using namespace edm;
212 
213  if (what=="ProcessPSet") {
214  cout << "HLTConfigData::dump: ProcessPSet = " << endl << *processPSet_ << endl;
215  } else if (what=="ProcessName") {
216  cout << "HLTConfigData::dump: ProcessName = " << processName_ << endl;
217 
218  } else if (what=="TableName") {
219  cout << "HLTConfigData::dump: TableName = " << tableName_ << endl;
220  } else if (what=="Triggers") {
221  const unsigned int n(size());
222  cout << "HLTConfigData::dump: Triggers: " << n << endl;
223  for (unsigned int i=0; i!=n; ++i) {
224  cout << " " << i << " " << triggerNames_[i] << endl;
225  }
226  } else if (what=="TriggerSeeds") {
227  const unsigned int n(size());
228  cout << "HLTConfigData::dump: TriggerSeeds: " << n << endl;
229  for (unsigned int i=0; i!=n; ++i) {
230  const unsigned int m(hltL1GTSeeds_[i].size());
231  cout << " " << i << " " << triggerNames_[i] << " " << m << endl;
232  for (unsigned int j=0; j!=m; ++j) {
233  cout << " " << j
234  << " " << hltL1GTSeeds_[i][j].first
235  << "/" << hltL1GTSeeds_[i][j].second << endl;
236  }
237  }
238  } else if (what=="Modules") {
239  const unsigned int n(size());
240  cout << "HLTConfigData::dump Triggers and Modules: " << n << endl;
241  for (unsigned int i=0; i!=n; ++i) {
242  const unsigned int m(size(i));
243  cout << i << " " << triggerNames_[i] << " " << m << endl;
244  cout << " - Modules: ";
245  unsigned int nHLTPrescalers(0);
246  unsigned int nHLTLevel1GTSeed(0);
247  for (unsigned int j=0; j!=m; ++j) {
248  const string& label(moduleLabels_[i][j]);
249  const string type(moduleType(label));
250  const string edmtype(moduleEDMType(label));
251  const bool tags(saveTags(label));
252  cout << " " << j << ":" << label << "/" << type << "/" << edmtype << "/" << tags;
253  if (type=="HLTPrescaler") nHLTPrescalers++;
254  if (type=="HLTLevel1GTSeed") nHLTLevel1GTSeed++;
255  }
256  cout << endl;
257  cout << " - Number of HLTPrescaler/HLTLevel1GTSeed modules: "
258  << nHLTPrescalers << "/" << nHLTLevel1GTSeed << endl;
259  }
260  } else if (what=="StreamNames") {
261  const unsigned int n(streamNames_.size());
262  cout << "HLTConfigData::dump: StreamNames: " << n << endl;
263  for (unsigned int i=0; i!=n; ++i) {
264  cout << " " << i << " " << streamNames_[i] << endl;
265  }
266  } else if (what=="Streams") {
267  const unsigned int n(streamNames_.size());
268  cout << "HLTConfigData::dump: Streams: " << n << endl;
269  for (unsigned int i=0; i!=n; ++i) {
270  const unsigned int m(streamContents_[i].size());
271  cout << " " << i << " " << streamNames_[i] << " " << m << endl;
272  for (unsigned int j=0; j!=m; ++j) {
273  cout << " " << j << " " << streamContents_[i][j] << endl;
274  }
275  }
276  } else if (what=="DatasetNames") {
277  const unsigned int n(datasetNames_.size());
278  cout << "HLTConfigData::dump: DatasetNames: " << n << endl;
279  for (unsigned int i=0; i!=n; ++i) {
280  cout << " " << i << " " << datasetNames_[i] << endl;
281  }
282  } else if (what=="Datasets") {
283  const unsigned int n(datasetNames_.size());
284  cout << "HLTConfigData::dump: Datasets: " << n << endl;
285  for (unsigned int i=0; i!=n; ++i) {
286  const unsigned int m(datasetContents_[i].size());
287  cout << " " << i << " " << datasetNames_[i] << " " << m << endl;
288  for (unsigned int j=0; j!=m; ++j) {
289  cout << " " << j << " " << datasetContents_[i][j] << endl;
290  }
291  }
292  } else if (what=="PrescaleTable") {
293  const unsigned int n (hltPrescaleTable_.size());
294  cout << "HLTConfigData::dump: PrescaleTable: # of sets : " << n << endl;
295  const vector<string>& labels(hltPrescaleTable_.labels());
296  for (unsigned int i=0; i!=n; ++i) {
297  cout << " " << i << "/'" << labels.at(i) << "'";
298  }
299  if (n>0) cout << endl;
300  const map<string,vector<unsigned int> >& table(hltPrescaleTable_.table());
301  cout << "HLTConfigData::dump: PrescaleTable: # of paths: " << table.size() << endl;
302  const map<string,vector<unsigned int> >::const_iterator tb(table.begin());
303  const map<string,vector<unsigned int> >::const_iterator te(table.end());
304  for (map<string,vector<unsigned int> >::const_iterator ti=tb; ti!=te; ++ti) {
305  for (unsigned int i=0; i!=n; ++i) {
306  cout << " " << ti->second.at(i);
307  }
308  cout << " " << ti->first << endl;
309  }
310  } else {
311  cout << "HLTConfigData::dump: Unkown dump request: " << what << endl;
312  }
313  return;
314 }
list table
Definition: asciidump.py:386
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
const std::string & label
Definition: MVAComputer.cc:186
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
std::vector< std::string > datasetNames_
unsigned int size() const
number of trigger paths in trigger table
const std::map< std::string, std::vector< unsigned int > > & table() const
const bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
std::vector< std::vector< std::string > > streamContents_
std::vector< std::string > triggerNames_
const std::vector< std::string > & labels() const
std::vector< std::vector< std::string > > datasetContents_
std::string tableName_
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
int j
Definition: DBlmapReader.cc:9
const std::string moduleType(const std::string &module) const
C++ class name of module.
tuple tags
Definition: o2o.py:248
tuple labels
Definition: L1TDQM_cfg.py:62
const edm::ParameterSet * processPSet_
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
std::vector< std::string > streamNames_
tuple cout
Definition: gather_cfg.py:41
unsigned int size() const
consistency condition: all vectors must have the same length
std::string processName_
void HLTConfigData::extract ( )
private

extract information into data members - called by init() methods

Definition at line 54 of file HLTConfigData.cc.

References begin, datasetContents_, datasetIndex_, datasetNames_, RecoTau_DiTaus_pt_20-420_cfg::datasets, end, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), hltL1GTSeeds_, hltPrescaleTable_, i, j, label, L1TDQM_cfg::labels, m, moduleIndex_, moduleLabels(), moduleLabels_, modulePSet(), moduleType(), n, processName_, processPSet_, MultipleCompare::pset, saveTags(), saveTagsModules_, size(), python.multivaluedict::sort(), streamContents_, streamIndex_, streamNames_, hcal_dqm_sourceclient-file_cfg::streams, asciidump::table, tableName(), tableName_, triggerIndex_, and triggerNames_.

Referenced by HLTConfigData().

55 {
56  using namespace std;
57  using namespace edm;
58  using namespace trigger;
59 
60  // Extract process name
61  if (processPSet_->existsAs<string>("@process_name",true)) {
62  processName_= processPSet_->getParameter<string>("@process_name");
63  }
64 
65  // Obtain PSet containing table name (available only in 2_1_10++ files)
66  if (processPSet_->existsAs<ParameterSet>("HLTConfigVersion",true)) {
67  const ParameterSet& HLTPSet(processPSet_->getParameterSet("HLTConfigVersion"));
68  if (HLTPSet.existsAs<string>("tableName",true)) {
69  tableName_=HLTPSet.getParameter<string>("tableName");
70  }
71  }
72  LogVerbatim("HLTConfigData") << "ProcessPSet with: "
73  << processName_ << " "
74  << tableName();
75 
76  // Extract trigger paths (= paths - end_paths)
77  if (processPSet_->existsAs<ParameterSet>("@trigger_paths",true)) {
78  const ParameterSet& HLTPSet(processPSet_->getParameterSet("@trigger_paths"));
79  if (HLTPSet.existsAs<vector<string> >("@trigger_paths",true)) {
80  triggerNames_= HLTPSet.getParameter<vector<string> >("@trigger_paths");
81  }
82  }
83 
84  // Obtain module labels of all modules on all trigger paths
85  const unsigned int n(size());
86  moduleLabels_.reserve(n);
87  for (unsigned int i=0;i!=n; ++i) {
88  if (processPSet_->existsAs<vector<string> >(triggerNames_[i],true)) {
89  moduleLabels_.push_back(processPSet_->getParameter<vector<string> >(triggerNames_[i]));
90  }
91  }
92  saveTagsModules_.reserve(n);
93  vector<string> labels;
94  for (unsigned int i=0;i!=n; ++i) {
95  labels.clear();
96  const vector<string>& modules(moduleLabels(i));
97  const unsigned int m(modules.size());
98  labels.reserve(m);
99  for (unsigned int j=0;j!=m; ++j) {
100  const string& label(modules[j]);
101  if (saveTags(label)) labels.push_back(label);
102  }
103  saveTagsModules_.push_back(labels);
104  }
105 
106  // Fill index maps for fast lookup
107  moduleIndex_.resize(n);
108  for (unsigned int i=0; i!=n; ++i) {
110  moduleIndex_[i].clear();
111  const unsigned int m(size(i));
112  for (unsigned int j=0; j!=m; ++j) {
114  }
115  }
116 
117  // Extract and fill HLTLevel1GTSeed information for each trigger path
118  hltL1GTSeeds_.resize(n);
119  for (unsigned int i=0; i!=n; ++i) {
120  hltL1GTSeeds_[i].clear();
121  const unsigned int m(size(i));
122  for (unsigned int j=0; j!=m; ++j) {
123  const string& label(moduleLabels_[i][j]);
124  if (moduleType(label) == "HLTLevel1GTSeed") {
126  if (pset!=ParameterSet()) {
127  const bool l1Tech(pset.getParameter<bool>("L1TechTriggerSeeding"));
128  const string l1Seed(pset.getParameter<string>("L1SeedsLogicalExpression"));
129  hltL1GTSeeds_[i].push_back(pair<bool,string>(l1Tech,l1Seed));
130  }
131  }
132  }
133  }
134 
135  // Extract and fill streams information
136  if (processPSet_->existsAs<ParameterSet>("streams",true)) {
137  const ParameterSet& streams(processPSet_->getParameterSet("streams"));
138  streamNames_=streams.getParameterNamesForType<vector<string> >();
139  sort(streamNames_.begin(),streamNames_.end());
140  const unsigned int n(streamNames_.size());
141  streamContents_.resize(n);
142  for (unsigned int i=0; i!=n; ++i) {
143  streamIndex_[streamNames_[i]]=i;
144  streamContents_[i]=streams.getParameter<vector<string> >(streamNames_[i]);
146  }
147 
148  }
149 
150  // Extract and fill datasets information
151  if (processPSet_->existsAs<ParameterSet>("datasets",true)) {
152  const ParameterSet& datasets(processPSet_->getParameterSet("datasets"));
153  datasetNames_=datasets.getParameterNamesForType<vector<string> >();
154  sort(datasetNames_.begin(),datasetNames_.end());
155  const unsigned int n(datasetNames_.size());
156  datasetContents_.resize(n);
157  for (unsigned int i=0; i!=n; ++i) {
158  datasetIndex_[datasetNames_[i]]=i;
159  datasetContents_[i]=datasets.getParameter< vector<string> >(datasetNames_[i]);
161  }
162  }
163 
164  // Extract and fill Prescale information
165 
166  // Check various possibilities to get the HLT prescale sets:
167  string prescaleName("");
168  const string preS("PrescaleService");
169  const string preT("PrescaleTable");
170  if (processPSet_->existsAs<ParameterSet>(preS,true)) {
171  prescaleName=preS;
172  } else if ( processPSet_->existsAs<ParameterSet>(preT,true)) {
173  prescaleName=preT;
174  }
175  if (prescaleName=="") {
177  } else {
178  const ParameterSet& iPS(processPSet_->getParameterSet(prescaleName));
179  string defaultLabel(iPS.getUntrackedParameter<string>("lvl1DefaultLabel",""));
180  vector<string> labels;
181  if (iPS.existsAs<vector<string> >("lvl1Labels",true)) {
182  labels = iPS.getParameter<vector<string> >("lvl1Labels");
183  }
184  unsigned int set(0);
185  const unsigned int n(labels.size());
186  for (unsigned int i=0; i!=n; ++i) {
187  if (labels[i]==defaultLabel) set=i;
188  }
189  map<string,vector<unsigned int> > table;
190  if (iPS.existsAs< vector<ParameterSet> >("prescaleTable",true)) {
191  const vector<ParameterSet>& vpTable(iPS.getParameterSetVector("prescaleTable"));
192  const unsigned int m (vpTable.size());
193  for (unsigned int i=0; i!=m; ++i) {
194  table[vpTable[i].getParameter<std::string>("pathName")] =
195  vpTable[i].getParameter<std::vector<unsigned int> >("prescales");
196  }
197  }
198  if (n>0) {
199  hltPrescaleTable_=HLTPrescaleTable(set,labels,table);
200  } else {
202  }
203 
204  }
205 
206  return;
207 }
list table
Definition: asciidump.py:386
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:181
const std::string & label
Definition: MVAComputer.cc:186
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
std::vector< std::map< std::string, unsigned int > > moduleIndex_
std::map< std::string, unsigned int > datasetIndex_
The single EDProduct containing the HLT Prescale Table.
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::vector< std::string > datasetNames_
unsigned int size() const
number of trigger paths in trigger table
std::vector< std::vector< std::string > > saveTagsModules_
const bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
std::vector< std::vector< std::string > > streamContents_
std::vector< std::string > triggerNames_
std::vector< std::vector< std::string > > datasetContents_
std::map< std::string, unsigned int > triggerIndex_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::string tableName_
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
int j
Definition: DBlmapReader.cc:9
const std::string moduleType(const std::string &module) const
C++ class name of module.
#define end
Definition: vmac.h:38
const std::string & tableName() const
HLT ConfDB table name.
tuple labels
Definition: L1TDQM_cfg.py:62
const edm::ParameterSet * processPSet_
ParameterSet const & getParameterSet(std::string const &) const
#define begin
Definition: vmac.h:31
std::vector< std::string > streamNames_
std::map< std::string, unsigned int > streamIndex_
std::string processName_
const std::vector< std::vector< std::pair< bool, std::string > > > & HLTConfigData::hltL1GTSeeds ( ) const

HLTLevel1GTSeed module HLTLevel1GTSeed modules for all trigger paths

Definition at line 420 of file HLTConfigData.cc.

References hltL1GTSeeds_.

Referenced by hltL1GTSeeds(), and HLTConfigProvider::hltL1GTSeeds().

420  {
421  return hltL1GTSeeds_;
422 }
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
const std::vector< std::pair< bool, std::string > > & HLTConfigData::hltL1GTSeeds ( const std::string &  trigger) const

HLTLevel1GTSeed modules for trigger path with name.

Definition at line 424 of file HLTConfigData.cc.

References hltL1GTSeeds(), and triggerIndex().

424  {
425  return hltL1GTSeeds(triggerIndex(trigger));
426 }
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
const std::vector< std::pair< bool, std::string > > & HLTConfigData::hltL1GTSeeds ( unsigned int  trigger) const

HLTLevel1GTSeed modules for trigger path with index i.

Definition at line 428 of file HLTConfigData.cc.

References hltL1GTSeeds_.

428  {
429  return hltL1GTSeeds_.at(trigger);
430 }
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
edm::ParameterSetID HLTConfigData::id ( void  ) const

technical: id() function needed for use with ThreadSafeRegistry

Definition at line 507 of file HLTConfigData.cc.

References edm::ParameterSet::id(), and processPSet_.

Referenced by HLTConfigProvider::init().

507  {
508  return processPSet_->id();
509 }
ParameterSetID id() const
const edm::ParameterSet * processPSet_
const std::string HLTConfigData::moduleEDMType ( const std::string &  module) const

C++ base class name of module.

Definition at line 390 of file HLTConfigData.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulePSet(), and MultipleCompare::pset.

Referenced by dump(), and HLTConfigProvider::moduleEDMType().

390  {
392  if (pset.existsAs<std::string>("@module_edm_type",true)) {
393  return pset.getParameter<std::string>("@module_edm_type");
394  } else {
395  return "";
396  }
397 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:209
unsigned int HLTConfigData::moduleIndex ( unsigned int  trigger,
const std::string &  module 
) const

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

Definition at line 369 of file HLTConfigData.cc.

References getHLTprescales::index, moduleIndex_, and size().

Referenced by moduleIndex(), and HLTConfigProvider::moduleIndex().

369  {
370  const std::map<std::string,unsigned int>::const_iterator index(moduleIndex_.at(trigger).find(module));
371  if (index==moduleIndex_.at(trigger).end()) {
372  return size(trigger);
373  } else {
374  return index->second;
375  }
376 }
std::vector< std::map< std::string, unsigned int > > moduleIndex_
unsigned int size() const
number of trigger paths in trigger table
Definition: vlib.h:209
unsigned int HLTConfigData::moduleIndex ( const std::string &  trigger,
const std::string &  module 
) const

Definition at line 377 of file HLTConfigData.cc.

References moduleIndex(), and triggerIndex().

377  {
378  return moduleIndex(triggerIndex(trigger),module);
379 }
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
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 & HLTConfigData::moduleLabel ( unsigned int  trigger,
unsigned int  module 
) const

Definition at line 362 of file HLTConfigData.cc.

References moduleLabels_.

Referenced by HLTConfigProvider::moduleLabel().

362  {
363  return moduleLabels_.at(trigger).at(module);
364 }
std::vector< std::vector< std::string > > moduleLabels_
Definition: vlib.h:209
const std::string & HLTConfigData::moduleLabel ( const std::string &  trigger,
unsigned int  module 
) const

Definition at line 365 of file HLTConfigData.cc.

References moduleLabels_, and triggerIndex().

365  {
366  return moduleLabels_.at(triggerIndex(trigger)).at(module);
367 }
std::vector< std::vector< std::string > > moduleLabels_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
Definition: vlib.h:209
const std::vector< std::string > & HLTConfigData::moduleLabels ( unsigned int  trigger) const

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

Definition at line 348 of file HLTConfigData.cc.

References moduleLabels_.

Referenced by extract(), and HLTConfigProvider::moduleLabels().

348  {
349  return moduleLabels_.at(trigger);
350 }
std::vector< std::vector< std::string > > moduleLabels_
const std::vector< std::string > & HLTConfigData::moduleLabels ( const std::string &  trigger) const

Definition at line 351 of file HLTConfigData.cc.

References moduleLabels_, and triggerIndex().

351  {
352  return moduleLabels_.at(triggerIndex(trigger));
353 }
std::vector< std::vector< std::string > > moduleLabels_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
const edm::ParameterSet & HLTConfigData::modulePSet ( const std::string &  module) const

ParameterSet of module.

Definition at line 403 of file HLTConfigData.cc.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameterSet(), processPSet_, and s_dummyPSet().

Referenced by extract(), moduleEDMType(), HLTConfigProvider::modulePSet(), moduleType(), and saveTags().

403  {
404  if (processPSet_->exists(module)) {
406  } else {
407  return *s_dummyPSet();
408  }
409 }
bool exists(std::string const &parameterName) const
checks if a parameter exists
const edm::ParameterSet * processPSet_
ParameterSet const & getParameterSet(std::string const &) const
Definition: vlib.h:209
static const edm::ParameterSet * s_dummyPSet()
const std::string HLTConfigData::moduleType ( const std::string &  module) const

C++ class name of module.

Definition at line 381 of file HLTConfigData.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulePSet(), and MultipleCompare::pset.

Referenced by dump(), extract(), and HLTConfigProvider::moduleType().

381  {
383  if (pset.existsAs<std::string>("@module_type",true)) {
384  return pset.getParameter<std::string>("@module_type");
385  } else {
386  return "";
387  }
388 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:209
const std::vector< std::string > & HLTConfigData::prescaleLabels ( ) const

low-level data member access

Definition at line 500 of file HLTConfigData.cc.

References hltPrescaleTable_, and trigger::HLTPrescaleTable::labels().

Referenced by HLTConfigProvider::prescaleLabels().

500  {
501  return hltPrescaleTable_.labels();
502 }
const std::vector< std::string > & labels() const
trigger::HLTPrescaleTable hltPrescaleTable_
unsigned int HLTConfigData::prescaleSize ( ) const

HLT prescale info Number of HLT prescale sets

Definition at line 493 of file HLTConfigData.cc.

References hltPrescaleTable_, and trigger::HLTPrescaleTable::size().

Referenced by HLTConfigProvider::prescaleSize().

493  {
494  return hltPrescaleTable_.size();
495 }
trigger::HLTPrescaleTable hltPrescaleTable_
unsigned int size() const
consistency condition: all vectors must have the same length
const std::map< std::string, std::vector< unsigned int > > & HLTConfigData::prescaleTable ( ) const

Definition at line 503 of file HLTConfigData.cc.

References hltPrescaleTable_, and trigger::HLTPrescaleTable::table().

Referenced by HLTConfigProvider::prescaleTable().

503  {
504  return hltPrescaleTable_.table();
505 }
const std::map< std::string, std::vector< unsigned int > > & table() const
trigger::HLTPrescaleTable hltPrescaleTable_
unsigned int HLTConfigData::prescaleValue ( unsigned int  set,
const std::string &  trigger 
) const

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

Definition at line 496 of file HLTConfigData.cc.

References hltPrescaleTable_, and trigger::HLTPrescaleTable::prescale().

Referenced by HLTConfigProvider::prescaleValue().

496  {
497  return hltPrescaleTable_.prescale(set,trigger);
498 }
trigger::HLTPrescaleTable hltPrescaleTable_
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
const std::string & HLTConfigData::processName ( ) const

Accessors (const methods)

process name

Definition at line 316 of file HLTConfigData.cc.

References processName_.

Referenced by HLTConfigProvider::processName().

316  {
317  return processName_;
318 }
std::string processName_
const edm::ParameterSet & HLTConfigData::processPSet ( ) const

ParameterSet of process.

Definition at line 399 of file HLTConfigData.cc.

References processPSet_.

Referenced by HLTConfigProvider::processPSet().

399  {
400  return *processPSet_;
401 }
const edm::ParameterSet * processPSet_
const bool HLTConfigData::saveTags ( const std::string &  module) const

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

Definition at line 411 of file HLTConfigData.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulePSet(), and MultipleCompare::pset.

Referenced by dump(), extract(), and HLTConfigProvider::saveTags().

411  {
413  if (pset.existsAs<bool>("saveTags",true)) {
414  return pset.getParameter<bool>("saveTags");
415  } else {
416  return false;
417  }
418 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:209
const std::vector< std::string > & HLTConfigData::saveTagsModules ( unsigned int  trigger) const

Definition at line 355 of file HLTConfigData.cc.

References saveTagsModules_.

Referenced by HLTConfigProvider::saveTagsModules().

355  {
356  return saveTagsModules_.at(trigger);
357 }
std::vector< std::vector< std::string > > saveTagsModules_
const std::vector< std::string > & HLTConfigData::saveTagsModules ( const std::string &  trigger) const

Definition at line 358 of file HLTConfigData.cc.

References saveTagsModules_, and triggerIndex().

358  {
359  return saveTagsModules_.at(triggerIndex(trigger));
360 }
std::vector< std::vector< std::string > > saveTagsModules_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
unsigned int HLTConfigData::size ( void  ) const

number of trigger paths in trigger table

Definition at line 320 of file HLTConfigData.cc.

References triggerNames_.

Referenced by dump(), extract(), moduleIndex(), size(), HLTConfigProvider::size(), and triggerIndex().

320  {
321  return triggerNames_.size();
322 }
std::vector< std::string > triggerNames_
unsigned int HLTConfigData::size ( unsigned int  trigger) const

number of modules on a specific trigger path

Definition at line 323 of file HLTConfigData.cc.

References moduleLabels_.

323  {
324  return moduleLabels_.at(trigger).size();
325 }
std::vector< std::vector< std::string > > moduleLabels_
unsigned int HLTConfigData::size ( const std::string &  trigger) const

Definition at line 326 of file HLTConfigData.cc.

References size(), and triggerIndex().

326  {
327  return size(triggerIndex(trigger));
328 }
unsigned int size() const
number of trigger paths in trigger table
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
const std::vector< std::string > & HLTConfigData::streamContent ( unsigned int  stream) const

names of datasets in stream with index i

Definition at line 454 of file HLTConfigData.cc.

References streamContents_.

Referenced by streamContent(), and HLTConfigProvider::streamContent().

454  {
455  return streamContents_.at(stream);
456 }
std::vector< std::vector< std::string > > streamContents_
const std::vector< std::string > & HLTConfigData::streamContent ( const std::string &  stream) const

names of datasets in stream with name

Definition at line 458 of file HLTConfigData.cc.

References streamContent(), and streamIndex().

458  {
459  return streamContent(streamIndex(stream));
460 }
unsigned int streamIndex(const std::string &stream) const
index of stream with name
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 > > & HLTConfigData::streamContents ( ) const

names of datasets for all streams

Definition at line 450 of file HLTConfigData.cc.

References streamContents_.

Referenced by HLTConfigProvider::streamContents().

450  {
451  return streamContents_;
452 }
std::vector< std::vector< std::string > > streamContents_
unsigned int HLTConfigData::streamIndex ( const std::string &  stream) const

index of stream with name

Definition at line 441 of file HLTConfigData.cc.

References getHLTprescales::index, streamIndex_, and streamNames_.

Referenced by streamContent(), and HLTConfigProvider::streamIndex().

441  {
442  const std::map<std::string,unsigned int>::const_iterator index(streamIndex_.find(stream));
443  if (index==streamIndex_.end()) {
444  return streamNames_.size();
445  } else {
446  return index->second;
447  }
448 }
std::vector< std::string > streamNames_
std::map< std::string, unsigned int > streamIndex_
const std::string & HLTConfigData::streamName ( unsigned int  stream) const

name of stream with index i

Definition at line 437 of file HLTConfigData.cc.

References streamNames_.

Referenced by HLTConfigProvider::streamName().

437  {
438  return streamNames_.at(stream);
439 }
std::vector< std::string > streamNames_
const std::vector< std::string > & HLTConfigData::streamNames ( ) const

Streams.

Streams list of names of all streams

Definition at line 433 of file HLTConfigData.cc.

References streamNames_.

Referenced by HLTConfigProvider::streamNames().

433  {
434  return streamNames_;
435 }
std::vector< std::string > streamNames_
const std::string & HLTConfigData::tableName ( ) const

HLT ConfDB table name.

Definition at line 330 of file HLTConfigData.cc.

References tableName_.

Referenced by extract(), and HLTConfigProvider::tableName().

330  {
331  return tableName_;
332 }
std::string tableName_
unsigned int HLTConfigData::triggerIndex ( const std::string &  triggerName) const

slot position of trigger path in trigger table (0 - size-1)

Definition at line 339 of file HLTConfigData.cc.

References getHLTprescales::index, size(), and triggerIndex_.

Referenced by hltL1GTSeeds(), moduleIndex(), moduleLabel(), moduleLabels(), saveTagsModules(), size(), and HLTConfigProvider::triggerIndex().

339  {
340  const std::map<std::string,unsigned int>::const_iterator index(triggerIndex_.find(trigger));
341  if (index==triggerIndex_.end()) {
342  return size();
343  } else {
344  return index->second;
345  }
346 }
unsigned int size() const
number of trigger paths in trigger table
std::map< std::string, unsigned int > triggerIndex_
const std::string & HLTConfigData::triggerName ( unsigned int  triggerIndex) const

Definition at line 336 of file HLTConfigData.cc.

References triggerNames_.

Referenced by HLTConfigProvider::triggerName().

336  {
337  return triggerNames_.at(trigger);
338 }
std::vector< std::string > triggerNames_
const std::vector< std::string > & HLTConfigData::triggerNames ( ) const

names of trigger paths

Definition at line 333 of file HLTConfigData.cc.

References triggerNames_.

Referenced by HLTConfigProvider::triggerNames().

333  {
334  return triggerNames_;
335 }
std::vector< std::string > triggerNames_

Member Data Documentation

std::vector<std::vector<std::string> > HLTConfigData::datasetContents_
private

Definition at line 163 of file HLTConfigData.h.

Referenced by datasetContent(), datasetContents(), dump(), and extract().

std::map<std::string,unsigned int> HLTConfigData::datasetIndex_
private

Definition at line 162 of file HLTConfigData.h.

Referenced by datasetIndex(), and extract().

std::vector<std::string> HLTConfigData::datasetNames_
private

Definition at line 161 of file HLTConfigData.h.

Referenced by datasetIndex(), datasetName(), datasetNames(), dump(), and extract().

std::vector<std::vector<std::pair<bool,std::string> > > HLTConfigData::hltL1GTSeeds_
private

Definition at line 155 of file HLTConfigData.h.

Referenced by dump(), extract(), and hltL1GTSeeds().

trigger::HLTPrescaleTable HLTConfigData::hltPrescaleTable_
private
std::vector<std::map<std::string,unsigned int> > HLTConfigData::moduleIndex_
private

Definition at line 153 of file HLTConfigData.h.

Referenced by extract(), and moduleIndex().

std::vector<std::vector<std::string> > HLTConfigData::moduleLabels_
private

Definition at line 149 of file HLTConfigData.h.

Referenced by dump(), extract(), moduleLabel(), moduleLabels(), and size().

std::string HLTConfigData::processName_
private

Definition at line 146 of file HLTConfigData.h.

Referenced by dump(), extract(), and processName().

const edm::ParameterSet* HLTConfigData::processPSet_
private

Definition at line 144 of file HLTConfigData.h.

Referenced by dump(), extract(), HLTConfigData(), id(), modulePSet(), and processPSet().

std::vector<std::vector<std::string> > HLTConfigData::saveTagsModules_
private

Definition at line 150 of file HLTConfigData.h.

Referenced by extract(), and saveTagsModules().

std::vector<std::vector<std::string> > HLTConfigData::streamContents_
private

Definition at line 159 of file HLTConfigData.h.

Referenced by dump(), extract(), streamContent(), and streamContents().

std::map<std::string,unsigned int> HLTConfigData::streamIndex_
private

Definition at line 158 of file HLTConfigData.h.

Referenced by extract(), and streamIndex().

std::vector<std::string> HLTConfigData::streamNames_
private

Definition at line 157 of file HLTConfigData.h.

Referenced by dump(), extract(), streamIndex(), streamName(), and streamNames().

std::string HLTConfigData::tableName_
private

Definition at line 147 of file HLTConfigData.h.

Referenced by dump(), extract(), and tableName().

std::map<std::string,unsigned int> HLTConfigData::triggerIndex_
private

Definition at line 152 of file HLTConfigData.h.

Referenced by extract(), and triggerIndex().

std::vector<std::string> HLTConfigData::triggerNames_
private

Definition at line 148 of file HLTConfigData.h.

Referenced by dump(), extract(), size(), triggerName(), and triggerNames().