CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1RPCConeDefinitionProducer Class Reference
Inheritance diagram for L1RPCConeDefinitionProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

using ReturnType = std::unique_ptr< L1RPCConeDefinition >
 

Public Member Functions

 L1RPCConeDefinitionProducer (const edm::ParameterSet &)
 
ReturnType produce (const L1RPCConeDefinitionRcd &)
 
 ~L1RPCConeDefinitionProducer () 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)
 

Private Attributes

int m_hwPlaneBeg
 
int m_hwPlaneEnd
 
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec
 
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
 
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
 
int m_rollBeg
 
int m_rollEnd
 
int m_towerBeg
 
int m_towerEnd
 

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

Detailed Description

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

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

Definition at line 35 of file L1RPCConeDefinitionProducer.cc.

Member Typedef Documentation

◆ ReturnType

Definition at line 40 of file L1RPCConeDefinitionProducer.cc.

Constructor & Destructor Documentation

◆ L1RPCConeDefinitionProducer()

L1RPCConeDefinitionProducer::L1RPCConeDefinitionProducer ( const edm::ParameterSet iConfig)

Definition at line 74 of file L1RPCConeDefinitionProducer.cc.

References edm::ParameterSet::getParameter(), mps_fire::i, L1RPCConeDefinition::TRingToLP::m_etaPart, L1RPCConeDefinition::TRingToLP::m_hwPlane, m_hwPlaneBeg, m_hwPlaneEnd, L1RPCConeDefinition::TRingToLP::m_index, L1RPCConeDefinition::TLPSize::m_LP, L1RPCConeDefinition::TRingToLP::m_LP, m_LPSizeVec, m_ringToLPVec, m_ringToTowerVec, m_rollBeg, m_rollEnd, L1RPCConeDefinition::TLPSize::m_size, L1RPCConeDefinition::TLPSize::m_tower, m_towerBeg, m_towerEnd, Skims_PA_cff::name, hcal_runs::rt, edm::ESProducer::setWhatProduced(), and submitPVValidationJobs::t.

75  : m_towerBeg(iConfig.getParameter<int>("towerBeg")),
76  m_towerEnd(iConfig.getParameter<int>("towerEnd")),
77  m_rollBeg(iConfig.getParameter<int>("rollBeg")),
78  m_rollEnd(iConfig.getParameter<int>("rollEnd")),
79  m_hwPlaneBeg(iConfig.getParameter<int>("hwPlaneBeg")),
80  m_hwPlaneEnd(iConfig.getParameter<int>("hwPlaneEnd")) {
81  //the following line is needed to tell the framework what
82  // data is being produced
83  setWhatProduced(this);
84 
85  for (int t = m_towerBeg; t <= m_towerEnd; ++t) {
86  std::stringstream name;
87  name << "lpSizeTower" << t;
88 
89  std::vector<int> newSizes = iConfig.getParameter<std::vector<int> >(name.str().c_str());
90 
91  for (unsigned int lp = 0; lp < newSizes.size(); ++lp) {
92  // L1RPCConeDefinition::TLPSize lps(t, lp, newSizes[lp]);
94  lps.m_tower = t;
95  lps.m_LP = lp;
96  lps.m_size = newSizes[lp];
97  m_LPSizeVec.push_back(lps);
98  }
99  }
100 
101  //now do what ever other initialization is needed
102 
103  // hw planes numbered from 0 to 5
104  // rolls from 0 to 17 (etaPartition)
105  //
106  // rollConnLP_[roll]_[hwPlane-1]
107  // rollConnLP_5_3 = cms.vint32(6, 0, 0),
108  // ----- roll 5, hwPlane 4 (3+1) is logplane 6 (OK)
109  //
110  // rollConnT_[roll]_[hwPlane-1]
111  // rollConnT_5_3 = cms.vint32(4, -1, -1),
112  // ----- roll 5, hwPlane 4 (3+1) contirubtes to tower 4 (OK)
113 
114  for (int roll = m_rollBeg; roll <= m_rollEnd; ++roll) {
115  //L1RPCConeDefinition::THWplaneToTower newHwPlToTower;
116  //L1RPCConeDefinition::THWplaneToLP newHWplaneToLP;
117  for (int hwpl = m_hwPlaneBeg; hwpl <= m_hwPlaneEnd; ++hwpl) {
118  std::stringstream name;
119  name << "rollConnLP_" << roll << "_" << hwpl;
120 
121  std::vector<int> hwPl2LPVec = iConfig.getParameter<std::vector<int> >(name.str().c_str());
122  //newHWplaneToLP.push_back(newListLP);
123  for (unsigned int i = 0; i < hwPl2LPVec.size(); ++i) {
124  if (hwPl2LPVec[i] >= 0) {
125  // L1RPCConeDefinition::TRingToLP lp(roll, hwpl, hwPl2LPVec[i],i);
127  lp.m_etaPart = roll;
128  lp.m_hwPlane = hwpl;
129  lp.m_LP = hwPl2LPVec[i];
130  lp.m_index = i;
131  m_ringToLPVec.push_back(lp);
132  }
133  }
134 
135  std::stringstream name1;
136  name1 << "rollConnT_" << roll << "_" << hwpl;
137 
138  /*L1RPCConeDefinition::TLPList newListT =
139  iConfig.getParameter<std::vector<int> >(name1.str().c_str());
140  newHwPlToTower.push_back(newListT);*/
141  std::vector<int> hwPl2TowerVec = iConfig.getParameter<std::vector<int> >(name1.str().c_str());
142 
143  for (unsigned int i = 0; i < hwPl2TowerVec.size(); ++i) {
144  if (hwPl2TowerVec[i] >= 0) {
145  // L1RPCConeDefinition::TRingToTower rt(roll, hwpl, hwPl2TowerVec[i],i);
147  rt.m_etaPart = roll;
148  rt.m_hwPlane = hwpl;
149  rt.m_tower = hwPl2TowerVec[i];
150  rt.m_index = i;
151  m_ringToTowerVec.push_back(rt);
152  }
153  }
154  }
155  //m_RingsToTowers.push_back(newHwPlToTower);
156 
157  //m_RingsToLP.push_back(newHWplaneToLP);
158  }
159 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec

◆ ~L1RPCConeDefinitionProducer()

L1RPCConeDefinitionProducer::~L1RPCConeDefinitionProducer ( )
override

Definition at line 161 of file L1RPCConeDefinitionProducer.cc.

161 {}

Member Function Documentation

◆ produce()

L1RPCConeDefinitionProducer::ReturnType L1RPCConeDefinitionProducer::produce ( const L1RPCConeDefinitionRcd iRecord)

Definition at line 168 of file L1RPCConeDefinitionProducer.cc.

References m_LPSizeVec, m_ringToLPVec, m_ringToTowerVec, m_towerBeg, and m_towerEnd.

168  {
169  auto pL1RPCConeDefinition = std::make_unique<L1RPCConeDefinition>();
170 
171  pL1RPCConeDefinition->setFirstTower(m_towerBeg);
172  pL1RPCConeDefinition->setLastTower(m_towerEnd);
173 
174  pL1RPCConeDefinition->setLPSizeVec(m_LPSizeVec);
175  pL1RPCConeDefinition->setRingToLPVec(m_ringToLPVec);
176  pL1RPCConeDefinition->setRingToTowerVec(m_ringToTowerVec);
177 
178  return pL1RPCConeDefinition;
179 }
L1RPCConeDefinition::TRingToLPVec m_ringToLPVec
L1RPCConeDefinition::TRingToTowerVec m_ringToTowerVec
L1RPCConeDefinition::TLPSizeVec m_LPSizeVec

Member Data Documentation

◆ m_hwPlaneBeg

int L1RPCConeDefinitionProducer::m_hwPlaneBeg
private

Definition at line 50 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

◆ m_hwPlaneEnd

int L1RPCConeDefinitionProducer::m_hwPlaneEnd
private

Definition at line 51 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

◆ m_LPSizeVec

L1RPCConeDefinition::TLPSizeVec L1RPCConeDefinitionProducer::m_LPSizeVec
private

Definition at line 54 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

◆ m_ringToLPVec

L1RPCConeDefinition::TRingToLPVec L1RPCConeDefinitionProducer::m_ringToLPVec
private

Definition at line 60 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

◆ m_ringToTowerVec

L1RPCConeDefinition::TRingToTowerVec L1RPCConeDefinitionProducer::m_ringToTowerVec
private

Definition at line 57 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

◆ m_rollBeg

int L1RPCConeDefinitionProducer::m_rollBeg
private

Definition at line 48 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

◆ m_rollEnd

int L1RPCConeDefinitionProducer::m_rollEnd
private

Definition at line 49 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer().

◆ m_towerBeg

int L1RPCConeDefinitionProducer::m_towerBeg
private

Definition at line 46 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().

◆ m_towerEnd

int L1RPCConeDefinitionProducer::m_towerEnd
private

Definition at line 47 of file L1RPCConeDefinitionProducer.cc.

Referenced by L1RPCConeDefinitionProducer(), and produce().