CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
boost::shared_ptr
< L1CaloEcalScale
produceEcalScale (const L1CaloEcalScaleRcd &)
 
boost::shared_ptr
< L1CaloHcalScale
produceHcalScale (const L1CaloHcalScaleRcd &)
 
 ~L1CaloInputScalesProducer ()
 
- 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 ()
 

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, 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 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 &)
 

Detailed Description

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

Usage: <usage>

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

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

Definition at line 38 of file L1CaloInputScalesProducer.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file L1CaloInputScalesProducer.cc.

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

42 {
43  //the following line is needed to tell the framework what
44  // data is being produced
47 
48  //now do what ever other initialization is needed
49 
50  // { Et for each rank, eta bin 0 }, { Et for each rank, eta bin 1 }, ...
52  iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsPositiveEta");
54  iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsNegativeEta");
56  iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsPositiveEta");
58  iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsNegativeEta");
59 }
T getParameter(std::string const &) const
std::vector< double > m_ecalEtThresholdsPosEta
std::vector< double > m_hcalEtThresholdsNegEta
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< double > m_hcalEtThresholdsPosEta
std::vector< double > m_ecalEtThresholdsNegEta
boost::shared_ptr< L1CaloEcalScale > produceEcalScale(const L1CaloEcalScaleRcd &)
boost::shared_ptr< L1CaloHcalScale > produceHcalScale(const L1CaloHcalScaleRcd &)
L1CaloInputScalesProducer::~L1CaloInputScalesProducer ( )

Definition at line 62 of file L1CaloInputScalesProducer.cc.

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

Member Function Documentation

boost::shared_ptr< L1CaloEcalScale > L1CaloInputScalesProducer::produceEcalScale ( const L1CaloEcalScaleRcd iRecord)

Definition at line 77 of file L1CaloInputScalesProducer.cc.

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

Referenced by L1CaloInputScalesProducer().

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

Definition at line 109 of file L1CaloInputScalesProducer.cc.

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

Referenced by L1CaloInputScalesProducer().

110 {
111  using namespace edm::es;
112  boost::shared_ptr<L1CaloHcalScale> pL1CaloHcalScale =
113  boost::shared_ptr<L1CaloHcalScale>( new L1CaloHcalScale ) ;
114 
115  std::vector< double >::const_iterator posItr =
116  m_hcalEtThresholdsPosEta.begin() ;
117 
118  std::vector< double >::const_iterator negItr =
119  m_hcalEtThresholdsNegEta.begin() ;
120 
121 
122  for( unsigned short ieta = 1 ;
123  ieta <= L1CaloHcalScale::nBinEta ;
124  ++ieta )
125  {
126  for( unsigned short irank = 0 ;
128  ++irank )
129  {
130  pL1CaloHcalScale->setBin( irank, ieta, 1, *posItr ) ;
131  pL1CaloHcalScale->setBin( irank, ieta, -1, *negItr ) ;
132 
133  ++posItr ;
134  ++negItr ;
135  }
136  }
137 
138  return pL1CaloHcalScale ;
139 }
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 52 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

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

Definition at line 51 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

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

Definition at line 54 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().

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

Definition at line 53 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().