CMS 3D CMS Logo

List of all members | Public Member Functions
L1HtMissScaleOnlineProd Class Reference
Inheritance diagram for L1HtMissScaleOnlineProd:
L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1HtMissScaleOnlineProd (const edm::ParameterSet &)
 
std::unique_ptr< L1CaloEtScalenewObject (const std::string &objectKey) override
 
 ~L1HtMissScaleOnlineProd () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1CaloEtScaleproduce (const L1HtMissScaleRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
bool getObjectKey (const L1HtMissScaleRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- 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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Attributes inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
std::optional< edm::ESConsumesCollectorT< L1HtMissScaleRcd > > m_consumesCollector
 
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 31 of file L1HtMissScaleOnlineProd.cc.

Constructor & Destructor Documentation

◆ L1HtMissScaleOnlineProd()

L1HtMissScaleOnlineProd::L1HtMissScaleOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 53 of file L1HtMissScaleOnlineProd.cc.

55  //the following line is needed to tell the framework what
56  // data is being produced
57 
58  //now do what ever other initialization is needed
59 }

◆ ~L1HtMissScaleOnlineProd()

L1HtMissScaleOnlineProd::~L1HtMissScaleOnlineProd ( )
override

Definition at line 61 of file L1HtMissScaleOnlineProd.cc.

61  {
62  // do anything here that needs to be done at desctruction time
63  // (e.g. close files, deallocate resources etc.)
64 }

Member Function Documentation

◆ newObject()

std::unique_ptr< L1CaloEtScale > L1HtMissScaleOnlineProd::newObject ( const std::string &  objectKey)
overridevirtual

Implements L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >.

Definition at line 66 of file L1HtMissScaleOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), l1t::OMDSReader::singleAttribute(), AlCaHLTBitMon_QueryRunRegistry::string, DMR_cfg::thresh, and particleFlowZeroSuppressionECAL_cff::thresholds.

66  {
67  // get scales keys
68  l1t::OMDSReader::QueryResults scalesKeyResults = m_omdsReader.basicQuery("GCT_SCALES_KEY",
69  "CMS_GCT",
70  "GCT_PHYS_PARAMS",
71  "GCT_PHYS_PARAMS.CONFIG_KEY",
72  m_omdsReader.singleAttribute(objectKey));
73 
74  std::string scalesKey;
75 
76  if (scalesKeyResults.queryFailed()) {
77  edm::LogError("L1-O2O") << "Problem with key for L1HtMissScaleRcd : GCT scales key query failed ";
78  } else if (scalesKeyResults.numberRows() != 1) {
79  edm::LogError("L1-O2O") << "Problem with key for L1HtMissScaleRcd : " << (scalesKeyResults.numberRows())
80  << " rows were returned when getting GCT scales key";
81  } else {
82  scalesKeyResults.fillVariable(scalesKey);
83  }
84 
85  edm::LogInfo("L1-O2O") << "L1 scales key : " << scalesKey << std::endl;
86 
87  // get jet scale key
88  l1t::OMDSReader::QueryResults htmScaleKeyResults =
89  m_omdsReader.basicQuery("SC_HTM_FK", "CMS_GT", "L1T_SCALES", "L1T_SCALES.ID", scalesKeyResults);
90 
91  std::string htmScaleKey;
92 
93  if (htmScaleKeyResults.queryFailed()) {
94  edm::LogError("L1-O2O") << "Problem with key for L1HtMissEtScaleRcd : HtMiss scale key query failed ";
95  } else if (htmScaleKeyResults.numberRows() != 1) {
96  edm::LogError("L1-O2O") << "Problem with key for L1HtMissScaleRcd : " << (htmScaleKeyResults.numberRows())
97  << " rows were returned when getting HtMiss scale key";
98  } else {
99  htmScaleKeyResults.fillVariable(htmScaleKey);
100  }
101 
102  edm::LogInfo("L1-O2O") << "L1HtMiss scale key : " << htmScaleKey << std::endl;
103 
104  // get thresholds
105  std::vector<std::string> queryStrings;
106  queryStrings.push_back("E_GEV_BIN_LOW_0");
107  queryStrings.push_back("E_GEV_BIN_LOW_1");
108  queryStrings.push_back("E_GEV_BIN_LOW_2");
109  queryStrings.push_back("E_GEV_BIN_LOW_3");
110  queryStrings.push_back("E_GEV_BIN_LOW_4");
111  queryStrings.push_back("E_GEV_BIN_LOW_5");
112  queryStrings.push_back("E_GEV_BIN_LOW_6");
113  queryStrings.push_back("E_GEV_BIN_LOW_7");
114  queryStrings.push_back("E_GEV_BIN_LOW_8");
115  queryStrings.push_back("E_GEV_BIN_LOW_9");
116  queryStrings.push_back("E_GEV_BIN_LOW_10");
117  queryStrings.push_back("E_GEV_BIN_LOW_11");
118  queryStrings.push_back("E_GEV_BIN_LOW_12");
119  queryStrings.push_back("E_GEV_BIN_LOW_13");
120  queryStrings.push_back("E_GEV_BIN_LOW_14");
121  queryStrings.push_back("E_GEV_BIN_LOW_15");
122  queryStrings.push_back("E_GEV_BIN_LOW_16");
123  queryStrings.push_back("E_GEV_BIN_LOW_17");
124  queryStrings.push_back("E_GEV_BIN_LOW_18");
125  queryStrings.push_back("E_GEV_BIN_LOW_19");
126  queryStrings.push_back("E_GEV_BIN_LOW_20");
127  queryStrings.push_back("E_GEV_BIN_LOW_21");
128  queryStrings.push_back("E_GEV_BIN_LOW_22");
129  queryStrings.push_back("E_GEV_BIN_LOW_23");
130  queryStrings.push_back("E_GEV_BIN_LOW_24");
131  queryStrings.push_back("E_GEV_BIN_LOW_25");
132  queryStrings.push_back("E_GEV_BIN_LOW_26");
133  queryStrings.push_back("E_GEV_BIN_LOW_27");
134  queryStrings.push_back("E_GEV_BIN_LOW_28");
135  queryStrings.push_back("E_GEV_BIN_LOW_29");
136  queryStrings.push_back("E_GEV_BIN_LOW_30");
137  queryStrings.push_back("E_GEV_BIN_LOW_31");
138  queryStrings.push_back("E_GEV_BIN_LOW_32");
139  queryStrings.push_back("E_GEV_BIN_LOW_33");
140  queryStrings.push_back("E_GEV_BIN_LOW_34");
141  queryStrings.push_back("E_GEV_BIN_LOW_35");
142  queryStrings.push_back("E_GEV_BIN_LOW_36");
143  queryStrings.push_back("E_GEV_BIN_LOW_37");
144  queryStrings.push_back("E_GEV_BIN_LOW_38");
145  queryStrings.push_back("E_GEV_BIN_LOW_39");
146  queryStrings.push_back("E_GEV_BIN_LOW_40");
147  queryStrings.push_back("E_GEV_BIN_LOW_41");
148  queryStrings.push_back("E_GEV_BIN_LOW_42");
149  queryStrings.push_back("E_GEV_BIN_LOW_43");
150  queryStrings.push_back("E_GEV_BIN_LOW_44");
151  queryStrings.push_back("E_GEV_BIN_LOW_45");
152  queryStrings.push_back("E_GEV_BIN_LOW_46");
153  queryStrings.push_back("E_GEV_BIN_LOW_47");
154  queryStrings.push_back("E_GEV_BIN_LOW_48");
155  queryStrings.push_back("E_GEV_BIN_LOW_49");
156  queryStrings.push_back("E_GEV_BIN_LOW_50");
157  queryStrings.push_back("E_GEV_BIN_LOW_51");
158  queryStrings.push_back("E_GEV_BIN_LOW_52");
159  queryStrings.push_back("E_GEV_BIN_LOW_53");
160  queryStrings.push_back("E_GEV_BIN_LOW_54");
161  queryStrings.push_back("E_GEV_BIN_LOW_55");
162  queryStrings.push_back("E_GEV_BIN_LOW_56");
163  queryStrings.push_back("E_GEV_BIN_LOW_57");
164  queryStrings.push_back("E_GEV_BIN_LOW_58");
165  queryStrings.push_back("E_GEV_BIN_LOW_59");
166  queryStrings.push_back("E_GEV_BIN_LOW_60");
167  queryStrings.push_back("E_GEV_BIN_LOW_61");
168  queryStrings.push_back("E_GEV_BIN_LOW_62");
169  queryStrings.push_back("E_GEV_BIN_LOW_63");
170  queryStrings.push_back("E_GEV_BIN_LOW_64");
171  queryStrings.push_back("E_GEV_BIN_LOW_65");
172  queryStrings.push_back("E_GEV_BIN_LOW_66");
173  queryStrings.push_back("E_GEV_BIN_LOW_67");
174  queryStrings.push_back("E_GEV_BIN_LOW_68");
175  queryStrings.push_back("E_GEV_BIN_LOW_69");
176  queryStrings.push_back("E_GEV_BIN_LOW_70");
177  queryStrings.push_back("E_GEV_BIN_LOW_71");
178  queryStrings.push_back("E_GEV_BIN_LOW_72");
179  queryStrings.push_back("E_GEV_BIN_LOW_73");
180  queryStrings.push_back("E_GEV_BIN_LOW_74");
181  queryStrings.push_back("E_GEV_BIN_LOW_75");
182  queryStrings.push_back("E_GEV_BIN_LOW_76");
183  queryStrings.push_back("E_GEV_BIN_LOW_77");
184  queryStrings.push_back("E_GEV_BIN_LOW_78");
185  queryStrings.push_back("E_GEV_BIN_LOW_79");
186  queryStrings.push_back("E_GEV_BIN_LOW_80");
187  queryStrings.push_back("E_GEV_BIN_LOW_81");
188  queryStrings.push_back("E_GEV_BIN_LOW_82");
189  queryStrings.push_back("E_GEV_BIN_LOW_83");
190  queryStrings.push_back("E_GEV_BIN_LOW_84");
191  queryStrings.push_back("E_GEV_BIN_LOW_85");
192  queryStrings.push_back("E_GEV_BIN_LOW_86");
193  queryStrings.push_back("E_GEV_BIN_LOW_87");
194  queryStrings.push_back("E_GEV_BIN_LOW_88");
195  queryStrings.push_back("E_GEV_BIN_LOW_89");
196  queryStrings.push_back("E_GEV_BIN_LOW_90");
197  queryStrings.push_back("E_GEV_BIN_LOW_91");
198  queryStrings.push_back("E_GEV_BIN_LOW_92");
199  queryStrings.push_back("E_GEV_BIN_LOW_93");
200  queryStrings.push_back("E_GEV_BIN_LOW_94");
201  queryStrings.push_back("E_GEV_BIN_LOW_95");
202  queryStrings.push_back("E_GEV_BIN_LOW_96");
203  queryStrings.push_back("E_GEV_BIN_LOW_97");
204  queryStrings.push_back("E_GEV_BIN_LOW_98");
205  queryStrings.push_back("E_GEV_BIN_LOW_99");
206  queryStrings.push_back("E_GEV_BIN_LOW_100");
207  queryStrings.push_back("E_GEV_BIN_LOW_101");
208  queryStrings.push_back("E_GEV_BIN_LOW_102");
209  queryStrings.push_back("E_GEV_BIN_LOW_103");
210  queryStrings.push_back("E_GEV_BIN_LOW_104");
211  queryStrings.push_back("E_GEV_BIN_LOW_105");
212  queryStrings.push_back("E_GEV_BIN_LOW_106");
213  queryStrings.push_back("E_GEV_BIN_LOW_107");
214  queryStrings.push_back("E_GEV_BIN_LOW_108");
215  queryStrings.push_back("E_GEV_BIN_LOW_109");
216  queryStrings.push_back("E_GEV_BIN_LOW_110");
217  queryStrings.push_back("E_GEV_BIN_LOW_111");
218  queryStrings.push_back("E_GEV_BIN_LOW_112");
219  queryStrings.push_back("E_GEV_BIN_LOW_113");
220  queryStrings.push_back("E_GEV_BIN_LOW_114");
221  queryStrings.push_back("E_GEV_BIN_LOW_115");
222  queryStrings.push_back("E_GEV_BIN_LOW_116");
223  queryStrings.push_back("E_GEV_BIN_LOW_117");
224  queryStrings.push_back("E_GEV_BIN_LOW_118");
225  queryStrings.push_back("E_GEV_BIN_LOW_119");
226  queryStrings.push_back("E_GEV_BIN_LOW_120");
227  queryStrings.push_back("E_GEV_BIN_LOW_121");
228  queryStrings.push_back("E_GEV_BIN_LOW_122");
229  queryStrings.push_back("E_GEV_BIN_LOW_123");
230  queryStrings.push_back("E_GEV_BIN_LOW_124");
231  queryStrings.push_back("E_GEV_BIN_LOW_125");
232  queryStrings.push_back("E_GEV_BIN_LOW_126");
233  queryStrings.push_back("E_GEV_BIN_LOW_127");
234 
236  queryStrings, "CMS_GT", "L1T_SCALE_HTM_ENERGY", "L1T_SCALE_HTM_ENERGY.ID", htmScaleKeyResults);
237 
238  // L1T_SCALE_HTM_ENERGY
239 
240  std::vector<double> thresholds;
241 
242  if (scaleResults.queryFailed() || scaleResults.numberRows() != 1) // check query successful
243  {
244  edm::LogError("L1-O2O") << "Problem with L1HtMissScale key : when reading scale.";
245  } else {
246  for (std::vector<std::string>::iterator thresh = queryStrings.begin(); thresh != queryStrings.end(); ++thresh) {
247  float tempScale = 0.;
248  scaleResults.fillVariable(*thresh, tempScale);
249  thresholds.push_back(tempScale);
250  }
251  }
252 
253  // get region LSB
254  double rgnEtLsb = 0.;
255 
256  l1t::OMDSReader::QueryResults lsbResults = m_omdsReader.basicQuery("GCT_RGN_ET_LSB",
257  "CMS_GCT",
258  "GCT_PHYS_PARAMS",
259  "GCT_PHYS_PARAMS.CONFIG_KEY",
260  m_omdsReader.singleAttribute(objectKey));
261 
262  if (lsbResults.queryFailed()) {
263  edm::LogError("L1-O2O") << "Problem with L1HtMissScale key.";
264  } else {
265  lsbResults.fillVariable("GCT_RGN_ET_LSB", rgnEtLsb);
266  }
267 
268  // return object
269  return std::make_unique<L1CaloEtScale>(0, 0x7f, rgnEtLsb, thresholds);
270 }
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
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
Log< level::Info, false > LogInfo