CMS 3D CMS Logo

List of all members | Public Member Functions
CSCTFAlignmentOnlineProd Class Reference

#include <CSCTFAlignmentOnlineProd.h>

Inheritance diagram for CSCTFAlignmentOnlineProd:
L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 CSCTFAlignmentOnlineProd (const edm::ParameterSet &iConfig)
 
std::unique_ptr< L1MuCSCTFAlignmentnewObject (const std::string &objectKey) override
 
 ~CSCTFAlignmentOnlineProd () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1MuCSCTFAlignmentproduce (const L1MuCSCTFAlignmentRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () 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)
 

Additional Inherited Members

- 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 L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
bool getObjectKey (const L1MuCSCTFAlignmentRcd &record, std::string &objectKey)
 
- 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={})
 
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 L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
std::optional< edm::ESConsumesCollectorT< L1MuCSCTFAlignmentRcd > > m_consumesCollector
 
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Definition at line 5 of file CSCTFAlignmentOnlineProd.h.

Constructor & Destructor Documentation

◆ CSCTFAlignmentOnlineProd()

CSCTFAlignmentOnlineProd::CSCTFAlignmentOnlineProd ( const edm::ParameterSet iConfig)
inline

◆ ~CSCTFAlignmentOnlineProd()

CSCTFAlignmentOnlineProd::~CSCTFAlignmentOnlineProd ( )
inlineoverride

Definition at line 9 of file CSCTFAlignmentOnlineProd.h.

9 {}

Member Function Documentation

◆ newObject()

std::unique_ptr< L1MuCSCTFAlignment > CSCTFAlignmentOnlineProd::newObject ( const std::string &  objectKey)
overridevirtual

Implements L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >.

Definition at line 3 of file CSCTFAlignmentOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), mps_check::columns, mps_fire::i, L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >::m_omdsReader, bookConverter::results, and l1t::OMDSReader::singleAttribute().

3  {
4  // Execute SQL queries to get data from OMDS (using key) and make C++ object
5 
6  // SELECT Multiple columns FROM TABLE with correct key:
7  std::vector<std::string> columns;
8  columns.push_back("ALIPAR1");
9  columns.push_back("ALIPAR2");
10  columns.push_back("ALIPAR3");
11  columns.push_back("ALIPAR4");
12  columns.push_back("ALIPAR5");
13  columns.push_back("ALIPAR6");
14  columns.push_back("ALIPAR7");
15  columns.push_back("ALIPAR8");
16  columns.push_back("ALIPAR9");
17  columns.push_back("ALIPAR10");
18  columns.push_back("ALIPAR11");
19  columns.push_back("ALIPAR12");
20  columns.push_back("ALIPAR13");
21  columns.push_back("ALIPAR14");
22  columns.push_back("ALIPAR15");
23  columns.push_back("ALIPAR16");
24 
26  "CMS_CSC_TF",
27  "CSCTF_ALIGN_PARAM",
28  "CSCTF_ALIGN_PARAM.ALIGN_KEY",
29  m_omdsReader.singleAttribute(objectKey));
30 
31  if (results.queryFailed()) // check if query was successful
32  {
33  edm::LogError("L1-O2O") << "Problem with CSCTF_ALIGN_PARAM query.";
34  return std::make_unique<L1MuCSCTFAlignment>();
35  }
36 
37  // oracle doesn't support double so some tweaks
38  // float datum ;
39  std::vector<float> par_align;
40  std::vector<double> par_align_double;
41  results.fillVariable("ALIPAR1", par_align[0]);
42  results.fillVariable("ALIPAR2", par_align[1]);
43  results.fillVariable("ALIPAR3", par_align[2]);
44  results.fillVariable("ALIPAR4", par_align[3]);
45  results.fillVariable("ALIPAR5", par_align[4]);
46  results.fillVariable("ALIPAR6", par_align[5]);
47  results.fillVariable("ALIPAR7", par_align[6]);
48  results.fillVariable("ALIPAR8", par_align[7]);
49  results.fillVariable("ALIPAR9", par_align[8]);
50  results.fillVariable("ALIPAR10", par_align[9]);
51  results.fillVariable("ALIPAR11", par_align[10]);
52  results.fillVariable("ALIPAR12", par_align[11]);
53  results.fillVariable("ALIPAR13", par_align[12]);
54  results.fillVariable("ALIPAR14", par_align[13]);
55  results.fillVariable("ALIPAR15", par_align[14]);
56  results.fillVariable("ALIPAR16", par_align[15]);
57 
58  // std::cout<<conf_stat<<std::endl;
59  for (int i = 0; i < 16; i++) {
60  edm::LogInfo("algn_par queried") << par_align[i];
61  par_align_double[i] = par_align[i];
62  }
63  return std::make_unique<L1MuCSCTFAlignment>(par_align_double);
64 }
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
Log< level::Error, false > LogError
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
Log< level::Info, false > LogInfo