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 // system include files
20 
21 // user include files
23 
25 
26 //
27 // class declaration
28 //
29 
31 public:
34 
35  void fillObjectKeys(FillType) override;
36 
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 
56  // do anything here that needs to be done at desctruction time
57  // (e.g. close files, deallocate resources etc.)
58 }
59 
60 //
61 // member functions
62 //
63 
64 // ------------ method called to produce the data ------------
66  std::string dttfKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kDTTF);
67 
68  if (!dttfKey.empty()) {
69  // SELECT LUT_KEY FROM CMS_DT_TF.DTTF_CONF WHERE DTTF_CONF.ID = dttfKey
71  "LUT_KEY", "CMS_DT_TF", "DTTF_CONF", "DTTF_CONF.ID", m_omdsReader.singleAttribute(dttfKey));
72 
73  if (lutKeyResults.queryFailed() || lutKeyResults.numberRows() != 1) // check query successful
74  {
75  edm::LogError("L1-O2O") << "Problem with DTTF key.";
76  return;
77  }
78 
79  std::string lutKey;
80  lutKeyResults.fillVariable(lutKey);
81 
82  pL1TriggerKey->add("L1MuDTEtaPatternLutRcd", "L1MuDTEtaPatternLut", lutKey);
83 
84  pL1TriggerKey->add("L1MuDTExtLutRcd", "L1MuDTExtLut", lutKey);
85 
86  pL1TriggerKey->add("L1MuDTPhiLutRcd", "L1MuDTPhiLut", lutKey);
87 
88  pL1TriggerKey->add("L1MuDTPtaLutRcd", "L1MuDTPtaLut", lutKey);
89 
90  pL1TriggerKey->add("L1MuDTQualPatternLutRcd", "L1MuDTQualPatternLut", lutKey);
91 
92  pL1TriggerKey->add("L1MuDTTFParametersRcd", "L1MuDTTFParameters", dttfKey);
93  }
94 }
95 
96 //define this as a plug-in
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
std::unique_ptr< L1TriggerKey >::pointer FillType
DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet &)
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
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60