CMS 3D CMS Logo

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

Public Member Functions

void fillObjectKeys (ReturnType 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 ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Additional Inherited Members

- Public Types inherited from L1ObjectKeysOnlineProdBaseExt
typedef std::shared_ptr< L1TriggerKeyExtReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Attributes inherited from L1ObjectKeysOnlineProdBaseExt
l1t::OMDSReader m_omdsReader
 

Detailed Description

Definition at line 8 of file L1TMuonEndcapObjectKeysOnlineProd.cc.

Constructor & Destructor Documentation

L1TMuonEndcapObjectKeysOnlineProd::L1TMuonEndcapObjectKeysOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 18 of file L1TMuonEndcapObjectKeysOnlineProd.cc.

19  : L1ObjectKeysOnlineProdBaseExt( iConfig ){
20 }
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
L1TMuonEndcapObjectKeysOnlineProd::~L1TMuonEndcapObjectKeysOnlineProd ( void  )
inlineoverride

Definition at line 15 of file L1TMuonEndcapObjectKeysOnlineProd.cc.

15 {}

Member Function Documentation

void L1TMuonEndcapObjectKeysOnlineProd::fillObjectKeys ( ReturnType  pL1TriggerKey)
overridevirtual

Implements L1ObjectKeysOnlineProdBaseExt.

Definition at line 23 of file L1TMuonEndcapObjectKeysOnlineProd.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, 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(), and AlCaHLTBitMon_QueryRunRegistry::string.

23  {
24 
25  std::string EMTFKey = pL1TriggerKey->subsystemKey( L1TriggerKeyExt::kEMTF ) ;
26 
27  // simply assign the algo key to the record
28  pL1TriggerKey->add( "L1TMuonEndCapParamsO2ORcd",
29  "L1TMuonEndCapParams",
30  EMTFKey) ;
31 
32  std::string tscKey = EMTFKey.substr(0, EMTFKey.find(":") );
33  std::string rsKey = EMTFKey.substr( EMTFKey.find(":")+1, std::string::npos );
34 
36 // the block below reproduces L1TMuonEndCapParamsOnlineProd identically
37 
38  std::string algo_key, hw_key;
39  std::string algo_payload, hw_payload;
40  try {
41  std::map<std::string,std::string> keys =
42  l1t::OnlineDBqueryHelper::fetch( {"HW","ALGO"},
43  "EMTF_KEYS",
44  tscKey,
46  );
47 
48  hw_key = keys["HW"];
49  algo_key = keys["ALGO"];
50 
51  hw_payload = l1t::OnlineDBqueryHelper::fetch( {"CONF"},
52  "EMTF_CLOBS",
53  hw_key,
55  ) ["CONF"];
56 
57  algo_payload = l1t::OnlineDBqueryHelper::fetch( {"CONF"},
58  "EMTF_CLOBS",
59  algo_key,
61  ) ["CONF"];
62 
63  } catch ( std::runtime_error &e ) {
64  edm::LogError( "L1-O2O: L1TMuonEndCapParamsOnlineProd" ) << e.what();
65  throw std::runtime_error("Broken key");
66  }
67 
68  l1t::XmlConfigParser xmlRdr;
69  l1t::TriggerSystem trgSys;
70 
71  xmlRdr.readDOMFromString( hw_payload );
72  xmlRdr.readRootElement ( trgSys );
73 
74  xmlRdr.readDOMFromString( algo_payload );
75  xmlRdr.readRootElement ( trgSys );
76 
77  trgSys.setConfigured();
78 
79  std::map<std::string, l1t::Parameter> conf = trgSys.getParameters("EMTF-1"); // any processor will do
80 
82 
83  // simply assign the algo key to the record
84  pL1TriggerKey->add( "L1TMuonEndCapForestO2ORcd",
85  "L1TMuonEndCapForest",
86  conf["pt_lut_version"].getValueAsStr()) ;
87 }
void setConfigured(bool state=true) noexcept
Definition: TriggerSystem.h:73
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
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)
const std::map< std::string, Parameter > & getParameters(const char *processor) const
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")