CMS 3D CMS Logo

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

#include <HcalAlignmentEP.h>

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

Public Types

using ReturnAli = std::unique_ptr< Alignments >
 
typedef AlignTransform::Rotation Rot
 
typedef AlignTransform::Translation Trl
 

Public Member Functions

 HcalAlignmentEP (const edm::ParameterSet &)
 
ReturnAli produceHcalAli (const HcalAlignmentRcd &iRecord)
 
 ~HcalAlignmentEP () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
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

edm::ESGetToken< Alignments, HBAlignmentRcdhbToken_
 
edm::ESGetToken< Alignments, HEAlignmentRcdheToken_
 
edm::ESGetToken< Alignments, HFAlignmentRcdhfToken_
 
edm::ESGetToken< Alignments, HOAlignmentRcdhoToken_
 

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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 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

Definition at line 19 of file HcalAlignmentEP.h.

Member Typedef Documentation

◆ ReturnAli

using HcalAlignmentEP::ReturnAli = std::unique_ptr<Alignments>

Definition at line 21 of file HcalAlignmentEP.h.

◆ Rot

Definition at line 24 of file HcalAlignmentEP.h.

◆ Trl

Definition at line 23 of file HcalAlignmentEP.h.

Constructor & Destructor Documentation

◆ HcalAlignmentEP()

HcalAlignmentEP::HcalAlignmentEP ( const edm::ParameterSet )

◆ ~HcalAlignmentEP()

HcalAlignmentEP::~HcalAlignmentEP ( )
override

Definition at line 21 of file HcalAlignmentEP.cc.

21 {}

Member Function Documentation

◆ produceHcalAli()

HcalAlignmentEP::ReturnAli HcalAlignmentEP::produceHcalAli ( const HcalAlignmentRcd iRecord)

Definition at line 23 of file HcalAlignmentEP.cc.

23  {
24  auto ali = std::make_unique<Alignments>();
25 
26  std::vector<AlignTransform>& vtr(ali->m_align);
27  const unsigned int nA(HcalGeometry::numberOfAlignments());
28  vtr.resize(nA);
29 
30  const auto& hb = iRecord.get(hbToken_);
31  const auto& he = iRecord.get(heToken_);
32  const auto& hf = iRecord.get(hfToken_);
33  const auto& ho = iRecord.get(hoToken_);
34 
35  // require valid alignments and expected size
39  assert(ho.m_align.size() == HcalGeometry::numberOfOuterAlignments());
40  const std::vector<AlignTransform>& hbt = hb.m_align;
41  const std::vector<AlignTransform>& het = he.m_align;
42  const std::vector<AlignTransform>& hft = hf.m_align;
43  const std::vector<AlignTransform>& hot = ho.m_align;
44 
45  copy(hbt.begin(), hbt.end(), vtr.begin());
46  copy(het.begin(), het.end(), vtr.begin() + hbt.size());
47  copy(hft.begin(), hft.end(), vtr.begin() + hbt.size() + het.size());
48  copy(hot.begin(), hot.end(), vtr.begin() + hbt.size() + het.size() + hft.size());
49 
50  return ali;
51 }

References cms::cuda::assert(), filterCSVwithJSON::copy, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), hcalSimParameters_cfi::hb, hbt, hbToken_, hcalSimParameters_cfi::he, heToken_, photonIsolationHIProducer_cfi::hf, hfToken_, photonIsolationHIProducer_cfi::ho, hoToken_, HcalGeometry::numberOfAlignments(), HcalGeometry::numberOfBarrelAlignments(), HcalGeometry::numberOfEndcapAlignments(), HcalGeometry::numberOfForwardAlignments(), and HcalGeometry::numberOfOuterAlignments().

Referenced by HcalAlignmentEP().

Member Data Documentation

◆ hbToken_

edm::ESGetToken<Alignments, HBAlignmentRcd> HcalAlignmentEP::hbToken_
private

Definition at line 34 of file HcalAlignmentEP.h.

Referenced by HcalAlignmentEP(), and produceHcalAli().

◆ heToken_

edm::ESGetToken<Alignments, HEAlignmentRcd> HcalAlignmentEP::heToken_
private

Definition at line 35 of file HcalAlignmentEP.h.

Referenced by HcalAlignmentEP(), and produceHcalAli().

◆ hfToken_

edm::ESGetToken<Alignments, HFAlignmentRcd> HcalAlignmentEP::hfToken_
private

Definition at line 36 of file HcalAlignmentEP.h.

Referenced by HcalAlignmentEP(), and produceHcalAli().

◆ hoToken_

edm::ESGetToken<Alignments, HOAlignmentRcd> HcalAlignmentEP::hoToken_
private

Definition at line 37 of file HcalAlignmentEP.h.

Referenced by HcalAlignmentEP(), and produceHcalAli().

HEAlignmentRcd
Definition: HEAlignmentRcd.h:6
edm::ESInputTag
Definition: ESInputTag.h:87
HcalGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:75
HcalAlignmentEP::heToken_
edm::ESGetToken< Alignments, HEAlignmentRcd > heToken_
Definition: HcalAlignmentEP.h:35
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
cms::cuda::assert
assert(be >=bs)
HcalGeometry::numberOfBarrelAlignments
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:65
HcalGeometry::numberOfOuterAlignments
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:71
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
HOAlignmentRcd
Definition: HOAlignmentRcd.h:6
HcalAlignmentEP::produceHcalAli
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
Definition: HcalAlignmentEP.cc:23
HcalAlignmentEP::hfToken_
edm::ESGetToken< Alignments, HFAlignmentRcd > hfToken_
Definition: HcalAlignmentEP.h:36
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
HBAlignmentRcd
Definition: HBAlignmentRcd.h:6
HcalGeometry::numberOfForwardAlignments
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:69
cc
hcalSimParameters_cfi.hb
hb
Definition: hcalSimParameters_cfi.py:57
hbt
#define hbt
Definition: AMPTWrapper.h:60
hcalSimParameters_cfi.he
he
Definition: hcalSimParameters_cfi.py:75
HFAlignmentRcd
Definition: HFAlignmentRcd.h:6
HcalGeometry::numberOfEndcapAlignments
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:67
HcalAlignmentEP::hoToken_
edm::ESGetToken< Alignments, HOAlignmentRcd > hoToken_
Definition: HcalAlignmentEP.h:37
HcalAlignmentEP::hbToken_
edm::ESGetToken< Alignments, HBAlignmentRcd > hbToken_
Definition: HcalAlignmentEP.h:34
Alignments
Definition: Alignments.h:10