CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions
HcalAlignmentEP Class Reference
Inheritance diagram for HcalAlignmentEP:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef boost::shared_ptr
< Alignments
ReturnAli
 
typedef boost::shared_ptr
< AlignmentErrors
ReturnAliErr
 
typedef AlignTransform::Rotation Rot
 
typedef AlignTransform::Translation Trl
 
- 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
 

Public Member Functions

 HcalAlignmentEP (const edm::ParameterSet &)
 
ReturnAli produceHcalAli (const HcalAlignmentRcd &iRecord)
 
 ~HcalAlignmentEP ()
 
- 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 ()
 

Additional Inherited Members

- 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

Definition at line 30 of file HcalAlignmentEP.cc.

Member Typedef Documentation

typedef boost::shared_ptr<Alignments> HcalAlignmentEP::ReturnAli

Definition at line 34 of file HcalAlignmentEP.cc.

typedef boost::shared_ptr<AlignmentErrors> HcalAlignmentEP::ReturnAliErr

Definition at line 35 of file HcalAlignmentEP.cc.

Definition at line 38 of file HcalAlignmentEP.cc.

Definition at line 37 of file HcalAlignmentEP.cc.

Constructor & Destructor Documentation

HcalAlignmentEP::HcalAlignmentEP ( const edm::ParameterSet )
inline

Definition at line 40 of file HcalAlignmentEP.cc.

References produceHcalAli(), and edm::ESProducer::setWhatProduced().

41  {
43  }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
HcalAlignmentEP::~HcalAlignmentEP ( )
inline

Definition at line 45 of file HcalAlignmentEP.cc.

45 {}

Member Function Documentation

ReturnAli HcalAlignmentEP::produceHcalAli ( const HcalAlignmentRcd iRecord)
inline

Definition at line 49 of file HcalAlignmentEP.cc.

References filterCSVwithJSON::copy, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hbt, edm::ESHandleBase::isValid(), HcalGeometry::numberOfAlignments(), HcalGeometry::numberOfBarrelAlignments(), HcalGeometry::numberOfEndcapAlignments(), HcalGeometry::numberOfForwardAlignments(), and HcalGeometry::numberOfOuterAlignments().

Referenced by HcalAlignmentEP().

50  {
51  ReturnAli ali ( new Alignments ) ;
52  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
53  const unsigned int nA ( HcalGeometry::numberOfAlignments() ) ;
54  vtr.resize( nA ) ;
55 
60  iRecord.getRecord<HBAlignmentRcd>().get( hb ) ;
61  iRecord.getRecord<HEAlignmentRcd>().get( he ) ;
62  iRecord.getRecord<HFAlignmentRcd>().get( hf ) ;
63  iRecord.getRecord<HOAlignmentRcd>().get( ho ) ;
64 
65  assert( hb.isValid() && // require valid alignments and expected size
66  ( hb->m_align.size() == HcalGeometry::numberOfBarrelAlignments() ) ) ;
67  assert( he.isValid() && // require valid alignments and expected size
68  ( he->m_align.size() == HcalGeometry::numberOfEndcapAlignments() ) ) ;
69  assert( ho.isValid() && // require valid alignments and expected size
70  ( ho->m_align.size() == HcalGeometry::numberOfForwardAlignments() ) ) ;
71  assert( ho.isValid() && // require valid alignments and expected size
72  ( ho->m_align.size() == HcalGeometry::numberOfOuterAlignments() ) ) ;
73  const std::vector<AlignTransform>& hbt = hb->m_align ;
74  const std::vector<AlignTransform>& het = he->m_align ;
75  const std::vector<AlignTransform>& hft = hf->m_align ;
76  const std::vector<AlignTransform>& hot = ho->m_align ;
77 
78  copy( hbt.begin(), hbt.end(), vtr.begin() ) ;
79  copy( het.begin(), het.end(), vtr.begin()+hbt.size() ) ;
80  copy( hft.begin(), hft.end(), vtr.begin()+hbt.size()+het.size() ) ;
81  copy( hot.begin(), hot.end(), vtr.begin()+hbt.size()+het.size()+hft.size() ) ;
82 
83  return ali ;
84  }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:50
#define hbt
Definition: AMPTWrapper.h:50
boost::shared_ptr< Alignments > ReturnAli
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:54
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:52
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:56
bool isValid() const
Definition: ESHandle.h:37
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:58