CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
virtual boost::shared_ptr
< L1MuCSCTFAlignment
newObject (const std::string &objectKey)
 
 ~CSCTFAlignmentOnlineProd ()
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual boost::shared_ptr
< L1MuCSCTFAlignment
produce (const L1MuCSCTFAlignmentRcd &iRecord)
 
 ~L1ConfigOnlineProdBase ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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, boost::shared_ptr< L1MuCSCTFAlignment > data, std::string &objectKey)
 
- 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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 ( )
inline

Definition at line 9 of file CSCTFAlignmentOnlineProd.h.

9 {}

Member Function Documentation

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

Implements L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >.

Definition at line 4 of file CSCTFAlignmentOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), i, L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >::m_omdsReader, l1t::OMDSReader::QueryResults::queryFailed(), python.entryComment::results, and l1t::OMDSReader::singleAttribute().

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 boost::shared_ptr< L1MuCSCTFAlignment >( new 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 boost::shared_ptr< L1MuCSCTFAlignment >( new L1MuCSCTFAlignment(par_align_double) ) ;
70 }
int i
Definition: DBlmapReader.cc:9
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="") const
Definition: OMDSReader.cc:87