CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTFTSCObjectKeysOnlineProd.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1TriggerConfig
4 // Class: DTTFTSCObjectKeysOnlineProd
5 //
13 //
14 // Original Author: Werner Man-Li Sun
15 // Created: Thu Oct 2 21:43:50 CEST 2008
16 // $Id: DTTFTSCObjectKeysOnlineProd.cc,v 1.2 2009/05/25 14:05:01 wsun Exp $
17 //
18 //
19 
20 
21 // system include files
22 
23 // user include files
25 
27 
28 //
29 // class declaration
30 //
31 
33  public:
36 
37  virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ;
38  private:
39  // ----------member data ---------------------------
40 };
41 
42 //
43 // constants, enums and typedefs
44 //
45 
46 //
47 // static data member definitions
48 //
49 
50 //
51 // constructors and destructor
52 //
54  : L1ObjectKeysOnlineProdBase( iConfig )
55 {}
56 
57 
59 {
60 
61  // do anything here that needs to be done at desctruction time
62  // (e.g. close files, deallocate resources etc.)
63 
64 }
65 
66 
67 //
68 // member functions
69 //
70 
71 // ------------ method called to produce the data ------------
72 void
74 {
75  std::string dttfKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kDTTF ) ;
76 
77  if( !dttfKey.empty() )
78  {
79  // SELECT LUT_KEY FROM CMS_DT_TF.DTTF_CONF WHERE DTTF_CONF.ID = dttfKey
80  l1t::OMDSReader::QueryResults lutKeyResults =
81  m_omdsReader.basicQuery( "LUT_KEY",
82  "CMS_DT_TF",
83  "DTTF_CONF",
84  "DTTF_CONF.ID",
85  m_omdsReader.singleAttribute( dttfKey ) );
86 
87 
88  if( lutKeyResults.queryFailed() ||
89  lutKeyResults.numberRows() != 1 ) // check query successful
90  {
91  edm::LogError( "L1-O2O" ) << "Problem with DTTF key." ;
92  return ;
93  }
94 
95  std::string lutKey ;
96  lutKeyResults.fillVariable( lutKey ) ;
97 
98  pL1TriggerKey->add( "L1MuDTEtaPatternLutRcd",
99  "L1MuDTEtaPatternLut",
100  lutKey ) ;
101 
102  pL1TriggerKey->add( "L1MuDTExtLutRcd",
103  "L1MuDTExtLut",
104  lutKey ) ;
105 
106  pL1TriggerKey->add( "L1MuDTPhiLutRcd",
107  "L1MuDTPhiLut",
108  lutKey ) ;
109 
110  pL1TriggerKey->add( "L1MuDTPtaLutRcd",
111  "L1MuDTPtaLut",
112  lutKey ) ;
113 
114  pL1TriggerKey->add( "L1MuDTQualPatternLutRcd",
115  "L1MuDTQualPatternLut",
116  lutKey ) ;
117 
118  pL1TriggerKey->add( "L1MuDTTFParametersRcd",
119  "L1MuDTTFParameters",
120  dttfKey ) ;
121  }
122 }
123 
124 //define this as a plug-in
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:295
DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet &)
boost::shared_ptr< L1TriggerKey > ReturnType
virtual void fillObjectKeys(ReturnType pL1TriggerKey)
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
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60