CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1CaloInputScalesProducer Class Reference

#include <L1TriggerConfig/RCTConfigProducers/src/L1CaloInputScalesProducer.cc>

Inheritance diagram for L1CaloInputScalesProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1CaloInputScalesProducer (const edm::ParameterSet &)
 
std::unique_ptr< L1CaloEcalScaleproduceEcalScale (const L1CaloEcalScaleRcd &)
 
std::unique_ptr< L1CaloHcalScaleproduceHcalScale (const L1CaloHcalScaleRcd &)
 
 ~L1CaloInputScalesProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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)
 

Private Attributes

std::vector< double > m_ecalEtThresholdsNegEta
 
std::vector< double > m_ecalEtThresholdsPosEta
 
std::vector< double > m_hcalEtThresholdsNegEta
 
std::vector< double > m_hcalEtThresholdsPosEta
 

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 edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
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 >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 &)
 

Detailed Description

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

Usage: <usage>

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

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

Definition at line 36 of file L1CaloInputScalesProducer.h.

Constructor & Destructor Documentation

L1CaloInputScalesProducer::L1CaloInputScalesProducer ( const edm::ParameterSet iConfig)

Definition at line 40 of file L1CaloInputScalesProducer.cc.

References edm::ParameterSet::getParameter(), m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, m_hcalEtThresholdsNegEta, m_hcalEtThresholdsPosEta, produceEcalScale(), produceHcalScale(), and edm::ESProducer::setWhatProduced().

41 {
42  //the following line is needed to tell the framework what
43  // data is being produced
46 
47  //now do what ever other initialization is needed
48 
49  // { Et for each rank, eta bin 0 }, { Et for each rank, eta bin 1 }, ...
51  iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsPositiveEta");
53  iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsNegativeEta");
55  iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsPositiveEta");
57  iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsNegativeEta");
58 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< L1CaloEcalScale > produceEcalScale(const L1CaloEcalScaleRcd &)
std::vector< double > m_ecalEtThresholdsPosEta
std::vector< double > m_hcalEtThresholdsNegEta
std::unique_ptr< L1CaloHcalScale > produceHcalScale(const L1CaloHcalScaleRcd &)
std::vector< double > m_hcalEtThresholdsPosEta
std::vector< double > m_ecalEtThresholdsNegEta
L1CaloInputScalesProducer::~L1CaloInputScalesProducer ( )
override

Definition at line 61 of file L1CaloInputScalesProducer.cc.

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

Member Function Documentation

std::unique_ptr< L1CaloEcalScale > L1CaloInputScalesProducer::produceEcalScale ( const L1CaloEcalScaleRcd iRecord)

Definition at line 76 of file L1CaloInputScalesProducer.cc.

References m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, L1CaloEcalScale::nBinEta, and L1CaloEcalScale::nBinRank.

Referenced by L1CaloInputScalesProducer().

77 {
78  auto pL1CaloEcalScale = std::make_unique<L1CaloEcalScale>() ;
79 
80  std::vector< double >::const_iterator posItr =
81  m_ecalEtThresholdsPosEta.begin() ;
82  std::vector< double >::const_iterator negItr =
83  m_ecalEtThresholdsNegEta.begin() ;
84 
85  for( unsigned short ieta = 1 ;
86  ieta <= L1CaloEcalScale::nBinEta ;
87  ++ieta )
88  {
89  for( unsigned short irank = 0 ;
91  ++irank )
92  {
93  pL1CaloEcalScale->setBin( irank, ieta, 1, *posItr ) ;
94  pL1CaloEcalScale->setBin( irank, ieta, -1, *negItr ) ;
95 
96  ++posItr ;
97  ++negItr ;
98  }
99  }
100 
101  return pL1CaloEcalScale ;
102 }
std::vector< double > m_ecalEtThresholdsPosEta
std::vector< double > m_ecalEtThresholdsNegEta
static const unsigned short nBinRank
static const unsigned short nBinEta
std::unique_ptr< L1CaloHcalScale > L1CaloInputScalesProducer::produceHcalScale ( const L1CaloHcalScaleRcd iRecord)

Definition at line 106 of file L1CaloInputScalesProducer.cc.

References m_hcalEtThresholdsNegEta, m_hcalEtThresholdsPosEta, L1CaloHcalScale::nBinEta, and L1CaloHcalScale::nBinRank.

Referenced by L1CaloInputScalesProducer().

107 {
108  auto pL1CaloHcalScale = std::make_unique<L1CaloHcalScale>() ;
109 
110  std::vector< double >::const_iterator posItr =
111  m_hcalEtThresholdsPosEta.begin() ;
112 
113  std::vector< double >::const_iterator negItr =
114  m_hcalEtThresholdsNegEta.begin() ;
115 
116 
117  for( unsigned short ieta = 1 ;
118  ieta <= L1CaloHcalScale::nBinEta ;
119  ++ieta )
120  {
121  for( unsigned short irank = 0 ;
123  ++irank )
124  {
125  pL1CaloHcalScale->setBin( irank, ieta, 1, *posItr ) ;
126  pL1CaloHcalScale->setBin( irank, ieta, -1, *negItr ) ;
127 
128  ++posItr ;
129  ++negItr ;
130  }
131  }
132 
133  return pL1CaloHcalScale ;
134 }
std::vector< double > m_hcalEtThresholdsNegEta
std::vector< double > m_hcalEtThresholdsPosEta
static const unsigned short nBinRank
static const unsigned short nBinEta

Member Data Documentation

std::vector<double> L1CaloInputScalesProducer::m_ecalEtThresholdsNegEta
private

Definition at line 50 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

std::vector<double> L1CaloInputScalesProducer::m_ecalEtThresholdsPosEta
private

Definition at line 49 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

std::vector<double> L1CaloInputScalesProducer::m_hcalEtThresholdsNegEta
private

Definition at line 52 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().

std::vector<double> L1CaloInputScalesProducer::m_hcalEtThresholdsPosEta
private

Definition at line 51 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().