CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1TMuonEndCapObjectKeysOnlineProd Class Reference
Inheritance diagram for L1TMuonEndCapObjectKeysOnlineProd:
L1ObjectKeysOnlineProdBaseExt edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

void fillObjectKeys (L1TriggerKeyExt *pL1TriggerKey) override
 
 L1TMuonEndCapObjectKeysOnlineProd (const edm::ParameterSet &)
 
 ~L1TMuonEndCapObjectKeysOnlineProd (void) override
 
- Public Member Functions inherited from L1ObjectKeysOnlineProdBaseExt
 L1ObjectKeysOnlineProdBaseExt (const edm::ParameterSet &)
 
ReturnType produce (const L1TriggerKeyExtRcd &)
 
 ~L1ObjectKeysOnlineProdBaseExt () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

bool transactionSafe
 

Additional Inherited Members

- Public Types inherited from L1ObjectKeysOnlineProdBaseExt
using ReturnType = std::unique_ptr< L1TriggerKeyExt >
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *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 >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
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
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Attributes inherited from L1ObjectKeysOnlineProdBaseExt
l1t::OMDSReader m_omdsReader
 

Detailed Description

Definition at line 8 of file L1TMuonEndCapObjectKeysOnlineProd.cc.

Constructor & Destructor Documentation

◆ L1TMuonEndCapObjectKeysOnlineProd()

L1TMuonEndCapObjectKeysOnlineProd::L1TMuonEndCapObjectKeysOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 19 of file L1TMuonEndCapObjectKeysOnlineProd.cc.

References edm::ParameterSet::getParameter(), and transactionSafe.

21  transactionSafe = iConfig.getParameter<bool>("transactionSafe");
22 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)

◆ ~L1TMuonEndCapObjectKeysOnlineProd()

L1TMuonEndCapObjectKeysOnlineProd::~L1TMuonEndCapObjectKeysOnlineProd ( void  )
inlineoverride

Definition at line 16 of file L1TMuonEndCapObjectKeysOnlineProd.cc.

16 {}

Member Function Documentation

◆ fillObjectKeys()

void L1TMuonEndCapObjectKeysOnlineProd::fillObjectKeys ( L1TriggerKeyExt pL1TriggerKey)
overridevirtual

Implements L1ObjectKeysOnlineProdBaseExt.

Definition at line 24 of file L1TMuonEndCapObjectKeysOnlineProd.cc.

References L1TriggerKeyExt::add(), MillePedeFileConverter_cfg::e, l1t::OnlineDBqueryHelper::fetch(), l1t::TriggerSystem::getParameters(), L1TriggerKeyExt::kEMTF, relativeConstraints::keys, L1ObjectKeysOnlineProdBaseExt::m_omdsReader, l1t::XmlConfigParser::readDOMFromString(), l1t::XmlConfigParser::readRootElement(), l1t::TriggerSystem::setConfigured(), AlCaHLTBitMon_QueryRunRegistry::string, L1TriggerKeyExt::subsystemKey(), and transactionSafe.

24  {
25  std::string EMTFKey = pL1TriggerKey->subsystemKey(L1TriggerKeyExt::kEMTF);
26 
27  // simply assign the algo key to the record
28  pL1TriggerKey->add("L1TMuonEndCapParamsO2ORcd", "L1TMuonEndCapParams", EMTFKey);
29 
30  std::string tscKey = EMTFKey.substr(0, EMTFKey.find(':'));
31 
33  // the block below reproduces L1TMuonEndCapParamsOnlineProd identically
34 
35  std::string algo_key, hw_key;
36  std::string algo_payload, hw_payload;
37  try {
38  std::map<std::string, std::string> keys =
39  l1t::OnlineDBqueryHelper::fetch({"HW", "ALGO"}, "EMTF_KEYS", tscKey, m_omdsReader);
40 
41  hw_key = keys["HW"];
42  algo_key = keys["ALGO"];
43 
44  hw_payload = l1t::OnlineDBqueryHelper::fetch({"CONF"}, "EMTF_CLOBS", hw_key, m_omdsReader)["CONF"];
45 
46  algo_payload = l1t::OnlineDBqueryHelper::fetch({"CONF"}, "EMTF_CLOBS", algo_key, m_omdsReader)["CONF"];
47 
48  } catch (std::runtime_error& e) {
49  edm::LogError("L1-O2O: L1TMuonEndCapObjectKeysOnlineProd") << e.what();
50  if (transactionSafe)
51  throw std::runtime_error("SummaryForFunctionManager: EMTF | Faulty | Broken key");
52  else {
53  edm::LogError("L1-O2O: L1TMuonEndCapObjectKeysOnlineProd")
54  << "forcing L1TMuonEndCapForest key to be = '7' (known to exist)";
55  pL1TriggerKey->add("L1TMuonEndCapForestO2ORcd", "L1TMuonEndCapForest", "7");
56  return;
57  }
58  }
59 
60  l1t::XmlConfigParser xmlRdr;
61  l1t::TriggerSystem trgSys;
62 
63  try {
64  xmlRdr.readDOMFromString(hw_payload);
65  xmlRdr.readRootElement(trgSys);
66 
67  xmlRdr.readDOMFromString(algo_payload);
68  xmlRdr.readRootElement(trgSys);
69 
70  trgSys.setConfigured();
71  } catch (std::runtime_error& e) {
72  edm::LogError("L1-O2O: L1TMuonEndCapObjectKeysOnlineProd") << e.what();
73  if (transactionSafe)
74  throw std::runtime_error("SummaryForFunctionManager: EMTF | Faulty | Cannot parse XMLs");
75  else {
76  edm::LogError("L1-O2O: L1TMuonEndCapObjectKeysOnlineProd")
77  << "forcing L1TMuonEndCapForest key to be = '7' (known to exist)";
78  pL1TriggerKey->add("L1TMuonEndCapForestO2ORcd", "L1TMuonEndCapForest", "7");
79  return;
80  }
81  }
82 
83  // Changed from "EMTF-1" to "EMTFp1", but is this backwards compatible? Does it need to be? - AWB 10.04.2018
84  std::map<std::string, l1t::Parameter> conf = trgSys.getParameters("EMTFp1"); // any processor will do
85  // if (conf still empty) conf = trgSys.getParameters("EMTF+1"); // Should add some conditional for backwards-compatibility
86 
88 
89  // simply assign the algo key to the record
90  pL1TriggerKey->add("L1TMuonEndCapForestO2ORcd", "L1TMuonEndCapForest", conf["pt_lut_version"].getValueAsStr());
91 }
const std::string & subsystemKey(L1Subsystems subsystem) const
void setConfigured(bool state=true) noexcept
Definition: TriggerSystem.h:74
void add(const std::string &record, const std::string &type, const std::string &key)
Log< level::Error, false > LogError
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
const std::map< std::string, Parameter > & getParameters(const char *processor) const
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 readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")

Member Data Documentation

◆ transactionSafe

bool L1TMuonEndCapObjectKeysOnlineProd::transactionSafe
private