CMS 3D CMS Logo

HLTConfigProvider.h
Go to the documentation of this file.
1 #ifndef HLTcore_HLTConfigProvider_h
2 #define HLTcore_HLTConfigProvider_h
3 
17 
20 
21 #include <map>
22 #include <string>
23 #include <vector>
24 #include <type_traits>
25 
26 //
27 // class declaration
28 //
29 
31 private:
32 public:
36  // ~HLTConfigProvider();
37 
38 public:
42  bool init(const edm::Run& iRun, const edm::EventSetup& iSetup, const std::string& processName, bool& changed);
43 
45  void dump(const std::string& what) const { hltConfigData_->dump(what); }
46 
48 
50  bool inited() const { return inited_; }
52  bool changed() const { return changed_; }
53 
55  const std::string& processName() const { return hltConfigData_->processName(); }
56 
58  const std::string& globalTag() const { return hltConfigData_->globalTag(); }
59 
61  const std::string& tableName() const { return hltConfigData_->tableName(); }
62 
64  unsigned int size() const { return hltConfigData_->size(); }
66  unsigned int size(unsigned int trigger) const { return hltConfigData_->size(trigger); }
67  unsigned int size(const std::string& trigger) const { return hltConfigData_->size(trigger); }
68 
70  const std::vector<std::string>& triggerNames() const { return hltConfigData_->triggerNames(); }
72 
75 
77  const std::vector<std::string>& moduleLabels(unsigned int trigger) const {
79  }
80  const std::vector<std::string>& moduleLabels(const std::string& trigger) const {
82  }
83  const std::vector<std::string>& saveTagsModules(unsigned int trigger) const {
85  }
86  const std::vector<std::string>& saveTagsModules(const std::string& trigger) const {
88  }
89  const std::string& moduleLabel(unsigned int trigger, unsigned int module) const {
91  }
92  const std::string& moduleLabel(const std::string& trigger, unsigned int module) const {
94  }
95 
97  unsigned int moduleIndex(unsigned int trigger, const std::string& module) const {
99  }
100  unsigned int moduleIndex(const std::string& trigger, const std::string& module) const {
102  }
103 
106 
109 
112 
115 
117  bool saveTags(const std::string& module) const { return hltConfigData_->saveTags(module); }
118 
120  unsigned int l1tType() const { return hltConfigData_->l1tType(); }
121 
124  const std::vector<std::vector<std::pair<bool, std::string>>>& hltL1GTSeeds() const {
125  return hltConfigData_->hltL1GTSeeds();
126  }
128  const std::vector<std::pair<bool, std::string>>& hltL1GTSeeds(const std::string& trigger) const {
130  }
132  const std::vector<std::pair<bool, std::string>>& hltL1GTSeeds(unsigned int trigger) const {
134  }
135 
138  const std::vector<std::vector<std::string>>& hltL1TSeeds() const { return hltConfigData_->hltL1TSeeds(); }
140  const std::vector<std::string>& hltL1TSeeds(const std::string& trigger) const {
142  }
144  const std::vector<std::string>& hltL1TSeeds(unsigned int trigger) const {
146  }
147 
150  const std::vector<std::string>& streamNames() const { return hltConfigData_->streamNames(); }
152  const std::string& streamName(unsigned int stream) const { return hltConfigData_->streamName(stream); }
154  unsigned int streamIndex(const std::string& stream) const { return hltConfigData_->streamIndex(stream); }
156  const std::vector<std::vector<std::string>>& streamContents() const { return hltConfigData_->streamContents(); }
158  const std::vector<std::string>& streamContent(unsigned int stream) const {
160  }
162  const std::vector<std::string>& streamContent(const std::string& stream) const {
164  }
165 
168  const std::vector<std::string>& datasetNames() const { return hltConfigData_->datasetNames(); }
170  const std::string& datasetName(unsigned int dataset) const { return hltConfigData_->datasetName(dataset); }
172  unsigned int datasetIndex(const std::string& dataset) const { return hltConfigData_->datasetIndex(dataset); }
174  const std::vector<std::vector<std::string>>& datasetContents() const { return hltConfigData_->datasetContents(); }
176  const std::vector<std::string>& datasetContent(unsigned int dataset) const {
178  }
180  const std::vector<std::string>& datasetContent(const std::string& dataset) const {
182  }
183 
186  unsigned int prescaleSize() const { return hltConfigData_->prescaleSize(); }
188  template <typename T = unsigned int>
189  T prescaleValue(unsigned int set, const std::string& trigger) const {
190  static_assert(std::is_same_v<T, double> or std::is_same_v<T, FractionalPrescale>,
191  "\n\tPlease use prescaleValue<double> or prescaleValue<FractionalPrescale>"
192  "\n\t(other types for HLT prescales are not supported anymore by HLTConfigProvider)");
193  return hltConfigData_->prescaleValue<T>(set, trigger);
194  }
195 
197  const std::vector<std::string>& prescaleLabels() const { return hltConfigData_->prescaleLabels(); }
198 
199  template <typename T = unsigned int>
200  std::map<std::string, std::vector<T>> const& prescaleTable() const {
201  static_assert(std::is_same_v<T, double> or std::is_same_v<T, FractionalPrescale>,
202  "\n\tPlease use prescaleTable<double> or prescaleTable<FractionalPrescale>"
203  "\n\t(other types for HLT prescales are not supported anymore by HLTConfigProvider)");
204  return hltConfigData_->prescaleTable<T>();
205  }
206 
208  static const std::vector<std::string> matched(const std::vector<std::string>& inputs, const std::string& pattern);
209  static const std::string removeVersion(const std::string& trigger);
210  static const std::vector<std::string> restoreVersion(const std::vector<std::string>& inputs,
211  const std::string& trigger);
212 
213 private:
214  void getDataFrom(const edm::ParameterSetID& iID);
215  void init(const edm::ProcessHistory& iHistory, const std::string& processName);
216  void init(const std::string& processName);
217  void clear();
218 
221  bool inited_;
222  bool changed_;
224 };
225 #endif
const std::string & triggerName(unsigned int triggerIndex) const
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::vector< std::string > & hltL1TSeeds(unsigned int trigger) const
HLTL1TSeed modules for trigger path with index i.
const std::string & streamName(unsigned int stream) const
name of stream with index i
static const std::vector< std::string > matched(const std::vector< std::string > &inputs, const std::string &pattern)
regexp processing
unsigned int prescaleSize() const
void dump(const std::string &what) const
Dumping config info to cout.
const std::vector< std::string > & hltL1TSeeds(const std::string &trigger) const
HLTL1TSeed modules for trigger path with name.
const std::string & processName() const
Accessors (const methods)
void getDataFrom(const edm::ParameterSetID &iID)
const std::vector< std::string > & streamNames() const
Streams.
const std::string & globalTag() const
global tag
std::map< std::string, std::vector< T > > const & prescaleTable() const
map of HLT prescales by trigger-path name (key=path, value=prescales)
const std::string & moduleEDMType(const std::string &module) const
C++ base class name of module.
const std::vector< std::vector< std::string > > & hltL1TSeeds() const
const std::string & moduleType(const std::string &module) const
C++ class name of module.
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
const std::vector< std::string > & datasetContent(const std::string &dataset) const
names of trigger paths in dataset with name
std::string processName_
data members
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
bool inited() const
Accessors (const methods)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
static const std::string removeVersion(const std::string &trigger)
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
T prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
const HLTConfigData * hltConfigData_
std::map< std::string, std::vector< T > > const & prescaleTable() const
const std::string & tableName() const
HLT ConfDB table name.
unsigned int l1tType() const
L1T type (0=unknown, 1=legacy/stage-1 or 2=stage-2)
const edm::ParameterSet & processPSet() const
ParameterSet of process.
unsigned int size(const std::string &trigger) const
void dump(const std::string &what) const
Dumping config info to cout.
unsigned int moduleIndex(const std::string &trigger, const std::string &module) const
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
unsigned int size() const
number of trigger paths in trigger table
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
unsigned int datasetIndex(const std::string &dataset) const
index of dataset with name
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
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::string & streamName(unsigned int stream) const
name of stream with index i
const std::vector< std::string > & prescaleLabels() const
low-level data member access
unsigned int streamIndex(const std::string &stream) const
index of stream with name
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
const std::vector< std::string > & prescaleLabels() const
labels of HLT prescale columns
HLTConfigProvider()
c&#39;tor
const std::vector< std::string > & datasetNames() const
Datasets.
const std::string & moduleEDMType(const std::string &module) const
C++ base class name of module.
const std::vector< std::string > & triggerNames() const
names of trigger paths
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
const std::vector< std::string > & moduleLabels(const std::string &trigger) const
unsigned int size(unsigned int trigger) const
number of modules on a specific trigger path
bool changed() const
changed?
const std::string & moduleType(const std::string &module) const
C++ class name of module.
static const std::vector< std::string > restoreVersion(const std::vector< std::string > &inputs, const std::string &trigger)
const std::string & moduleLabel(const std::string &trigger, unsigned int module) const
unsigned int l1tType() const
L1T type (0=unknown, 1=legacy/stage-1 or 2=stage-2)
const std::string & processName() const
process name
const std::string & globalTag() const
GlobalTag.globaltag.
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::vector< std::pair< bool, std::string > > & hltL1GTSeeds(unsigned int trigger) const
HLTLevel1GTSeed modules for trigger path with index i.
const std::vector< std::string > & saveTagsModules(const std::string &trigger) const
const std::vector< std::string > & streamNames() const
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
unsigned int streamIndex(const std::string &stream) const
index of stream with name
unsigned int size() const
number of trigger paths in trigger table
unsigned int prescaleSize() const
const std::string & tableName() const
HLT ConfDB table name.
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
const std::vector< std::vector< std::string > > & hltL1TSeeds() const
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
const std::vector< std::string > & streamContent(const std::string &stream) const
names of datasets in stream with name
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::string > & datasetNames() const
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
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const
const std::vector< std::pair< bool, std::string > > & hltL1GTSeeds(const std::string &trigger) const
HLTLevel1GTSeed modules for trigger path with name.
Definition: Run.h:45
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.
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i