CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 boost::shared_ptr
< L1CaloEtScale
newObject (const std::string &objectKey)
 
 ~L1HtMissScaleOnlineProd ()
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
boost::shared_ptr< L1CaloEtScaleproduce (const L1HtMissScaleRcd &iRecord)
 
 ~L1ConfigOnlineProdBase ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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, boost::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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_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::DbConnection m_dbConnection
 
cond::DbSession m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

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

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

Definition at line 34 of file L1HtMissScaleOnlineProd.cc.

Constructor & Destructor Documentation

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

Definition at line 59 of file L1HtMissScaleOnlineProd.cc.

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

Definition at line 70 of file L1HtMissScaleOnlineProd.cc.

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

Member Function Documentation

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

Implements L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >.

Definition at line 79 of file L1HtMissScaleOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale >::m_omdsReader, l1t::OMDSReader::singleAttribute(), and GOODCOLL_filter_cfg::thresh.

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