Go to the documentation of this file.00001 #ifndef HLTcore_HLTConfigProvider_h
00002 #define HLTcore_HLTConfigProvider_h
00003
00016 #include "FWCore/Framework/interface/Run.h"
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/Framework/interface/LuminosityBlock.h"
00019
00020 #include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtUtils.h"
00021 #include "HLTrigger/HLTcore/interface/HLTConfigData.h"
00022
00023 #include "boost/shared_ptr.hpp"
00024
00025 #include<map>
00026 #include<string>
00027 #include<vector>
00028
00029
00030
00031
00032
00033
00034 class HLTConfigProvider {
00035
00036 public:
00038 HLTConfigProvider();
00039
00040 public:
00044 bool init(const edm::Run& iRun, const edm::EventSetup& iSetup,
00045 const std::string& processName, bool& changed);
00046
00048 void dump(const std::string& what) const {
00049 hltConfigData_->dump(what);
00050 }
00051
00053
00055 const std::string& processName() const {
00056 return processName_;
00057 }
00059 const bool inited() const {
00060 return inited_;
00061 }
00063 const bool changed() const {
00064 return changed_;
00065 }
00066
00068 unsigned int size() const {
00069 return hltConfigData_->size();
00070 }
00072 unsigned int size(unsigned int trigger) const {
00073 return hltConfigData_->size(trigger);
00074 }
00075 unsigned int size(const std::string& trigger) const {
00076 return hltConfigData_->size(trigger);
00077 }
00078
00080 const std::string& tableName() const {
00081 return hltConfigData_->tableName();
00082 }
00083
00085 const std::vector<std::string>& triggerNames() const {
00086 return hltConfigData_->triggerNames();
00087 }
00088 const std::string& triggerName(unsigned int triggerIndex) const {
00089 return hltConfigData_->triggerName(triggerIndex);
00090 }
00091
00093 unsigned int triggerIndex(const std::string& triggerName) const {
00094 return hltConfigData_->triggerIndex(triggerName);
00095 }
00096
00098 const std::vector<std::string>& moduleLabels(unsigned int trigger) const {
00099 return hltConfigData_->moduleLabels(trigger);
00100 }
00101 const std::vector<std::string>& moduleLabels(const std::string& trigger) const {
00102 return hltConfigData_->moduleLabels(trigger);
00103 }
00104 const std::string& moduleLabel(unsigned int trigger, unsigned int module) const {
00105 return hltConfigData_->moduleLabel(trigger,module);
00106 }
00107 const std::string& moduleLabel(const std::string& trigger, unsigned int module) const {
00108 return hltConfigData_->moduleLabel(trigger,module);
00109 }
00110
00112 unsigned int moduleIndex(unsigned int trigger, const std::string& module) const {
00113 return hltConfigData_->moduleIndex(trigger,module);
00114 }
00115 unsigned int moduleIndex(const std::string& trigger, const std::string& module) const {
00116 return hltConfigData_->moduleIndex(trigger,module);
00117 }
00118
00120 const std::string moduleType(const std::string& module) const {
00121 return hltConfigData_->moduleType(module);
00122 }
00123
00125 const std::string moduleEDMType(const std::string& module) const {
00126 return hltConfigData_->moduleEDMType(module);
00127 }
00128
00130 const edm::ParameterSet& processPSet() const {
00131 return hltConfigData_->processPSet();
00132 }
00133
00135 const edm::ParameterSet& modulePSet(const std::string& module) const {
00136 return hltConfigData_->modulePSet(module);
00137 }
00138
00139
00142 const std::vector<std::vector<std::pair<bool,std::string> > >& hltL1GTSeeds() const {
00143 return hltConfigData_->hltL1GTSeeds();
00144 }
00146 const std::vector<std::pair<bool,std::string> >& hltL1GTSeeds(const std::string& trigger) const {
00147 return hltConfigData_->hltL1GTSeeds(trigger);
00148 }
00150 const std::vector<std::pair<bool,std::string> >& hltL1GTSeeds(unsigned int trigger) const {
00151 return hltConfigData_->hltL1GTSeeds(trigger);
00152 }
00153
00154
00157 const std::vector<std::string>& streamNames() const {
00158 return hltConfigData_->streamNames();
00159 }
00161 const std::string& streamName(unsigned int stream) const {
00162 return hltConfigData_->streamName(stream);
00163 }
00165 unsigned int streamIndex(const std::string& stream) const {
00166 return hltConfigData_->streamIndex(stream);
00167 }
00169 const std::vector<std::vector<std::string> >& streamContents() const {
00170 return hltConfigData_->streamContents();
00171 }
00173 const std::vector<std::string>& streamContent(unsigned int stream) const {
00174 return hltConfigData_->streamContent(stream);
00175 }
00177 const std::vector<std::string>& streamContent(const std::string& stream) const {
00178 return hltConfigData_->streamContent(stream);
00179 }
00180
00181
00184 const std::vector<std::string>& datasetNames() const {
00185 return hltConfigData_->datasetNames();
00186 }
00188 const std::string& datasetName(unsigned int dataset) const {
00189 return hltConfigData_->datasetName(dataset);
00190 }
00192 unsigned int datasetIndex(const std::string& dataset) const {
00193 return hltConfigData_->datasetIndex(dataset);
00194 }
00196 const std::vector<std::vector<std::string> >& datasetContents() const {
00197 return hltConfigData_->datasetContents();
00198 }
00200 const std::vector<std::string>& datasetContent(unsigned int dataset) const {
00201 return hltConfigData_->datasetContent(dataset);
00202 }
00204 const std::vector<std::string>& datasetContent(const std::string& dataset) const {
00205 return hltConfigData_->datasetContent(dataset);
00206 }
00207
00208
00211 unsigned int prescaleSize() const {
00212 return hltConfigData_->prescaleSize();
00213 }
00215 unsigned int prescaleValue(unsigned int set, const std::string& trigger) const {
00216 return hltConfigData_->prescaleValue(set,trigger);
00217 }
00218
00221 int prescaleSet(const edm::Event& iEvent, const edm::EventSetup& iSetup) const;
00222
00223
00225 unsigned int prescaleValue(const edm::Event& iEvent, const edm::EventSetup& iSetup, const std::string& trigger) const;
00226
00228 std::pair<int,int> prescaleValues(const edm::Event& iEvent, const edm::EventSetup& iSetup, const std::string& trigger) const;
00229
00230
00231
00233 const std::vector<std::string>& prescaleLabels() const {
00234 return hltConfigData_->prescaleLabels();
00235 }
00236 const std::map<std::string,std::vector<unsigned int> >& prescaleTable() const {
00237 return hltConfigData_->prescaleTable();
00238 }
00239
00240
00241 private:
00242
00243 void getDataFrom(const edm::ParameterSetID& iID, const std::string& iProcessName );
00244 void init(const edm::ProcessHistory& iHistory, const std::string& processName);
00245 void init(const std::string& processName);
00246 void clear();
00247
00249 std::string processName_;
00250 bool inited_;
00251 bool changed_;
00252 const HLTConfigData* hltConfigData_;
00253 boost::shared_ptr<L1GtUtils> l1GtUtils_;
00254
00255 };
00256 #endif