CMS 3D CMS Logo

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 //
17 //
18 
19 
20 // system include files
21 
22 // user include files
24 
26 
27 //
28 // class declaration
29 //
30 
32  public:
35 
36  void fillObjectKeys( FillType ) override ;
37  private:
38  // ----------member data ---------------------------
39 };
40 
41 //
42 // constants, enums and typedefs
43 //
44 
45 //
46 // static data member definitions
47 //
48 
49 //
50 // constructors and destructor
51 //
53  : L1ObjectKeysOnlineProdBase( iConfig )
54 {}
55 
56 
58 {
59 
60  // do anything here that needs to be done at desctruction time
61  // (e.g. close files, deallocate resources etc.)
62 
63 }
64 
65 
66 //
67 // member functions
68 //
69 
70 // ------------ method called to produce the data ------------
71 void
73 {
74  std::string dttfKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kDTTF ) ;
75 
76  if( !dttfKey.empty() )
77  {
78  // SELECT LUT_KEY FROM CMS_DT_TF.DTTF_CONF WHERE DTTF_CONF.ID = dttfKey
79  l1t::OMDSReader::QueryResults lutKeyResults =
80  m_omdsReader.basicQuery( "LUT_KEY",
81  "CMS_DT_TF",
82  "DTTF_CONF",
83  "DTTF_CONF.ID",
84  m_omdsReader.singleAttribute( dttfKey ) );
85 
86 
87  if( lutKeyResults.queryFailed() ||
88  lutKeyResults.numberRows() != 1 ) // check query successful
89  {
90  edm::LogError( "L1-O2O" ) << "Problem with DTTF key." ;
91  return ;
92  }
93 
94  std::string lutKey ;
95  lutKeyResults.fillVariable( lutKey ) ;
96 
97  pL1TriggerKey->add( "L1MuDTEtaPatternLutRcd",
98  "L1MuDTEtaPatternLut",
99  lutKey ) ;
100 
101  pL1TriggerKey->add( "L1MuDTExtLutRcd",
102  "L1MuDTExtLut",
103  lutKey ) ;
104 
105  pL1TriggerKey->add( "L1MuDTPhiLutRcd",
106  "L1MuDTPhiLut",
107  lutKey ) ;
108 
109  pL1TriggerKey->add( "L1MuDTPtaLutRcd",
110  "L1MuDTPtaLut",
111  lutKey ) ;
112 
113  pL1TriggerKey->add( "L1MuDTQualPatternLutRcd",
114  "L1MuDTQualPatternLut",
115  lutKey ) ;
116 
117  pL1TriggerKey->add( "L1MuDTTFParametersRcd",
118  "L1MuDTTFParameters",
119  dttfKey ) ;
120  }
121 }
122 
123 //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
std::unique_ptr< L1TriggerKey >::pointer FillType
DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet &)
return((rh^lh)&mask)
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
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60