CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
L1EmEtScaleOnlineProd Class Reference
Inheritance diagram for L1EmEtScaleOnlineProd:
L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1EmEtScaleOnlineProd (const edm::ParameterSet &)
 
virtual boost::shared_ptr
< L1CaloEtScale
newObject (const std::string &objectKey) override
 
 ~L1EmEtScaleOnlineProd ()
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
boost::shared_ptr< L1CaloEtScaleproduce (const L1EmEtScaleRcd &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< L1EmEtScaleRcd, L1CaloEtScale >
bool getObjectKey (const L1EmEtScaleRcd &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< L1EmEtScaleRcd, 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 33 of file L1EmEtScaleOnlineProd.cc.

Constructor & Destructor Documentation

L1EmEtScaleOnlineProd::L1EmEtScaleOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 58 of file L1EmEtScaleOnlineProd.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 }
L1EmEtScaleOnlineProd::~L1EmEtScaleOnlineProd ( )

Definition at line 69 of file L1EmEtScaleOnlineProd.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

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

Implements L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale >.

Definition at line 78 of file L1EmEtScaleOnlineProd.cc.

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

79 {
80  using namespace edm::es;
81 
82  // ~~~~~~~~~ Cut values ~~~~~~~~~
83 
84 
85  std::vector< std::string > queryStrings ;
86  queryStrings.push_back( "ET_GEV_BIN_LOW_0");
87  queryStrings.push_back( "ET_GEV_BIN_LOW_1");
88  queryStrings.push_back( "ET_GEV_BIN_LOW_2");
89  queryStrings.push_back( "ET_GEV_BIN_LOW_3");
90  queryStrings.push_back( "ET_GEV_BIN_LOW_4");
91  queryStrings.push_back( "ET_GEV_BIN_LOW_5");
92  queryStrings.push_back( "ET_GEV_BIN_LOW_6");
93  queryStrings.push_back( "ET_GEV_BIN_LOW_7");
94  queryStrings.push_back( "ET_GEV_BIN_LOW_8");
95  queryStrings.push_back( "ET_GEV_BIN_LOW_9");
96  queryStrings.push_back( "ET_GEV_BIN_LOW_10");
97  queryStrings.push_back( "ET_GEV_BIN_LOW_11");
98  queryStrings.push_back( "ET_GEV_BIN_LOW_12");
99  queryStrings.push_back( "ET_GEV_BIN_LOW_13");
100  queryStrings.push_back( "ET_GEV_BIN_LOW_14");
101  queryStrings.push_back( "ET_GEV_BIN_LOW_15");
102  queryStrings.push_back( "ET_GEV_BIN_LOW_16");
103  queryStrings.push_back( "ET_GEV_BIN_LOW_17");
104  queryStrings.push_back( "ET_GEV_BIN_LOW_18");
105  queryStrings.push_back( "ET_GEV_BIN_LOW_19");
106  queryStrings.push_back( "ET_GEV_BIN_LOW_20");
107  queryStrings.push_back( "ET_GEV_BIN_LOW_21");
108  queryStrings.push_back( "ET_GEV_BIN_LOW_22");
109  queryStrings.push_back( "ET_GEV_BIN_LOW_23");
110  queryStrings.push_back( "ET_GEV_BIN_LOW_24");
111  queryStrings.push_back( "ET_GEV_BIN_LOW_25");
112  queryStrings.push_back( "ET_GEV_BIN_LOW_26");
113  queryStrings.push_back( "ET_GEV_BIN_LOW_27");
114  queryStrings.push_back( "ET_GEV_BIN_LOW_28");
115  queryStrings.push_back( "ET_GEV_BIN_LOW_29");
116  queryStrings.push_back( "ET_GEV_BIN_LOW_30");
117  queryStrings.push_back( "ET_GEV_BIN_LOW_31");
118  queryStrings.push_back( "ET_GEV_BIN_LOW_32");
119  queryStrings.push_back( "ET_GEV_BIN_LOW_33");
120  queryStrings.push_back( "ET_GEV_BIN_LOW_34");
121  queryStrings.push_back( "ET_GEV_BIN_LOW_35");
122  queryStrings.push_back( "ET_GEV_BIN_LOW_36");
123  queryStrings.push_back( "ET_GEV_BIN_LOW_37");
124  queryStrings.push_back( "ET_GEV_BIN_LOW_38");
125  queryStrings.push_back( "ET_GEV_BIN_LOW_39");
126  queryStrings.push_back( "ET_GEV_BIN_LOW_40");
127  queryStrings.push_back( "ET_GEV_BIN_LOW_41");
128  queryStrings.push_back( "ET_GEV_BIN_LOW_42");
129  queryStrings.push_back( "ET_GEV_BIN_LOW_43");
130  queryStrings.push_back( "ET_GEV_BIN_LOW_44");
131  queryStrings.push_back( "ET_GEV_BIN_LOW_45");
132  queryStrings.push_back( "ET_GEV_BIN_LOW_46");
133  queryStrings.push_back( "ET_GEV_BIN_LOW_47");
134  queryStrings.push_back( "ET_GEV_BIN_LOW_48");
135  queryStrings.push_back( "ET_GEV_BIN_LOW_49");
136  queryStrings.push_back( "ET_GEV_BIN_LOW_50");
137  queryStrings.push_back( "ET_GEV_BIN_LOW_51");
138  queryStrings.push_back( "ET_GEV_BIN_LOW_52");
139  queryStrings.push_back( "ET_GEV_BIN_LOW_53");
140  queryStrings.push_back( "ET_GEV_BIN_LOW_54");
141  queryStrings.push_back( "ET_GEV_BIN_LOW_55");
142  queryStrings.push_back( "ET_GEV_BIN_LOW_56");
143  queryStrings.push_back( "ET_GEV_BIN_LOW_57");
144  queryStrings.push_back( "ET_GEV_BIN_LOW_58");
145  queryStrings.push_back( "ET_GEV_BIN_LOW_59");
146  queryStrings.push_back( "ET_GEV_BIN_LOW_60");
147  queryStrings.push_back( "ET_GEV_BIN_LOW_61");
148  queryStrings.push_back( "ET_GEV_BIN_LOW_62");
149  queryStrings.push_back( "ET_GEV_BIN_LOW_63");
150 
151  const l1t::OMDSReader::QueryResults scaleKeyResults =
152  m_omdsReader.singleAttribute( objectKey ) ;
153 
154 
155  l1t::OMDSReader::QueryResults scaleResults =
156  m_omdsReader.basicQuery( queryStrings,
157  "CMS_GT",
158  "L1T_SCALE_CALO_ET_THRESHOLD",
159  "L1T_SCALE_CALO_ET_THRESHOLD.ID",
160  m_omdsReader.basicQuery( "L1T_SCALE_CALO_ET_THRESHOLD_ID",
161  "CMS_RCT",
162  "L1CALOEMETTHRESH",
163  "L1CALOEMETTHRESH.NAME",
164  scaleKeyResults
165  ));
166 
167 
168 
169  if( scaleResults.queryFailed() ||
170  scaleResults.numberRows() != 1 ) // check query successful
171  {
172  edm::LogError( "L1-O2O" ) << "Problem with L1EmEtScale key." ;
173  return boost::shared_ptr< L1CaloEtScale >() ;
174  }
175  std::vector<double> m_thresholds;
176 
177  for( std::vector< std::string >::iterator thresh = queryStrings.begin();
178  thresh != queryStrings.end(); ++thresh) {
179  float tempScale = 0.0;
180  scaleResults.fillVariable(*thresh,tempScale);
181  m_thresholds.push_back(tempScale);
182  }
183 
184  l1t::OMDSReader::QueryResults lsbResults =
185  m_omdsReader.basicQuery("INPUTLSB",
186  "CMS_RCT",
187  "L1CALOEMETTHRESH",
188  "L1CALOEMETTHRESH.NAME",
189  scaleKeyResults
190  );
191  if( lsbResults.queryFailed() ||
192  lsbResults.numberRows() != 1 ) // check query successful
193  {
194  edm::LogError( "L1-O2O" ) << "Problem with L1EmEtScale key." ;
195  return boost::shared_ptr< L1CaloEtScale >() ;
196  }
197 
198  double m_lsb = 0.;
199  lsbResults.fillVariable(m_lsb);
200 
201  // std::cout << " input lsb " << m_lsb <<std::endl;
202 
203  //~~~~~~~~~ Instantiate new L1EmEtScale object. ~~~~~~~~~
204 
205  // Default objects for Lindsey
206 
207  return boost::shared_ptr< L1CaloEtScale >( new L1CaloEtScale( m_lsb,m_thresholds ) );
208 }
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