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::shared_ptr< L1MuCSCTFAlignmentnewObject (const std::string &objectKey) override
 
 ~CSCTFAlignmentOnlineProd () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::shared_ptr< L1MuCSCTFAlignmentproduce (const L1MuCSCTFAlignmentRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () 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 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 L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
bool getObjectKey (const L1MuCSCTFAlignmentRcd &record, std::shared_ptr< L1MuCSCTFAlignment > data, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
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 L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
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 ( const edm::ParameterSet iConfig)
inline
CSCTFAlignmentOnlineProd::~CSCTFAlignmentOnlineProd ( )
inlineoverride

Definition at line 9 of file CSCTFAlignmentOnlineProd.h.

References newObject(), and AlCaHLTBitMon_QueryRunRegistry::string.

9 {}

Member Function Documentation

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

Implements L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >.

Definition at line 4 of file CSCTFAlignmentOnlineProd.cc.

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

Referenced by ~CSCTFAlignmentOnlineProd().

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