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...
 
const std::string & globalTag () const
 GlobalTag.globaltag. 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...
 
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::string globalTag_
 
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

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 25 of file HLTConfigData.h.

Constructor & Destructor Documentation

HLTConfigData::HLTConfigData ( )

Definition at line 30 of file HLTConfigData.cc.

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

30  :
32  processName_(""), globalTag_(""),
35  hltL1GTSeeds_(),
39 {
40  if (processPSet_->id().isValid()) {
41  extract();
42  }
43 }
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::string globalTag_
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:150
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 45 of file HLTConfigData.cc.

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

45  :
46  processPSet_(iPSet),
47  processName_(""), globalTag_(""),
50  hltL1GTSeeds_(),
54 {
55  if (processPSet_->id().isValid()) {
56  extract();
57  }
58 }
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::string globalTag_
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:150
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 508 of file HLTConfigData.cc.

References datasetContents_.

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

508  {
509  return datasetContents_.at(dataset);
510 }
std::vector< std::vector< std::string > > datasetContents_
tuple dataset
Definition: dataset.py:400
const std::vector< std::string > & HLTConfigData::datasetContent ( const std::string &  dataset) const

names of trigger paths in dataset with name

Definition at line 512 of file HLTConfigData.cc.

References datasetContent(), and datasetIndex().

512  {
514 }
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
tuple dataset
Definition: dataset.py:400
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 504 of file HLTConfigData.cc.

References datasetContents_.

Referenced by HLTConfigProvider::datasetContents().

504  {
505  return datasetContents_;
506 }
std::vector< std::vector< std::string > > datasetContents_
unsigned int HLTConfigData::datasetIndex ( const std::string &  dataset) const

index of dataset with name

Definition at line 495 of file HLTConfigData.cc.

References datasetIndex_, datasetNames_, and cmsHarvester::index.

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

495  {
496  const std::map<std::string,unsigned int>::const_iterator index(datasetIndex_.find(dataset));
497  if (index==datasetIndex_.end()) {
498  return datasetNames_.size();
499  } else {
500  return index->second;
501  }
502 }
std::map< std::string, unsigned int > datasetIndex_
std::vector< std::string > datasetNames_
tuple dataset
Definition: dataset.py:400
const std::string & HLTConfigData::datasetName ( unsigned int  dataset) const

name of dataset with index i

Definition at line 491 of file HLTConfigData.cc.

References datasetNames_.

Referenced by HLTConfigProvider::datasetName().

491  {
492  return datasetNames_.at(dataset);
493 }
std::vector< std::string > datasetNames_
tuple dataset
Definition: dataset.py:400
const std::vector< std::string > & HLTConfigData::datasetNames ( ) const

Datasets.

Datasets list of names of all datasets

Definition at line 487 of file HLTConfigData.cc.

References datasetNames_.

Referenced by HLTConfigProvider::datasetNames().

487  {
488  return datasetNames_;
489 }
std::vector< std::string > datasetNames_
void HLTConfigData::dump ( const std::string &  what) const

Dumping config info to cout.

Definition at line 232 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::dump().

232  {
233  using namespace std;
234  using namespace edm;
235 
236  if (what=="ProcessPSet") {
237  cout << "HLTConfigData::dump: ProcessPSet = " << endl << *processPSet_ << endl;
238  } else if (what=="ProcessName") {
239  cout << "HLTConfigData::dump: ProcessName = " << processName_ << endl;
240  } else if (what=="GlobalTag") {
241  cout << "HLTConfigData::dump: GlobalTag = " << globalTag_ << endl;
242  } else if (what=="TableName") {
243  cout << "HLTConfigData::dump: TableName = " << tableName_ << endl;
244  } else if (what=="Triggers") {
245  const unsigned int n(size());
246  cout << "HLTConfigData::dump: Triggers: " << n << endl;
247  for (unsigned int i=0; i!=n; ++i) {
248  cout << " " << i << " " << triggerNames_[i] << endl;
249  }
250  } else if (what=="TriggerSeeds") {
251  const unsigned int n(size());
252  cout << "HLTConfigData::dump: TriggerSeeds: " << n << endl;
253  for (unsigned int i=0; i!=n; ++i) {
254  const unsigned int m(hltL1GTSeeds_[i].size());
255  cout << " " << i << " " << triggerNames_[i] << " " << m << endl;
256  for (unsigned int j=0; j!=m; ++j) {
257  cout << " " << j
258  << " " << hltL1GTSeeds_[i][j].first
259  << "/" << hltL1GTSeeds_[i][j].second << endl;
260  }
261  }
262  } else if (what=="Modules") {
263  const unsigned int n(size());
264  cout << "HLTConfigData::dump Triggers and Modules: " << n << endl;
265  for (unsigned int i=0; i!=n; ++i) {
266  const unsigned int m(size(i));
267  cout << i << " " << triggerNames_[i] << " " << m << endl;
268  cout << " - Modules: ";
269  unsigned int nHLTPrescalers(0);
270  unsigned int nHLTLevel1GTSeed(0);
271  for (unsigned int j=0; j!=m; ++j) {
272  const string& label(moduleLabels_[i][j]);
273  const string type(moduleType(label));
274  const string edmtype(moduleEDMType(label));
275  const bool tags(saveTags(label));
276  cout << " " << j << ":" << label << "/" << type << "/" << edmtype << "/" << tags;
277  if (type=="HLTPrescaler") nHLTPrescalers++;
278  if (type=="HLTLevel1GTSeed") nHLTLevel1GTSeed++;
279  }
280  cout << endl;
281  cout << " - Number of HLTPrescaler/HLTLevel1GTSeed modules: "
282  << nHLTPrescalers << "/" << nHLTLevel1GTSeed << endl;
283  }
284  } else if (what=="StreamNames") {
285  const unsigned int n(streamNames_.size());
286  cout << "HLTConfigData::dump: StreamNames: " << n << endl;
287  for (unsigned int i=0; i!=n; ++i) {
288  cout << " " << i << " " << streamNames_[i] << endl;
289  }
290  } else if (what=="Streams") {
291  const unsigned int n(streamNames_.size());
292  cout << "HLTConfigData::dump: Streams: " << n << endl;
293  for (unsigned int i=0; i!=n; ++i) {
294  const unsigned int m(streamContents_[i].size());
295  cout << " " << i << " " << streamNames_[i] << " " << m << endl;
296  for (unsigned int j=0; j!=m; ++j) {
297  cout << " " << j << " " << streamContents_[i][j] << endl;
298  }
299  }
300  } else if (what=="DatasetNames") {
301  const unsigned int n(datasetNames_.size());
302  cout << "HLTConfigData::dump: DatasetNames: " << n << endl;
303  for (unsigned int i=0; i!=n; ++i) {
304  cout << " " << i << " " << datasetNames_[i] << endl;
305  }
306  } else if (what=="Datasets") {
307  const unsigned int n(datasetNames_.size());
308  cout << "HLTConfigData::dump: Datasets: " << n << endl;
309  for (unsigned int i=0; i!=n; ++i) {
310  const unsigned int m(datasetContents_[i].size());
311  cout << " " << i << " " << datasetNames_[i] << " " << m << endl;
312  for (unsigned int j=0; j!=m; ++j) {
313  cout << " " << j << " " << datasetContents_[i][j] << endl;
314  }
315  }
316  } else if (what=="PrescaleTable") {
317  const unsigned int n (hltPrescaleTable_.size());
318  cout << "HLTConfigData::dump: PrescaleTable: # of sets : " << n << endl;
319  const vector<string>& labels(hltPrescaleTable_.labels());
320  for (unsigned int i=0; i!=n; ++i) {
321  cout << " " << i << "/'" << labels.at(i) << "'";
322  }
323  if (n>0) cout << endl;
324  const map<string,vector<unsigned int> >& table(hltPrescaleTable_.table());
325  cout << "HLTConfigData::dump: PrescaleTable: # of paths: " << table.size() << endl;
326  const map<string,vector<unsigned int> >::const_iterator tb(table.begin());
327  const map<string,vector<unsigned int> >::const_iterator te(table.end());
328  for (map<string,vector<unsigned int> >::const_iterator ti=tb; ti!=te; ++ti) {
329  for (unsigned int i=0; i!=n; ++i) {
330  cout << " " << ti->second.at(i);
331  }
332  cout << " " << ti->first << endl;
333  }
334  } else {
335  cout << "HLTConfigData::dump: Unkown dump request: " << what << endl;
336  }
337  return;
338 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
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
std::string globalTag_
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
#define table(NAME)
Definition: DbCore.h:49
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:121
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 60 of file HLTConfigData.cc.

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

Referenced by BeautifulSoup.PageElement::_invert(), BeautifulSoup.Tag::decompose(), and HLTConfigData().

61 {
62  using namespace std;
63  using namespace edm;
64  using namespace trigger;
65 
66  // Extract process name
67  if (processPSet_->existsAs<string>("@process_name",true)) {
68  processName_= processPSet_->getParameter<string>("@process_name");
69  }
70 
71  // Extract globaltag
72  globalTag_="";
73  const ParameterSet* GlobalTagPSet(0);
74  if (processPSet_->exists("GlobalTag")) {
75  GlobalTagPSet = &(processPSet_->getParameterSet("GlobalTag"));
76  } else if (processPSet_->exists("PoolDBESSource@GlobalTag")) {
77  GlobalTagPSet = &(processPSet_->getParameterSet("PoolDBESSource@GlobalTag"));
78  }
79  if (GlobalTagPSet && GlobalTagPSet->existsAs<std::string>("globaltag",true)) {
80  globalTag_=GlobalTagPSet->getParameter<std::string>("globaltag");
81  }
82 
83  // Obtain PSet containing table name (available only in 2_1_10++ files)
84  if (processPSet_->existsAs<ParameterSet>("HLTConfigVersion",true)) {
85  const ParameterSet& HLTPSet(processPSet_->getParameterSet("HLTConfigVersion"));
86  if (HLTPSet.existsAs<string>("tableName",true)) {
87  tableName_=HLTPSet.getParameter<string>("tableName");
88  }
89  }
90 
91  LogVerbatim("HLTConfigData") << "ProcessPSet with: "
92  << processName_ << " "
93  << globalTag_ << " "
94  << tableName_;
95 
96  // Extract trigger paths (= paths - end_paths)
97  if (processPSet_->existsAs<ParameterSet>("@trigger_paths",true)) {
98  const ParameterSet& HLTPSet(processPSet_->getParameterSet("@trigger_paths"));
99  if (HLTPSet.existsAs<vector<string> >("@trigger_paths",true)) {
100  triggerNames_= HLTPSet.getParameter<vector<string> >("@trigger_paths");
101  }
102  }
103 
104  // Obtain module labels of all modules on all trigger paths
105  const unsigned int n(size());
106  moduleLabels_.reserve(n);
107  for (unsigned int i=0;i!=n; ++i) {
108  if (processPSet_->existsAs<vector<string> >(triggerNames_[i],true)) {
109  moduleLabels_.push_back(processPSet_->getParameter<vector<string> >(triggerNames_[i]));
110  }
111  }
112  saveTagsModules_.reserve(n);
113  vector<string> labels;
114  for (unsigned int i=0;i!=n; ++i) {
115  labels.clear();
116  const vector<string>& modules(moduleLabels(i));
117  const unsigned int m(modules.size());
118  labels.reserve(m);
119  for (unsigned int j=0;j!=m; ++j) {
120  const string& label(modules[j]);
121  if (saveTags(label)) labels.push_back(label);
122  }
123  saveTagsModules_.push_back(labels);
124  }
125 
126  // Fill index maps for fast lookup
127  moduleIndex_.resize(n);
128  for (unsigned int i=0; i!=n; ++i) {
130  moduleIndex_[i].clear();
131  const unsigned int m(size(i));
132  for (unsigned int j=0; j!=m; ++j) {
134  }
135  }
136 
137  // Extract and fill HLTLevel1GTSeed information for each trigger path
138  hltL1GTSeeds_.resize(n);
139  for (unsigned int i=0; i!=n; ++i) {
140  hltL1GTSeeds_[i].clear();
141  const unsigned int m(size(i));
142  for (unsigned int j=0; j!=m; ++j) {
143  const string& label(moduleLabels_[i][j]);
144  if (moduleType(label) == "HLTLevel1GTSeed") {
145  const ParameterSet& pset(modulePSet(label));
146  if (pset!=ParameterSet()) {
147  const bool l1Tech(pset.getParameter<bool>("L1TechTriggerSeeding"));
148  const string l1Seed(pset.getParameter<string>("L1SeedsLogicalExpression"));
149  hltL1GTSeeds_[i].push_back(pair<bool,string>(l1Tech,l1Seed));
150  }
151  }
152  }
153  }
154 
155  // Extract and fill streams information
156  if (processPSet_->existsAs<ParameterSet>("streams",true)) {
157  const ParameterSet& streams(processPSet_->getParameterSet("streams"));
158  streamNames_=streams.getParameterNamesForType<vector<string> >();
159  sort(streamNames_.begin(),streamNames_.end());
160  const unsigned int n(streamNames_.size());
161  streamContents_.resize(n);
162  for (unsigned int i=0; i!=n; ++i) {
163  streamIndex_[streamNames_[i]]=i;
164  streamContents_[i]=streams.getParameter<vector<string> >(streamNames_[i]);
166  }
167 
168  }
169 
170  // Extract and fill datasets information
171  if (processPSet_->existsAs<ParameterSet>("datasets",true)) {
172  const ParameterSet& datasets(processPSet_->getParameterSet("datasets"));
173  datasetNames_=datasets.getParameterNamesForType<vector<string> >();
174  sort(datasetNames_.begin(),datasetNames_.end());
175  const unsigned int n(datasetNames_.size());
176  datasetContents_.resize(n);
177  for (unsigned int i=0; i!=n; ++i) {
178  datasetIndex_[datasetNames_[i]]=i;
179  datasetContents_[i]=datasets.getParameter< vector<string> >(datasetNames_[i]);
181  }
182  }
183 
184  // Extract and fill Prescale information
185 
186  // Check various possibilities to get the HLT prescale sets:
187  string prescaleName("");
188  const string preS("PrescaleService");
189  const string preT("PrescaleTable");
190  if (processPSet_->existsAs<ParameterSet>(preS,true)) {
191  prescaleName=preS;
192  } else if ( processPSet_->existsAs<ParameterSet>(preT,true)) {
193  prescaleName=preT;
194  }
195  if (prescaleName=="") {
197  } else {
198  const ParameterSet& iPS(processPSet_->getParameterSet(prescaleName));
199  string defaultLabel("default");
200  if (iPS.existsAs<string>("lvl1DefaultLabel",true)) {
201  defaultLabel = iPS.getParameter<string>("lvl1DefaultLabel");
202  }
203  vector<string> labels;
204  if (iPS.existsAs<vector<string> >("lvl1Labels",true)) {
205  labels = iPS.getParameter<vector<string> >("lvl1Labels");
206  }
207  unsigned int set(0);
208  const unsigned int n(labels.size());
209  for (unsigned int i=0; i!=n; ++i) {
210  if (labels[i]==defaultLabel) set=i;
211  }
212  map<string,vector<unsigned int> > table;
213  if (iPS.existsAs< vector<ParameterSet> >("prescaleTable",true)) {
214  const vector<ParameterSet>& vpTable(iPS.getParameterSetVector("prescaleTable"));
215  const unsigned int m (vpTable.size());
216  for (unsigned int i=0; i!=m; ++i) {
217  table[vpTable[i].getParameter<std::string>("pathName")] =
218  vpTable[i].getParameter<std::vector<unsigned int> >("prescales");
219  }
220  }
221  if (n>0) {
222  hltPrescaleTable_=HLTPrescaleTable(set,labels,table);
223  } else {
225  }
226 
227  }
228 
229  return;
230 }
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:184
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.
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
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_
std::string globalTag_
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:37
#define table(NAME)
Definition: DbCore.h:49
const edm::ParameterSet * processPSet_
ParameterSet const & getParameterSet(std::string const &) const
#define begin
Definition: vmac.h:30
std::vector< std::string > streamNames_
std::map< std::string, unsigned int > streamIndex_
std::string processName_
const std::string& HLTConfigData::globalTag ( ) const

GlobalTag.globaltag.

Referenced by HLTConfigProvider::globalTag().

const std::vector< std::vector< std::pair< bool, std::string > > > & HLTConfigData::hltL1GTSeeds ( ) const

HLTLevel1GTSeed module HLTLevel1GTSeed modules for all trigger paths

Definition at line 444 of file HLTConfigData.cc.

References hltL1GTSeeds_.

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

444  {
445  return hltL1GTSeeds_;
446 }
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 448 of file HLTConfigData.cc.

References hltL1GTSeeds(), and triggerIndex().

448  {
449  return hltL1GTSeeds(triggerIndex(trigger));
450 }
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 452 of file HLTConfigData.cc.

References hltL1GTSeeds_.

452  {
453  return hltL1GTSeeds_.at(trigger);
454 }
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 531 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::init().

531  {
532  return processPSet_->id();
533 }
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 414 of file HLTConfigData.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulePSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

414  {
415  const edm::ParameterSet& pset(modulePSet(module));
416  if (pset.existsAs<std::string>("@module_edm_type",true)) {
417  return pset.getParameter<std::string>("@module_edm_type");
418  } else {
419  return "";
420  }
421 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:208
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 393 of file HLTConfigData.cc.

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

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

393  {
394  const std::map<std::string,unsigned int>::const_iterator index(moduleIndex_.at(trigger).find(module));
395  if (index==moduleIndex_.at(trigger).end()) {
396  return size(trigger);
397  } else {
398  return index->second;
399  }
400 }
std::vector< std::map< std::string, unsigned int > > moduleIndex_
unsigned int size() const
number of trigger paths in trigger table
Definition: vlib.h:208
unsigned int HLTConfigData::moduleIndex ( const std::string &  trigger,
const std::string &  module 
) const

Definition at line 401 of file HLTConfigData.cc.

References moduleIndex(), and triggerIndex().

401  {
402  return moduleIndex(triggerIndex(trigger),module);
403 }
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:208
const std::string & HLTConfigData::moduleLabel ( unsigned int  trigger,
unsigned int  module 
) const

Definition at line 386 of file HLTConfigData.cc.

References moduleLabels_.

Referenced by HLTConfigProvider::moduleLabel().

386  {
387  return moduleLabels_.at(trigger).at(module);
388 }
std::vector< std::vector< std::string > > moduleLabels_
Definition: vlib.h:208
const std::string & HLTConfigData::moduleLabel ( const std::string &  trigger,
unsigned int  module 
) const

Definition at line 389 of file HLTConfigData.cc.

References moduleLabels_, and triggerIndex().

389  {
390  return moduleLabels_.at(triggerIndex(trigger)).at(module);
391 }
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:208
const std::vector< std::string > & HLTConfigData::moduleLabels ( unsigned int  trigger) const

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

Definition at line 372 of file HLTConfigData.cc.

References moduleLabels_.

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

372  {
373  return moduleLabels_.at(trigger);
374 }
std::vector< std::vector< std::string > > moduleLabels_
const std::vector< std::string > & HLTConfigData::moduleLabels ( const std::string &  trigger) const

Definition at line 375 of file HLTConfigData.cc.

References moduleLabels_, and triggerIndex().

375  {
376  return moduleLabels_.at(triggerIndex(trigger));
377 }
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 427 of file HLTConfigData.cc.

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

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

427  {
428  if (processPSet_->exists(module)) {
430  } else {
431  return *s_dummyPSet();
432  }
433 }
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:208
static const edm::ParameterSet * s_dummyPSet()
const std::string HLTConfigData::moduleType ( const std::string &  module) const

C++ class name of module.

Definition at line 405 of file HLTConfigData.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulePSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

405  {
406  const edm::ParameterSet& pset(modulePSet(module));
407  if (pset.existsAs<std::string>("@module_type",true)) {
408  return pset.getParameter<std::string>("@module_type");
409  } else {
410  return "";
411  }
412 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:208
const std::vector< std::string > & HLTConfigData::prescaleLabels ( ) const

low-level data member access

Definition at line 524 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::prescaleLabels().

524  {
525  return hltPrescaleTable_.labels();
526 }
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 517 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::prescaleSize().

517  {
518  return hltPrescaleTable_.size();
519 }
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 527 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::prescaleTable().

527  {
528  return hltPrescaleTable_.table();
529 }
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 520 of file HLTConfigData.cc.

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

Referenced by HLTConfigProvider::prescaleValue().

520  {
521  return hltPrescaleTable_.prescale(set,trigger);
522 }
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 340 of file HLTConfigData.cc.

References processName_.

Referenced by HLTConfigProvider::processName().

340  {
341  return processName_;
342 }
std::string processName_
const edm::ParameterSet & HLTConfigData::processPSet ( ) const

ParameterSet of process.

Definition at line 423 of file HLTConfigData.cc.

References processPSet_.

Referenced by HLTConfigProvider::processPSet().

423  {
424  return *processPSet_;
425 }
const edm::ParameterSet * processPSet_
bool HLTConfigData::saveTags ( const std::string &  module) const

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

Definition at line 435 of file HLTConfigData.cc.

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

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

435  {
436  const edm::ParameterSet& pset(modulePSet(module));
437  if (pset.existsAs<bool>("saveTags",true)) {
438  return pset.getParameter<bool>("saveTags");
439  } else {
440  return false;
441  }
442 }
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
Definition: vlib.h:208
const std::vector< std::string > & HLTConfigData::saveTagsModules ( unsigned int  trigger) const

Definition at line 379 of file HLTConfigData.cc.

References saveTagsModules_.

Referenced by HLTConfigProvider::saveTagsModules().

379  {
380  return saveTagsModules_.at(trigger);
381 }
std::vector< std::vector< std::string > > saveTagsModules_
const std::vector< std::string > & HLTConfigData::saveTagsModules ( const std::string &  trigger) const

Definition at line 382 of file HLTConfigData.cc.

References saveTagsModules_, and triggerIndex().

382  {
383  return saveTagsModules_.at(triggerIndex(trigger));
384 }
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 344 of file HLTConfigData.cc.

References triggerNames_.

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

344  {
345  return triggerNames_.size();
346 }
std::vector< std::string > triggerNames_
unsigned int HLTConfigData::size ( unsigned int  trigger) const

number of modules on a specific trigger path

Definition at line 347 of file HLTConfigData.cc.

References moduleLabels_.

347  {
348  return moduleLabels_.at(trigger).size();
349 }
std::vector< std::vector< std::string > > moduleLabels_
unsigned int HLTConfigData::size ( const std::string &  trigger) const

Definition at line 350 of file HLTConfigData.cc.

References size(), and triggerIndex().

350  {
351  return size(triggerIndex(trigger));
352 }
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 478 of file HLTConfigData.cc.

References streamContents_.

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

478  {
479  return streamContents_.at(stream);
480 }
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 482 of file HLTConfigData.cc.

References streamContent(), and streamIndex().

482  {
484 }
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 474 of file HLTConfigData.cc.

References streamContents_.

Referenced by HLTConfigProvider::streamContents().

474  {
475  return streamContents_;
476 }
std::vector< std::vector< std::string > > streamContents_
unsigned int HLTConfigData::streamIndex ( const std::string &  stream) const

index of stream with name

Definition at line 465 of file HLTConfigData.cc.

References cmsHarvester::index, streamIndex_, and streamNames_.

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

465  {
466  const std::map<std::string,unsigned int>::const_iterator index(streamIndex_.find(stream));
467  if (index==streamIndex_.end()) {
468  return streamNames_.size();
469  } else {
470  return index->second;
471  }
472 }
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 461 of file HLTConfigData.cc.

References streamNames_.

Referenced by HLTConfigProvider::streamName().

461  {
462  return streamNames_.at(stream);
463 }
std::vector< std::string > streamNames_
const std::vector< std::string > & HLTConfigData::streamNames ( ) const

Streams.

Streams list of names of all streams

Definition at line 457 of file HLTConfigData.cc.

References streamNames_.

Referenced by HLTConfigProvider::streamNames().

457  {
458  return streamNames_;
459 }
std::vector< std::string > streamNames_
const std::string & HLTConfigData::tableName ( ) const

HLT ConfDB table name.

Definition at line 354 of file HLTConfigData.cc.

References tableName_.

Referenced by HLTConfigProvider::tableName().

354  {
355  return tableName_;
356 }
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 363 of file HLTConfigData.cc.

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

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

363  {
364  const std::map<std::string,unsigned int>::const_iterator index(triggerIndex_.find(trigger));
365  if (index==triggerIndex_.end()) {
366  return size();
367  } else {
368  return index->second;
369  }
370 }
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 360 of file HLTConfigData.cc.

References triggerNames_.

Referenced by HLTConfigProvider::triggerName().

360  {
361  return triggerNames_.at(trigger);
362 }
std::vector< std::string > triggerNames_
const std::vector< std::string > & HLTConfigData::triggerNames ( ) const

names of trigger paths

Definition at line 357 of file HLTConfigData.cc.

References triggerNames_.

Referenced by HLTConfigProvider::triggerNames().

357  {
358  return triggerNames_;
359 }
std::vector< std::string > triggerNames_

Member Data Documentation

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

Definition at line 164 of file HLTConfigData.h.

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

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

Definition at line 163 of file HLTConfigData.h.

Referenced by datasetIndex(), and extract().

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

Definition at line 162 of file HLTConfigData.h.

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

std::string HLTConfigData::globalTag_
private

Definition at line 147 of file HLTConfigData.h.

Referenced by dump(), and extract().

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

Definition at line 156 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 154 of file HLTConfigData.h.

Referenced by extract(), and moduleIndex().

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

Definition at line 150 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 151 of file HLTConfigData.h.

Referenced by extract(), and saveTagsModules().

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

Definition at line 160 of file HLTConfigData.h.

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

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

Definition at line 159 of file HLTConfigData.h.

Referenced by extract(), and streamIndex().

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

Definition at line 158 of file HLTConfigData.h.

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

std::string HLTConfigData::tableName_
private

Definition at line 148 of file HLTConfigData.h.

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

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

Definition at line 153 of file HLTConfigData.h.

Referenced by extract(), and triggerIndex().

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

Definition at line 149 of file HLTConfigData.h.

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