CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1GtTscObjectKeysOnlineProd Class Reference

#include <L1GtTscObjectKeysOnlineProd.h>

Inheritance diagram for L1GtTscObjectKeysOnlineProd:
L1ObjectKeysOnlineProdBase edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

void fillObjectKeys (FillType pL1TriggerKey) override
 public methods More...
 
 L1GtTscObjectKeysOnlineProd (const edm::ParameterSet &)
 constructor More...
 
 ~L1GtTscObjectKeysOnlineProd () override
 destructor More...
 
- Public Member Functions inherited from L1ObjectKeysOnlineProdBase
 L1ObjectKeysOnlineProdBase (const edm::ParameterSet &)
 
ReturnType produce (const L1TriggerKeyRcd &)
 
 ~L1ObjectKeysOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(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 Member Functions

std::string keyL1GtParameters (const std::string &subsystemKey, const std::string &gtSchema)
 keys for individual objects More...
 
std::string keyL1GtPsbSetup (const std::string &subsystemKey, const std::string &gtSchema)
 
std::string keyL1GtTriggerMenu (const std::string &subsystemKey, const std::string &gtSchema)
 

Private Attributes

bool m_enableL1GtParameters
 enable key search for each record More...
 
bool m_enableL1GtPsbSetup
 
bool m_enableL1GtTriggerMenu
 

Additional Inherited Members

- Public Types inherited from L1ObjectKeysOnlineProdBase
typedef std::unique_ptr< L1TriggerKey >::pointer FillType
 
typedef std::unique_ptr< L1TriggerKeyReturnType
 
- 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 >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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 L1ObjectKeysOnlineProdBase
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: online producer for L1 GT record keys starting from TSC key.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 24 of file L1GtTscObjectKeysOnlineProd.h.

Constructor & Destructor Documentation

L1GtTscObjectKeysOnlineProd::L1GtTscObjectKeysOnlineProd ( const edm::ParameterSet parSet)

constructor

Definition at line 24 of file L1GtTscObjectKeysOnlineProd.cc.

26  m_enableL1GtParameters(parSet.getParameter<bool>("EnableL1GtParameters")),
27  m_enableL1GtTriggerMenu(parSet.getParameter<bool>("EnableL1GtTriggerMenu")),
28  m_enableL1GtPsbSetup(parSet.getParameter<bool>("EnableL1GtPsbSetup")) {
29  // empty
30 }
T getParameter(std::string const &) const
bool m_enableL1GtParameters
enable key search for each record
L1ObjectKeysOnlineProdBase(const edm::ParameterSet &)
L1GtTscObjectKeysOnlineProd::~L1GtTscObjectKeysOnlineProd ( )
override

destructor

Definition at line 33 of file L1GtTscObjectKeysOnlineProd.cc.

33  {
34  // empty
35 }

Member Function Documentation

void L1GtTscObjectKeysOnlineProd::fillObjectKeys ( FillType  pL1TriggerKey)
overridevirtual

public methods

Implements L1ObjectKeysOnlineProdBase.

Definition at line 106 of file L1GtTscObjectKeysOnlineProd.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, keyL1GtParameters(), keyL1GtPsbSetup(), keyL1GtTriggerMenu(), L1TriggerKey::kGT, m_enableL1GtParameters, m_enableL1GtPsbSetup, m_enableL1GtTriggerMenu, and AlCaHLTBitMon_QueryRunRegistry::string.

106  {
107  // kMYSUBSYSTEM = kCSCTF, kDTTF, kRPC, kGMT, kRCT, mkGCT, kGT, or kTSP0
108  // subsystemKey = TRIGGERSUP_CONF.{CSCTF_KEY, DTTF_KEY, RPC_KEY, GMT_KEY, RCT_KEY, GCT_KEY, GT_KEY}
109 
110  std::string subsystemKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kGT);
111  const std::string gtSchema = "CMS_GT";
112 
113  //
115  const std::string& objectKey = keyL1GtParameters(subsystemKey, gtSchema);
116  if (!objectKey.empty()) {
117  pL1TriggerKey->add("L1GtParametersRcd", "L1GtParameters", objectKey);
118  }
119  }
120 
121  //
123  const std::string& objectKey = keyL1GtTriggerMenu(subsystemKey, gtSchema);
124  if (!objectKey.empty()) {
125  pL1TriggerKey->add("L1GtTriggerMenuRcd", "L1GtTriggerMenu", objectKey);
126  }
127  }
128 
129  //
130  if (m_enableL1GtPsbSetup) {
131  const std::string& objectKey = keyL1GtPsbSetup(subsystemKey, gtSchema);
132  if (!objectKey.empty()) {
133  pL1TriggerKey->add("L1GtPsbSetupRcd", "L1GtPsbSetup", objectKey);
134  }
135  }
136 }
std::string keyL1GtPsbSetup(const std::string &subsystemKey, const std::string &gtSchema)
std::string keyL1GtParameters(const std::string &subsystemKey, const std::string &gtSchema)
keys for individual objects
bool m_enableL1GtParameters
enable key search for each record
std::string keyL1GtTriggerMenu(const std::string &subsystemKey, const std::string &gtSchema)
std::string L1GtTscObjectKeysOnlineProd::keyL1GtParameters ( const std::string &  subsystemKey,
const std::string &  gtSchema 
)
private

keys for individual objects

Definition at line 39 of file L1GtTscObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillObjectKeys().

40  {
41  std::string objectKey;
42 
43  if (!subsystemKey.empty()) {
44  // Execute SQL queries to get keys from OMDS.
45 
46  // SELECT GTFE_SETUP_FK FROM CMS_GT.GT_SETUP WHERE GT_SETUP.ID = MyKey
48  "GTFE_SETUP_FK", gtSchema, "GT_SETUP", "GT_SETUP.ID", m_omdsReader.singleAttribute(subsystemKey));
49 
50  // check if query was successful
51  if (objectKeyResults.queryFailed()) {
52  edm::LogError("L1-O2O") << "Problem with key for record L1GtParametersRcd: query failed ";
53  return objectKey;
54  } else if ((objectKeyResults.numberRows() != 1)) {
55  edm::LogError("L1-O2O") << "Problem with key for record L1GtParametersRcd: " << (objectKeyResults.numberRows())
56  << " rows were returned";
57  return objectKey;
58  }
59 
60  objectKeyResults.fillVariable(objectKey);
61  }
62 
63  return objectKey;
64 }
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75
std::string L1GtTscObjectKeysOnlineProd::keyL1GtPsbSetup ( const std::string &  subsystemKey,
const std::string &  gtSchema 
)
private

Definition at line 93 of file L1GtTscObjectKeysOnlineProd.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillObjectKeys().

93  {
94  std::string objectKey;
95 
96  if (!subsystemKey.empty()) {
97  // no need to query OMDS, one uses the GT_SETUP key to get the individual PSB keys.
98  // the L1GtPsbSetup key is GT_SETUP key
99  objectKey = subsystemKey;
100  }
101 
102  return objectKey;
103 }
std::string L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu ( const std::string &  subsystemKey,
const std::string &  gtSchema 
)
private

Definition at line 66 of file L1GtTscObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillObjectKeys().

67  {
68  std::string objectKey;
69 
70  if (!subsystemKey.empty()) {
71  // Execute SQL queries to get keys from OMDS.
72 
73  // SELECT L1T_MENU_FK FROM CMS_GT.GT_SETUP WHERE GT_SETUP.ID = MyKey
75  "L1T_MENU_FK", gtSchema, "GT_SETUP", "GT_SETUP.ID", m_omdsReader.singleAttribute(subsystemKey));
76 
77  // check if query was successful
78  if (objectKeyResults.queryFailed()) {
79  edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMenuRcd: query failed ";
80  return objectKey;
81  } else if ((objectKeyResults.numberRows() != 1)) {
82  edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMenuRcd: " << (objectKeyResults.numberRows())
83  << " rows were returned";
84  return objectKey;
85  }
86 
87  objectKeyResults.fillVariable(objectKey);
88  }
89 
90  return objectKey;
91 }
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75

Member Data Documentation

bool L1GtTscObjectKeysOnlineProd::m_enableL1GtParameters
private

enable key search for each record

Definition at line 43 of file L1GtTscObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

bool L1GtTscObjectKeysOnlineProd::m_enableL1GtPsbSetup
private

Definition at line 45 of file L1GtTscObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

bool L1GtTscObjectKeysOnlineProd::m_enableL1GtTriggerMenu
private

Definition at line 44 of file L1GtTscObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().