|
|
|
static void | prevalidate (ConfigurationDescriptions &) |
|
using | EventSetupRecordKey = eventsetup::EventSetupRecordKey |
|
using | KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >> |
|
bool | getObjectKey (const L1TCaloParamsO2ORcd &record, std::string &objectKey) |
|
edm::ESConsumesCollectorT< L1TCaloParamsO2ORcd > | wrappedSetWhatProduced (const edm::ParameterSet &) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const char *iLabel) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const es::Label &iLabel={}) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const std::string &iLabel) |
|
template<typename T , typename TDecorator > |
auto | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord > |
auto | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord , typename TArg > |
ESConsumesCollectorT< TRecord > | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={}) |
|
void | usesResources (std::vector< std::string > const &) |
|
template<class TFactory > |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
|
virtual void | registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string()) |
|
KeyedProxiesVector | registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override |
|
template<class T > |
void | usingRecord () |
|
void | usingRecordWithKey (const EventSetupRecordKey &key) |
|
bool | m_copyFromCondDB |
|
cond::persistency::Session | m_dbSession |
|
bool | m_forceGeneration |
|
l1t::OMDSReader | m_omdsReader |
|
Definition at line 20 of file L1TCaloParamsOnlineProd.cc.
◆ L1TCaloParamsOnlineProd()
L1TCaloParamsOnlineProd::L1TCaloParamsOnlineProd |
( |
const edm::ParameterSet & |
iConfig | ) |
|
◆ ~L1TCaloParamsOnlineProd()
L1TCaloParamsOnlineProd::~L1TCaloParamsOnlineProd |
( |
void |
| ) |
|
|
inlineoverride |
◆ newObject()
Implements L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >.
Definition at line 218 of file L1TCaloParamsOnlineProd.cc.
223 if (objectKey.empty()) {
224 edm::LogError(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"Key is empty";
226 throw std::runtime_error(
"SummaryForFunctionManager: Calo | Faulty | Empty objectKey");
228 edm::LogError(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"returning unmodified prototype of l1t::CaloParams";
229 return std::make_unique<const l1t::CaloParams>(baseSettings);
233 std::string tscKey = objectKey.substr(0, objectKey.find(
':'));
234 std::string rsKey = objectKey.substr(objectKey.find(
':') + 1, std::string::npos);
237 <<
"Producing L1TCaloParamsOnlineProd with TSC key = " << tscKey <<
" and RS key = " << rsKey;
241 std::string calol2_top_key, calol2_algo_key, calol2_hw_key;
243 std::map<std::string, std::string> calol2_algo_payloads;
245 std::map<std::string, std::string> topKeys =
249 calol1_top_key = topKeys[
"CALOL1_KEY"];
253 calol1_algo_payload =
258 calol2_top_key = topKeys[
"CALOL2_KEY"];
260 std::map<std::string, std::string> calol2_keys =
263 calol2_hw_key = calol2_keys[
"HW"];
267 calol2_algo_key = calol2_keys[
"ALGO"];
269 std::map<std::string, std::string> calol2_algo_keys =
275 for (
auto&
key : calol2_algo_keys)
276 calol2_algo_payloads[
key.second] =
280 }
catch (std::runtime_error&
e) {
283 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: Calo | Faulty | ") +
e.what());
285 edm::LogError(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"returning unmodified prototype of l1t::CaloParams";
286 return std::make_unique<const l1t::CaloParams>(baseSettings);
292 for (
auto& conf : calol2_algo_payloads) {
297 std::ofstream
output(
std::string(
"/tmp/").
append(calol2_hw_key.substr(0, calol2_hw_key.find(
'/'))).append(
".xml"));
298 output << calol2_hw_payload;
303 std::string(
"/tmp/").
append(calol1_algo_key.substr(0, calol1_algo_key.find(
'/'))).append(
".xml"));
304 output << calol1_algo_payload;
316 calol1.
addProcessor(
"processors",
"processors",
"-1",
"-1");
320 std::map<std::string, l1t::Parameter> calol1_conf = calol1.
getParameters(
"processors");
321 std::map<std::string, l1t::Mask> calol1_rs;
324 throw std::runtime_error(
"Parsing error for CaloLayer1");
326 }
catch (std::runtime_error&
e) {
329 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: Calo | Faulty | ") +
e.what());
331 edm::LogError(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"returning unmodified prototype of l1t::CaloParams";
332 return std::make_unique<const l1t::CaloParams>(baseSettings);
344 for (
auto& conf : calol2_algo_payloads) {
352 std::map<std::string, l1t::Parameter> calol2_conf = calol2.
getParameters(
"MP1");
353 std::map<std::string, l1t::Parameter> calol2_conf_demux = calol2.
getParameters(
"DEMUX");
354 calol2_conf.insert(calol2_conf_demux.begin(), calol2_conf_demux.end());
355 std::map<std::string, l1t::Mask> calol2_rs;
358 throw std::runtime_error(
"Parsing error for CaloLayer2");
360 }
catch (std::runtime_error&
e) {
363 throw std::runtime_error(
std::string(
"SummaryForFunctionManager: Calo | Faulty | ") +
e.what());
365 edm::LogError(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"returning unmodified prototype of l1t::CaloParams";
366 return std::make_unique<const l1t::CaloParams>(baseSettings);
371 auto retval = std::make_unique<const l1t::CaloParams>(m_params_helper);
373 edm::LogInfo(
"L1-O2O: L1TCaloParamsOnlineProd") <<
"SummaryForFunctionManager: Calo | OK | All looks good";
References l1t::TriggerSystem::addProcessor(), mps_setup::append, baseSettings_token, MillePedeFileConverter_cfg::e, exclusiveLayer, l1t::OnlineDBqueryHelper::fetch(), edm::eventsetup::EventSetupRecordImplementation< T >::get(), l1t::TriggerSystem::getParameters(), crabWrapper::key, L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >::m_omdsReader, convertSQLitetoXML_cfg::output, readCaloLayer1OnlineSettings(), readCaloLayer2OnlineSettings(), l1t::XmlConfigParser::readDOMFromString(), l1t::XmlConfigParser::readRootElement(), AlCaHarvesting_cff::record, l1t::TriggerSystem::setConfigured(), AlCaHLTBitMon_QueryRunRegistry::string, and transactionSafe.
◆ readCaloLayer1OnlineSettings()
Definition at line 41 of file L1TCaloParamsOnlineProd.cc.
44 const char* expectedParams[] = {
45 "layer1ECalScaleFactors",
46 "layer1HCalScaleFactors",
47 "layer1HFScaleFactors",
48 "layer1ECalScaleETBins",
49 "layer1HCalScaleETBins",
57 for (
const auto param : expectedParams) {
58 if (conf.find(param) == conf.end()) {
60 <<
"Unable to locate expected CaloLayer1 parameter: " << param <<
" in L1 settings payload!";
72 if (conf.find(
"layer1ECalScalePhiBins") != conf.end())
74 conf[
"layer1ECalScalePhiBins"].getVector<
unsigned int>());
75 if (conf.find(
"layer1HCalScalePhiBins") != conf.end())
77 if (conf.find(
"layer1HFScalePhiBins") != conf.end())
79 if (conf.find(
"layer1SecondStageLUT") != conf.end())
References l1t::CaloParamsHelperO2O::setLayer1ECalScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1ECalScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1ECalScalePhiBins(), l1t::CaloParamsHelperO2O::setLayer1HCalScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1HCalScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1HCalScalePhiBins(), l1t::CaloParamsHelperO2O::setLayer1HFScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1HFScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1HFScalePhiBins(), and l1t::CaloParamsHelperO2O::setLayer1SecondStageLUT().
Referenced by newObject().
◆ readCaloLayer2OnlineSettings()
Definition at line 85 of file L1TCaloParamsOnlineProd.cc.
88 const char* expectedParams[] = {
89 "leptonSeedThreshold",
90 "leptonTowerThreshold",
91 "pileUpTowerThreshold",
92 "egammaRelaxationThreshold",
97 "egammaBypassExtendedHOverE",
98 "egammaHOverECut_iEtaLT15",
99 "egammaHOverECut_iEtaGTEq15",
100 "egammaEnergyCalibLUT",
111 "jetBypassPileUpSub",
114 "towerCountThreshold",
117 "ecalET_towerThresholdLUT",
118 "ET_towerThresholdLUT",
119 "MET_towerThresholdLUT",
120 "ET_centralityLowerThresholds",
121 "ET_centralityUpperThresholds",
123 "ecalET_energyCalibLUT",
124 "MET_energyCalibLUT",
125 "METHF_energyCalibLUT",
130 for (
const auto param : expectedParams) {
131 if (conf.find(param) == conf.end()) {
133 <<
"Unable to locate expected CaloLayer2 parameter: " << param <<
" in L1 settings payload!";
144 paramsHelper.
setEgMaxPtHOverE((conf[
"egammaRelaxationThreshold"].getValue<int>()) / 2.);
145 paramsHelper.
setEgEtaCut((conf[
"egammaMaxEta"].getValue<int>()));
162 paramsHelper.
setJetBypassPUS(conf[
"jetBypassPileUpSub"].getValue<bool>());
167 std::vector<int> etSumEtThresh;
169 etSumEtaMax.push_back(conf[
"ETMET_maxTowerEta"].getValue<int>());
170 etSumEtaMax.push_back(conf[
"HTMHT_maxJetEta"].getValue<int>());
171 etSumEtaMax.push_back(conf[
"ETMET_maxTowerEta"].getValue<int>());
172 etSumEtaMax.push_back(conf[
"HTMHT_maxJetEta"].getValue<int>());
173 etSumEtaMax.push_back(conf[
"towerCountMaxEta"].getValue<int>());
175 etSumEtThresh.push_back(0);
176 etSumEtThresh.push_back(conf[
"HT_jetThreshold"].getValue<int>() / 2);
177 etSumEtThresh.push_back(0);
178 etSumEtThresh.push_back(conf[
"MHT_jetThreshold"].getValue<int>() / 2);
179 etSumEtThresh.push_back(conf[
"towerCountThreshold"].getValue<int>() / 2);
190 std::vector<double> etSumCentLowerValues;
191 std::vector<double> etSumCentUpperValues;
193 etSumCentLowerValues = conf[
"ET_centralityLowerThresholds"].getVector<
double>();
194 etSumCentUpperValues = conf[
"ET_centralityUpperThresholds"].getVector<
double>();
References l1t::convertToLUT(), caloParams_2018_v1_0_ECALZS_inconsistent_cfi::etSumEtaMax, mps_fire::i, l1t::CaloParamsHelperO2O::setEgBypassECALFG(), l1t::CaloParamsHelperO2O::setEgBypassEGVetos(), l1t::CaloParamsHelperO2O::setEgBypassExtHOverE(), l1t::CaloParamsHelperO2O::setEgBypassShape(), l1t::CaloParamsHelperO2O::setEgCalibrationLUT(), l1t::CaloParamsHelperO2O::setEgEtaCut(), l1t::CaloParamsHelperO2O::setEgHOverEcutBarrel(), l1t::CaloParamsHelperO2O::setEgHOverEcutEndcap(), l1t::CaloParamsHelperO2O::setEgIsolationLUT(), l1t::CaloParamsHelperO2O::setEgIsolationLUT2(), l1t::CaloParamsHelperO2O::setEgMaxPtHOverE(), l1t::CaloParamsHelperO2O::setEgNeighbourThreshold(), l1t::CaloParamsHelperO2O::setEgSeedThreshold(), l1t::CaloParamsHelperO2O::setEtSumCentLower(), l1t::CaloParamsHelperO2O::setEtSumCentUpper(), l1t::CaloParamsHelperO2O::setEtSumEcalSumCalibrationLUT(), l1t::CaloParamsHelperO2O::setEtSumEcalSumPUSLUT(), l1t::CaloParamsHelperO2O::setEtSumEtaMax(), l1t::CaloParamsHelperO2O::setEtSumEttCalibrationLUT(), l1t::CaloParamsHelperO2O::setEtSumEtThreshold(), l1t::CaloParamsHelperO2O::setEtSumEttPUSLUT(), l1t::CaloParamsHelperO2O::setEtSumMetPUSLUT(), l1t::CaloParamsHelperO2O::setIsoTauEtaMax(), l1t::CaloParamsHelperO2O::setJetBypassPUS(), l1t::CaloParamsHelperO2O::setJetCalibrationLUT(), l1t::CaloParamsHelperO2O::setJetPUSUsePhiRing(), l1t::CaloParamsHelperO2O::setJetSeedThreshold(), l1t::CaloParamsHelperO2O::setMetCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetHFCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetHFPhiCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetPhiCalibrationLUT(), l1t::CaloParamsHelperO2O::setPileUpTowerThreshold(), l1t::CaloParamsHelperO2O::setTauCalibrationLUT(), l1t::CaloParamsHelperO2O::setTauIsolationLUT(), l1t::CaloParamsHelperO2O::setTauNeighbourThreshold(), l1t::CaloParamsHelperO2O::setTauSeedThreshold(), l1t::CaloParamsHelperO2O::setTauTrimmingShapeVetoLUT(), and parallelization::uint.
Referenced by newObject().
◆ baseSettings_token
◆ exclusiveLayer
const unsigned int L1TCaloParamsOnlineProd::exclusiveLayer |
|
private |
◆ transactionSafe
const bool L1TCaloParamsOnlineProd::transactionSafe |
|
private |
const bool transactionSafe
void setTauCalibrationLUT(const l1t::LUT &lut)
void setLayer1HFScalePhiBins(const std::vector< unsigned > params)
void setIsoTauEtaMax(int value)
void setPileUpTowerThreshold(int thresh)
void setJetCalibrationLUT(const l1t::LUT &lut)
l1t::OMDSReader m_omdsReader
static std::map< std::string, std::string > fetch(const std::vector< std::string > &queryColumns, const std::string &table, const std::string &key, l1t::OMDSReader &m_omdsReader)
void setLayer1HCalScaleFactors(const std::vector< double > params)
void setEtSumEttPUSLUT(const l1t::LUT &lut)
void setTauTrimmingShapeVetoLUT(const l1t::LUT &lut)
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
void addProcessor(const char *processor, const char *role, const char *crate, const char *slot)
void setEgSeedThreshold(double thresh)
void setLayer1ECalScalePhiBins(const std::vector< unsigned > params)
const edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcd > baseSettings_token
Log< level::Info, false > LogInfo
l1t::LUT convertToLUT(const std::vector< uint64_t > &v, int padding=-1) noexcept
void setEtSumEcalSumCalibrationLUT(const l1t::LUT &lut)
void setTauNeighbourThreshold(double thresh)
void setMetCalibrationLUT(const l1t::LUT &lut)
void setEtSumEcalSumPUSLUT(const l1t::LUT &lut)
void setLayer1HCalScalePhiBins(const std::vector< unsigned > params)
void setEtSumMetPUSLUT(const l1t::LUT &lut)
void setLayer1HFScaleFactors(const std::vector< double > params)
void setJetBypassPUS(unsigned flag)
void setMetHFCalibrationLUT(const l1t::LUT &lut)
void setLayer1SecondStageLUT(const std::vector< unsigned > &lut)
void setEtSumCentUpper(unsigned centClass, double upBound)
bool readCaloLayer2OnlineSettings(l1t::CaloParamsHelperO2O ¶msHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
void setTauSeedThreshold(double thresh)
void setEgBypassEGVetos(unsigned flag)
void setTauIsolationLUT(const l1t::LUT &lut)
void setEgCalibrationLUT(const l1t::LUT &lut)
void setEgBypassECALFG(unsigned flag)
void setMetPhiCalibrationLUT(const l1t::LUT &lut)
Log< level::Error, false > LogError
void setEtSumCentLower(unsigned centClass, double loBound)
void setEgBypassShape(unsigned flag)
void setEgIsolationLUT(const l1t::LUT &lut)
void setJetPUSUsePhiRing(unsigned flag)
void setLayer1HCalScaleETBins(const std::vector< int > params)
const std::map< std::string, Parameter > & getParameters(const char *processor) const
bool readCaloLayer1OnlineSettings(l1t::CaloParamsHelperO2O ¶msHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
void setEgHOverEcutBarrel(int cut)
void setEgEtaCut(int mask)
void setEgHOverEcutEndcap(int cut)
T getParameter(std::string const &) const
void setLayer1ECalScaleFactors(const std::vector< double > params)
void setLayer1ECalScaleETBins(const std::vector< int > params)
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
void setJetSeedThreshold(double thresh)
void setEtSumEtaMax(unsigned isum, int eta)
const unsigned int exclusiveLayer
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
void setEgIsolationLUT2(const l1t::LUT &lut)
void setConfigured(bool state=true) noexcept
void setEtSumEttCalibrationLUT(const l1t::LUT &lut)
void setLayer1HFScaleETBins(const std::vector< int > params)
void setEgNeighbourThreshold(double thresh)
void setEgBypassExtHOverE(unsigned flag)
edm::ESConsumesCollectorT< L1TCaloParamsO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
void setEgMaxPtHOverE(double thresh)
void setMetHFPhiCalibrationLUT(const l1t::LUT &lut)
void setEtSumEtThreshold(unsigned isum, double thresh)