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

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

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 )

Definition at line 13 of file HcalAlignmentEP.cc.

References gpuPixelDoublets::cc, hbToken_, heToken_, hfToken_, hoToken_, produceHcalAli(), and edm::ESProducer::setWhatProduced().

13  {
19 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
edm::ESGetToken< Alignments, HEAlignmentRcd > heToken_
edm::ESGetToken< Alignments, HFAlignmentRcd > hfToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< Alignments, HOAlignmentRcd > hoToken_
edm::ESGetToken< Alignments, HBAlignmentRcd > hbToken_

◆ ~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.

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

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 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:67
edm::ESGetToken< Alignments, HEAlignmentRcd > heToken_
edm::ESGetToken< Alignments, HFAlignmentRcd > hfToken_
assert(be >=bs)
#define hbt
Definition: AMPTWrapper.h:60
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:73
edm::ESGetToken< Alignments, HOAlignmentRcd > hoToken_
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:69
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:71
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:77
edm::ESGetToken< Alignments, HBAlignmentRcd > hbToken_

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