CMS 3D CMS Logo

HLTConfigData.h
Go to the documentation of this file.
1 #ifndef HLTrigger_HLTcore_HLTConfigData_h
2 #define HLTrigger_HLTcore_HLTConfigData_h
3 
17 
18 #include <map>
19 #include <string>
20 #include <vector>
21 #include <type_traits>
22 
23 //
24 // class declaration
25 //
26 
28 public:
29  HLTConfigData();
30  HLTConfigData(const edm::ParameterSet* iID);
31 
32 private:
34  void extract();
35 
36 public:
38  void dump(const std::string& what) const;
39 
41 
43  const std::string& processName() const;
44 
46  const std::string& globalTag() const;
47 
49  const std::string& tableName() const;
50 
52  unsigned int size() const;
54  unsigned int size(unsigned int trigger) const;
55  unsigned int size(const std::string& trigger) const;
56 
58  const std::vector<std::string>& triggerNames() const;
59  const std::string& triggerName(unsigned int triggerIndex) const;
60 
62  unsigned int triggerIndex(const std::string& triggerName) const;
63 
65  const std::vector<std::string>& moduleLabels(unsigned int trigger) const;
66  const std::vector<std::string>& moduleLabels(const std::string& trigger) const;
67  const std::vector<std::string>& saveTagsModules(unsigned int trigger) const;
68  const std::vector<std::string>& saveTagsModules(const std::string& trigger) const;
69  const std::string& moduleLabel(unsigned int trigger, unsigned int module) const;
70  const std::string& moduleLabel(const std::string& trigger, unsigned int module) const;
71 
73  unsigned int moduleIndex(unsigned int trigger, const std::string& module) const;
74  unsigned int moduleIndex(const std::string& trigger, const std::string& module) const;
75 
77  const std::string moduleType(const std::string& module) const;
78 
80  const std::string moduleEDMType(const std::string& module) const;
81 
83  const edm::ParameterSet& processPSet() const;
84 
86  const edm::ParameterSet& modulePSet(const std::string& module) const;
87 
89  bool saveTags(const std::string& module) const;
90 
92  unsigned int l1tType() const;
93 
96  const std::vector<std::vector<std::pair<bool, std::string>>>& hltL1GTSeeds() const;
98  const std::vector<std::pair<bool, std::string>>& hltL1GTSeeds(const std::string& trigger) const;
100  const std::vector<std::pair<bool, std::string>>& hltL1GTSeeds(unsigned int trigger) const;
101 
104  const std::vector<std::vector<std::string>>& hltL1TSeeds() const;
106  const std::vector<std::string>& hltL1TSeeds(const std::string& trigger) const;
108  const std::vector<std::string>& hltL1TSeeds(unsigned int trigger) const;
109 
112  const std::vector<std::string>& streamNames() const;
114  const std::string& streamName(unsigned int stream) const;
116  unsigned int streamIndex(const std::string& stream) const;
118  const std::vector<std::vector<std::string>>& streamContents() const;
120  const std::vector<std::string>& streamContent(unsigned int stream) const;
122  const std::vector<std::string>& streamContent(const std::string& stream) const;
123 
126  const std::vector<std::string>& datasetNames() const;
128  const std::string& datasetName(unsigned int dataset) const;
130  unsigned int datasetIndex(const std::string& dataset) const;
132  const std::vector<std::vector<std::string>>& datasetContents() const;
134  const std::vector<std::string>& datasetContent(unsigned int dataset) const;
136  const std::vector<std::string>& datasetContent(const std::string& dataset) const;
137 
140  unsigned int prescaleSize() const;
142  template <typename T = unsigned int>
143  T prescaleValue(unsigned int set, const std::string& trigger) const;
145  const std::vector<std::string>& prescaleLabels() const;
147  template <typename T = unsigned int>
148  std::map<std::string, std::vector<T>> const& prescaleTable() const;
149 
151  edm::ParameterSetID id() const;
152 
153 private:
155 
159  std::vector<std::string> triggerNames_;
160  std::vector<std::vector<std::string>> moduleLabels_;
161  std::vector<std::vector<std::string>> saveTagsModules_;
162 
163  std::map<std::string, unsigned int> triggerIndex_;
164  std::vector<std::map<std::string, unsigned int>> moduleIndex_;
165 
166  unsigned int l1tType_;
167  std::vector<std::vector<std::pair<bool, std::string>>> hltL1GTSeeds_;
168  std::vector<std::vector<std::string>> hltL1TSeeds_;
169 
170  std::vector<std::string> streamNames_;
171  std::map<std::string, unsigned int> streamIndex_;
172  std::vector<std::vector<std::string>> streamContents_;
173 
174  std::vector<std::string> datasetNames_;
175  std::map<std::string, unsigned int> datasetIndex_;
176  std::vector<std::vector<std::string>> datasetContents_;
177 
179  std::map<std::string, std::vector<double>> hltPrescaleTableValuesDouble_;
180  std::map<std::string, std::vector<FractionalPrescale>> hltPrescaleTableValuesFractional_;
181 };
182 
183 template <typename T>
184 T HLTConfigData::prescaleValue(unsigned int set, const std::string& trigger) const {
185  static_assert(std::is_same_v<T, double> or std::is_same_v<T, FractionalPrescale>,
186  "\n\tPlease use prescaleValue<double> or prescaleValue<FractionalPrescale>"
187  "\n\t(other types for HLT prescales are not supported anymore by HLTConfigData)");
188  return hltPrescaleTable_.prescale(set, trigger);
189 }
190 
191 template <typename T>
192 std::map<std::string, std::vector<T>> const& HLTConfigData::prescaleTable() const {
193  static_assert(std::is_same_v<T, double> or std::is_same_v<T, FractionalPrescale>,
194  "\n\tPlease use prescaleTable<double> or prescaleTable<FractionalPrescale>"
195  "\n\t(other types for HLT prescales are not supported anymore by HLTConfigData)");
196  return hltPrescaleTable_.table();
197 }
198 
199 template <>
200 std::map<std::string, std::vector<double>> const& HLTConfigData::prescaleTable() const;
201 
202 template <>
203 std::map<std::string, std::vector<FractionalPrescale>> const& HLTConfigData::prescaleTable() const;
204 
205 #endif // HLTrigger_HLTcore_HLTConfigData_h
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
const std::string & streamName(unsigned int stream) const
name of stream with index i
std::map< std::string, unsigned int > triggerIndex_
void dump(const std::string &what) const
Dumping config info to cout.
const std::string & processName() const
Accessors (const methods)
const std::vector< std::string > & streamNames() const
Streams.
edm::ParameterSetID id() const
technical: id() function needed for use with ThreadSafeRegistry
std::map< std::string, std::vector< T > > const & prescaleTable() const
map of HLT prescales by trigger-path name (key=path, value=prescales)
The single EDProduct containing the HLT Prescale Table.
std::vector< std::string > datasetNames_
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 > > & streamContents() const
names of datasets for all streams
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 - size-1)
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
std::vector< std::vector< std::string > > saveTagsModules_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
const std::string & tableName() const
HLT ConfDB table name.
std::vector< std::map< std::string, unsigned int > > moduleIndex_
std::string globalTag_
unsigned int prescale(const std::string &trigger) const
high-level user access method: prescale for given trigger path
std::vector< std::vector< std::string > > streamContents_
std::vector< std::string > triggerNames_
const std::map< std::string, std::vector< unsigned int > > & table() const
std::vector< std::vector< std::string > > datasetContents_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
std::string tableName_
trigger::HLTPrescaleTable hltPrescaleTable_
std::vector< std::vector< std::string > > moduleLabels_
std::map< std::string, unsigned int > streamIndex_
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::vector< std::string > & prescaleLabels() const
labels of HLT prescale columns
void extract()
extract information into data members - called by init() methods
const std::vector< std::string > & datasetNames() const
Datasets.
std::vector< std::vector< std::string > > hltL1TSeeds_
std::map< std::string, unsigned int > datasetIndex_
std::map< std::string, std::vector< FractionalPrescale > > hltPrescaleTableValuesFractional_
const std::vector< std::string > & triggerNames() const
names of trigger paths
const edm::ParameterSet * processPSet_
std::map< std::string, std::vector< double > > hltPrescaleTableValuesDouble_
std::vector< std::vector< std::pair< bool, std::string > > > hltL1GTSeeds_
unsigned int l1tType() const
L1T type (0=unknown, 1=legacy/stage-1 or 2=stage-2)
const std::string & globalTag() const
GlobalTag.globaltag.
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
unsigned int size() const
number of trigger paths in trigger table
unsigned int prescaleSize() const
const std::vector< std::vector< std::string > > & hltL1TSeeds() const
std::vector< std::string > streamNames_
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::string moduleEDMType(const std::string &module) const
C++ base class name of module.
long double T
const edm::ParameterSet & processPSet() const
ParameterSet of process.
unsigned int datasetIndex(const std::string &dataset) const
index of dataset with name
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
std::string processName_
unsigned int l1tType_
const std::string & triggerName(unsigned int triggerIndex) const
T prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.