CMS 3D CMS Logo

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 &)
 
std::unique_ptr< L1CaloEtScalenewObject (const std::string &objectKey) override
 
 ~L1EmEtScaleOnlineProd () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1CaloEtScaleproduce (const L1EmEtScaleRcd &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< L1EmEtScaleRcd, L1CaloEtScale >
bool getObjectKey (const L1EmEtScaleRcd &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< L1EmEtScaleRcd, L1CaloEtScale >
std::optional< edm::ESConsumesCollectorT< L1EmEtScaleRcd > > 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 L1EmEtScaleOnlineProd.cc.

Constructor & Destructor Documentation

◆ L1EmEtScaleOnlineProd()

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

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

◆ ~L1EmEtScaleOnlineProd()

L1EmEtScaleOnlineProd::~L1EmEtScaleOnlineProd ( )
override

Definition at line 61 of file L1EmEtScaleOnlineProd.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 > L1EmEtScaleOnlineProd::newObject ( const std::string &  objectKey)
overridevirtual

Implements L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale >.

Definition at line 66 of file L1EmEtScaleOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale >::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), l1t::OMDSReader::singleAttribute(), and DMR_cfg::thresh.

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