32 processName_(
""), globalTag_(
""),
33 tableName_(), triggerNames_(), moduleLabels_(), saveTagsModules_(),
34 triggerIndex_(), moduleIndex_(),
36 streamNames_(), streamIndex_(), streamContents_(),
37 datasetNames_(), datasetIndex_(), datasetContents_(),
47 processName_(
""), globalTag_(
""),
48 tableName_(), triggerNames_(), moduleLabels_(), saveTagsModules_(),
49 triggerIndex_(), moduleIndex_(),
51 streamNames_(), streamIndex_(), streamContents_(),
52 datasetNames_(), datasetIndex_(), datasetContents_(),
64 using namespace trigger;
86 if (HLTPSet.existsAs<
string>(
"tableName",
true)) {
87 tableName_=HLTPSet.getParameter<
string>(
"tableName");
91 LogVerbatim(
"HLTConfigData") <<
"ProcessPSet with: "
99 if (HLTPSet.existsAs<vector<string> >(
"@trigger_paths",
true)) {
100 triggerNames_= HLTPSet.getParameter<vector<string> >(
"@trigger_paths");
105 const unsigned int n(
size());
107 for (
unsigned int i=0;
i!=
n; ++
i) {
114 for (
unsigned int i=0;
i!=
n; ++
i) {
117 const unsigned int m(modules.size());
119 for (
unsigned int j=0;
j!=
m; ++
j) {
120 const string&
label(modules[
j]);
128 for (
unsigned int i=0;
i!=
n; ++
i) {
131 const unsigned int m(
size(
i));
132 for (
unsigned int j=0;
j!=
m; ++
j) {
139 for (
unsigned int i=0;
i!=
n; ++
i) {
141 const unsigned int m(
size(
i));
142 for (
unsigned int j=0;
j!=
m; ++
j) {
147 const bool l1Tech(pset.
getParameter<
bool>(
"L1TechTriggerSeeding"));
148 const string l1Seed(pset.
getParameter<
string>(
"L1SeedsLogicalExpression"));
159 sort(streamNames_.begin(),streamNames_.end());
160 const unsigned int n(streamNames_.size());
162 for (
unsigned int i=0;
i!=
n; ++
i) {
174 sort(datasetNames_.begin(),datasetNames_.end());
175 const unsigned int n(datasetNames_.size());
177 for (
unsigned int i=0;
i!=
n; ++
i) {
187 string prescaleName(
"");
188 const string preS(
"PrescaleService");
189 const string preT(
"PrescaleTable");
195 if (prescaleName==
"") {
199 string defaultLabel(
"default");
200 if (iPS.existsAs<
string>(
"lvl1DefaultLabel",
true)) {
201 defaultLabel = iPS.getParameter<
string>(
"lvl1DefaultLabel");
204 if (iPS.existsAs<vector<string> >(
"lvl1Labels",
true)) {
205 labels = iPS.getParameter<vector<string> >(
"lvl1Labels");
208 const unsigned int n(labels.size());
209 for (
unsigned int i=0;
i!=
n; ++
i) {
210 if (labels[
i]==defaultLabel) set=
i;
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");
236 if (what==
"ProcessPSet") {
237 cout <<
"HLTConfigData::dump: ProcessPSet = " << endl << *
processPSet_ << endl;
238 }
else if (what==
"ProcessName") {
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) {
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) {
256 for (
unsigned int j=0;
j!=
m; ++
j) {
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));
268 cout <<
" - Modules: ";
269 unsigned int nHLTPrescalers(0);
270 unsigned int nHLTLevel1GTSeed(0);
271 for (
unsigned int j=0;
j!=
m; ++
j) {
276 cout <<
" " << j <<
":" << label <<
"/" << type <<
"/" << edmtype <<
"/" <<
tags;
277 if (type==
"HLTPrescaler") nHLTPrescalers++;
278 if (type==
"HLTLevel1GTSeed") nHLTLevel1GTSeed++;
281 cout <<
" - Number of HLTPrescaler/HLTLevel1GTSeed modules: "
282 << nHLTPrescalers <<
"/" << nHLTLevel1GTSeed << endl;
284 }
else if (what==
"StreamNames") {
286 cout <<
"HLTConfigData::dump: StreamNames: " <<
n << endl;
287 for (
unsigned int i=0;
i!=
n; ++
i) {
290 }
else if (what==
"Streams") {
292 cout <<
"HLTConfigData::dump: Streams: " <<
n << endl;
293 for (
unsigned int i=0;
i!=
n; ++
i) {
296 for (
unsigned int j=0;
j!=
m; ++
j) {
300 }
else if (what==
"DatasetNames") {
302 cout <<
"HLTConfigData::dump: DatasetNames: " <<
n << endl;
303 for (
unsigned int i=0;
i!=
n; ++
i) {
306 }
else if (what==
"Datasets") {
308 cout <<
"HLTConfigData::dump: Datasets: " <<
n << endl;
309 for (
unsigned int i=0;
i!=
n; ++
i) {
312 for (
unsigned int j=0;
j!=
m; ++
j) {
316 }
else if (what==
"PrescaleTable") {
318 cout <<
"HLTConfigData::dump: PrescaleTable: # of sets : " <<
n << endl;
320 for (
unsigned int i=0;
i!=
n; ++
i) {
323 if (
n>0)
cout << endl;
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);
332 cout <<
" " << ti->first << endl;
335 cout <<
"HLTConfigData::dump: Unkown dump request: " << what << endl;
368 const std::map<std::string,unsigned int>::const_iterator
index(
triggerIndex_.find(trigger));
372 return index->second;
398 const std::map<std::string,unsigned int>::const_iterator
index(
moduleIndex_.at(trigger).find(module));
400 return size(trigger);
402 return index->second;
441 if (pset.
existsAs<
bool>(
"saveTags",
true)) {
470 const std::map<std::string,unsigned int>::const_iterator
index(
streamIndex_.find(stream));
474 return index->second;
500 const std::map<std::string,unsigned int>::const_iterator
index(
datasetIndex_.find(dataset));
504 return index->second;
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
std::vector< std::map< std::string, unsigned int > > moduleIndex_
const std::string & streamName(unsigned int stream) const
name of stream with index i
ParameterSetID id() const
std::map< std::string, unsigned int > datasetIndex_
The single EDProduct containing the HLT Prescale Table.
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
bool exists(std::string const ¶meterName) 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
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
const std::vector< std::string > & datasetNames() const
Datasets.
const std::map< std::string, std::vector< unsigned int > > & table() const
std::vector< std::vector< std::string > > saveTagsModules_
const std::vector< std::string > & streamNames() const
Streams.
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
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_
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
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
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
static const edm::ParameterSet initializeDummyPSet()
const std::string moduleType(const std::string &module) const
C++ class name of module.
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 - size-1)
void extract()
extract information into data members - called by init() methods
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 - size-1)
const std::string & processName() const
Accessors (const methods)
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::string & tableName() const
HLT ConfDB table name.
const std::map< std::string, std::vector< unsigned int > > & prescaleTable() const
const edm::ParameterSet * processPSet_
const edm::ParameterSet & processPSet() const
ParameterSet of process.
ParameterSet const & getParameterSet(std::string const &) const
unsigned int prescaleSize() const
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
unsigned int datasetIndex(const std::string &dataset) const
index of dataset with name
const std::vector< std::string > & prescaleLabels() const
low-level data member access
std::vector< std::string > streamNames_
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
std::map< std::string, unsigned int > streamIndex_
unsigned int size() const
consistency condition: all vectors must have the same length
const std::string & triggerName(unsigned int triggerIndex) const
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
ParameterSet const & registerIt()
static const edm::ParameterSet * s_dummyPSet()
void dump(const std::string &what) const
Dumping config info to cout.
const std::string & globalTag() const
GlobalTag.globaltag.