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 &)
 
virtual std::shared_ptr< L1CaloEtScalenewObject (const std::string &objectKey) override
 
 ~L1HtMissScaleOnlineProd ()
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::shared_ptr< L1CaloEtScaleproduce (const L1HtMissScaleRcd &iRecord)
 
 ~L1ConfigOnlineProdBase ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- 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 () noexcept(false)
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
bool getObjectKey (const L1HtMissScaleRcd &record, std::shared_ptr< L1CaloEtScale > 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::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_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< L1HtMissScaleRcd, L1CaloEtScale >
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 33 of file L1HtMissScaleOnlineProd.cc.

Constructor & Destructor Documentation

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

Definition at line 58 of file L1HtMissScaleOnlineProd.cc.

61 {
62  //the following line is needed to tell the framework what
63  // data is being produced
64 
65  //now do what ever other initialization is needed
66 }
L1HtMissScaleOnlineProd::~L1HtMissScaleOnlineProd ( )

Definition at line 69 of file L1HtMissScaleOnlineProd.cc.

70 {
71 
72  // do anything here that needs to be done at desctruction time
73  // (e.g. close files, deallocate resources etc.)
74 
75 }

Member Function Documentation

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

Implements L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >.

Definition at line 78 of file L1HtMissScaleOnlineProd.cc.

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

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