CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTConfigProvider.h
Go to the documentation of this file.
1 #ifndef HLTcore_HLTConfigProvider_h
2 #define HLTcore_HLTConfigProvider_h
3 
19 
22 
23 #include "boost/shared_ptr.hpp"
24 
25 #include<map>
26 #include<string>
27 #include<vector>
28 
29 
30 //
31 // class declaration
32 //
33 
35 
36  public:
39 
40  public:
44  bool init(const edm::Run& iRun, const edm::EventSetup& iSetup,
45  const std::string& processName, bool& changed);
46 
48  void dump(const std::string& what) const {
49  hltConfigData_->dump(what);
50  }
51 
53 
55  const std::string& processName() const {
56  return processName_;
57  }
59  const bool inited() const {
60  return inited_;
61  }
63  const bool changed() const {
64  return changed_;
65  }
66 
68  unsigned int size() const {
69  return hltConfigData_->size();
70  }
72  unsigned int size(unsigned int trigger) const {
73  return hltConfigData_->size(trigger);
74  }
75  unsigned int size(const std::string& trigger) const {
76  return hltConfigData_->size(trigger);
77  }
78 
80  const std::string& tableName() const {
81  return hltConfigData_->tableName();
82  }
83 
85  const std::vector<std::string>& triggerNames() const {
86  return hltConfigData_->triggerNames();
87  }
88  const std::string& triggerName(unsigned int triggerIndex) const {
89  return hltConfigData_->triggerName(triggerIndex);
90  }
91 
93  unsigned int triggerIndex(const std::string& triggerName) const {
94  return hltConfigData_->triggerIndex(triggerName);
95  }
96 
98  const std::vector<std::string>& moduleLabels(unsigned int trigger) const {
99  return hltConfigData_->moduleLabels(trigger);
100  }
101  const std::vector<std::string>& moduleLabels(const std::string& trigger) const {
102  return hltConfigData_->moduleLabels(trigger);
103  }
104  const std::string& moduleLabel(unsigned int trigger, unsigned int module) const {
105  return hltConfigData_->moduleLabel(trigger,module);
106  }
107  const std::string& moduleLabel(const std::string& trigger, unsigned int module) const {
108  return hltConfigData_->moduleLabel(trigger,module);
109  }
110 
112  unsigned int moduleIndex(unsigned int trigger, const std::string& module) const {
113  return hltConfigData_->moduleIndex(trigger,module);
114  }
115  unsigned int moduleIndex(const std::string& trigger, const std::string& module) const {
116  return hltConfigData_->moduleIndex(trigger,module);
117  }
118 
120  const std::string moduleType(const std::string& module) const {
121  return hltConfigData_->moduleType(module);
122  }
123 
125  const std::string moduleEDMType(const std::string& module) const {
126  return hltConfigData_->moduleEDMType(module);
127  }
128 
131  return hltConfigData_->processPSet();
132  }
133 
135  const edm::ParameterSet& modulePSet(const std::string& module) const {
136  return hltConfigData_->modulePSet(module);
137  }
138 
139 
142  const std::vector<std::vector<std::pair<bool,std::string> > >& hltL1GTSeeds() const {
143  return hltConfigData_->hltL1GTSeeds();
144  }
146  const std::vector<std::pair<bool,std::string> >& hltL1GTSeeds(const std::string& trigger) const {
147  return hltConfigData_->hltL1GTSeeds(trigger);
148  }
150  const std::vector<std::pair<bool,std::string> >& hltL1GTSeeds(unsigned int trigger) const {
151  return hltConfigData_->hltL1GTSeeds(trigger);
152  }
153 
154 
157  const std::vector<std::string>& streamNames() const {
158  return hltConfigData_->streamNames();
159  }
161  const std::string& streamName(unsigned int stream) const {
162  return hltConfigData_->streamName(stream);
163  }
165  unsigned int streamIndex(const std::string& stream) const {
166  return hltConfigData_->streamIndex(stream);
167  }
169  const std::vector<std::vector<std::string> >& streamContents() const {
170  return hltConfigData_->streamContents();
171  }
173  const std::vector<std::string>& streamContent(unsigned int stream) const {
174  return hltConfigData_->streamContent(stream);
175  }
177  const std::vector<std::string>& streamContent(const std::string& stream) const {
178  return hltConfigData_->streamContent(stream);
179  }
180 
181 
184  const std::vector<std::string>& datasetNames() const {
185  return hltConfigData_->datasetNames();
186  }
188  const std::string& datasetName(unsigned int dataset) const {
189  return hltConfigData_->datasetName(dataset);
190  }
192  unsigned int datasetIndex(const std::string& dataset) const {
193  return hltConfigData_->datasetIndex(dataset);
194  }
196  const std::vector<std::vector<std::string> >& datasetContents() const {
198  }
200  const std::vector<std::string>& datasetContent(unsigned int dataset) const {
201  return hltConfigData_->datasetContent(dataset);
202  }
204  const std::vector<std::string>& datasetContent(const std::string& dataset) const {
205  return hltConfigData_->datasetContent(dataset);
206  }
207 
208 
211  unsigned int prescaleSize() const {
212  return hltConfigData_->prescaleSize();
213  }
215  unsigned int prescaleValue(unsigned int set, const std::string& trigger) const {
216  return hltConfigData_->prescaleValue(set,trigger);
217  }
218 
221  int prescaleSet(const edm::Event& iEvent, const edm::EventSetup& iSetup) const;
222  // negative == error
223 
225  unsigned int prescaleValue(const edm::Event& iEvent, const edm::EventSetup& iSetup, const std::string& trigger) const;
226 
228  std::pair<int,int> prescaleValues(const edm::Event& iEvent, const edm::EventSetup& iSetup, const std::string& trigger) const;
229  // any one negative => error in retrieving this (L1T or HLT) prescale
230 
231 
233  const std::vector<std::string>& prescaleLabels() const {
234  return hltConfigData_->prescaleLabels();
235  }
236  const std::map<std::string,std::vector<unsigned int> >& prescaleTable() const {
237  return hltConfigData_->prescaleTable();
238  }
239 
240 
241  private:
242 
243  void getDataFrom(const edm::ParameterSetID& iID, const std::string& iProcessName );
244  void init(const edm::ProcessHistory& iHistory, const std::string& processName);
245  void init(const std::string& processName);
246  void clear();
247 
249  std::string processName_;
250  bool inited_;
251  bool changed_;
253  boost::shared_ptr<L1GtUtils> l1GtUtils_;
254 
255 };
256 #endif
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
unsigned int moduleIndex(const std::string &trigger, const std::string &module) const
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::vector< std::vector< std::string > > & streamContents() const
names of datasets for all streams
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
const std::string & triggerName(unsigned int triggerIndex) const
const std::vector< std::string > & datasetContent(const std::string &dataset) const
names of trigger paths in dataset with name
const std::string & streamName(unsigned int stream) const
name of stream with index i
const std::vector< std::pair< bool, std::string > > & hltL1GTSeeds(const std::string &trigger) const
HLTLevel1GTSeed modules for trigger path with name.
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< std::string > & triggerNames() const
names of trigger paths
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
const std::string & datasetName(unsigned int dataset) const
name of dataset with index i
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
const bool changed() const
changed?
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::string & tableName() const
HLT ConfDB table name.
unsigned int size(const std::string &trigger) const
const edm::ParameterSet & modulePSet(const std::string &module) const
ParameterSet of module.
std::string processName_
data members
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::vector< std::string > & datasetNames() const
Datasets.
const std::map< std::string, std::vector< unsigned int > > & prescaleTable() const
const std::string & moduleLabel(unsigned int trigger, unsigned int module) const
const HLTConfigData * hltConfigData_
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 > & streamNames() const
Streams.
boost::shared_ptr< L1GtUtils > l1GtUtils_
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
int iEvent
Definition: GenABIO.cc:243
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
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 > & streamNames() const
const edm::ParameterSet & processPSet() const
ParameterSet of process.
const std::string & moduleLabel(const std::string &trigger, unsigned int module) const
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 > > & 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 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)
HLTConfigProvider()
c&#39;tor
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 - size-1)
const bool inited() const
initialised?
const std::string & processName() const
Accessors (const methods)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
unsigned int streamIndex(const std::string &stream) const
index of stream with name
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
const std::string & tableName() const
HLT ConfDB table name.
const std::map< std::string, std::vector< unsigned int > > & prescaleTable() const
const std::vector< std::pair< bool, std::string > > & hltL1GTSeeds(unsigned int trigger) const
HLTLevel1GTSeed modules for trigger path with index i.
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup) const
const edm::ParameterSet & processPSet() const
ParameterSet of process.
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
unsigned int size(unsigned int trigger) const
number of modules on a specific trigger path
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
unsigned int prescaleSize() const
const std::vector< std::string > & prescaleLabels() const
low-level data member access
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::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
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
const std::string & streamName(unsigned int stream) const
name of stream with index i
const std::vector< std::string > & streamContent(const std::string &stream) const
names of datasets in stream with name
unsigned int prescaleSize() const
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
void getDataFrom(const edm::ParameterSetID &iID, const std::string &iProcessName)
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
Definition: vlib.h:209
const std::vector< std::string > & moduleLabels(const std::string &trigger) const
void dump(const std::string &what) const
Dumping config info to cout.
Definition: Run.h:31
const std::vector< std::string > & datasetNames() const