CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalAlignmentEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalAlignmentEP
4 // Class: HcalAlignmentEP
5 //
6 //
7 // Original Author: Brian Heltsley
8 //
9 //
10 
12 
15 }
16 
18 
20 
22  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
23  const unsigned int nA ( HcalGeometry::numberOfAlignments() ) ;
24  vtr.resize( nA ) ;
25 
30  iRecord.getRecord<HBAlignmentRcd>().get( hb ) ;
31  iRecord.getRecord<HEAlignmentRcd>().get( he ) ;
32  iRecord.getRecord<HFAlignmentRcd>().get( hf ) ;
33  iRecord.getRecord<HOAlignmentRcd>().get( ho ) ;
34 
35  assert( hb.isValid() && // require valid alignments and expected size
36  ( hb->m_align.size() == HcalGeometry::numberOfBarrelAlignments() ) ) ;
37  assert( he.isValid() && // require valid alignments and expected size
38  ( he->m_align.size() == HcalGeometry::numberOfEndcapAlignments() ) ) ;
39  assert( hf.isValid() && // require valid alignments and expected size
40  ( hf->m_align.size() == HcalGeometry::numberOfForwardAlignments() ) ) ;
41  assert( ho.isValid() && // require valid alignments and expected size
42  ( ho->m_align.size() == HcalGeometry::numberOfOuterAlignments() ) ) ;
43  const std::vector<AlignTransform>& hbt = hb->m_align ;
44  const std::vector<AlignTransform>& het = he->m_align ;
45  const std::vector<AlignTransform>& hft = hf->m_align ;
46  const std::vector<AlignTransform>& hot = ho->m_align ;
47 
48  copy( hbt.begin(), hbt.end(), vtr.begin() ) ;
49  copy( het.begin(), het.end(), vtr.begin()+hbt.size() ) ;
50  copy( hft.begin(), hft.end(), vtr.begin()+hbt.size()+het.size() ) ;
51  copy( hot.begin(), hot.end(), vtr.begin()+hbt.size()+het.size()+hft.size() ) ;
52 
53  return ali ;
54 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
#define hbt
Definition: AMPTWrapper.h:50
boost::shared_ptr< Alignments > ReturnAli
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
HcalAlignmentEP(const edm::ParameterSet &)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
bool isValid() const
Definition: ESHandle.h:37
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:66