Public Types | |
typedef boost::shared_ptr < Alignments > | ReturnAli |
typedef boost::shared_ptr < AlignmentErrors > | ReturnAliErr |
typedef AlignTransform::Rotation | Rot |
typedef AlignTransform::Translation | Trl |
Public Member Functions | |
HcalAlignmentEP (const edm::ParameterSet &) | |
ReturnAli | produceHcalAli (const HcalAlignmentRcd &iRecord) |
~HcalAlignmentEP () |
Definition at line 30 of file HcalAlignmentEP.cc.
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.
HcalAlignmentEP::HcalAlignmentEP | ( | const edm::ParameterSet & | ) | [inline] |
Definition at line 40 of file HcalAlignmentEP.cc.
References produceHcalAli(), and edm::ESProducer::setWhatProduced().
{ setWhatProduced( this, &HcalAlignmentEP::produceHcalAli ) ; }
HcalAlignmentEP::~HcalAlignmentEP | ( | ) | [inline] |
Definition at line 45 of file HcalAlignmentEP.cc.
{}
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().
{ ReturnAli ali ( new Alignments ) ; std::vector<AlignTransform>& vtr ( ali->m_align ) ; const unsigned int nA ( HcalGeometry::numberOfAlignments() ) ; vtr.resize( nA ) ; edm::ESHandle<Alignments> hb ; edm::ESHandle<Alignments> he ; edm::ESHandle<Alignments> hf ; edm::ESHandle<Alignments> ho ; iRecord.getRecord<HBAlignmentRcd>().get( hb ) ; iRecord.getRecord<HEAlignmentRcd>().get( he ) ; iRecord.getRecord<HFAlignmentRcd>().get( hf ) ; iRecord.getRecord<HOAlignmentRcd>().get( ho ) ; assert( hb.isValid() && // require valid alignments and expected size ( hb->m_align.size() == HcalGeometry::numberOfBarrelAlignments() ) ) ; assert( he.isValid() && // require valid alignments and expected size ( he->m_align.size() == HcalGeometry::numberOfEndcapAlignments() ) ) ; assert( ho.isValid() && // require valid alignments and expected size ( ho->m_align.size() == HcalGeometry::numberOfForwardAlignments() ) ) ; assert( ho.isValid() && // require valid alignments and expected size ( ho->m_align.size() == HcalGeometry::numberOfOuterAlignments() ) ) ; const std::vector<AlignTransform>& hbt = hb->m_align ; const std::vector<AlignTransform>& het = he->m_align ; const std::vector<AlignTransform>& hft = hf->m_align ; const std::vector<AlignTransform>& hot = ho->m_align ; copy( hbt.begin(), hbt.end(), vtr.begin() ) ; copy( het.begin(), het.end(), vtr.begin()+hbt.size() ) ; copy( hft.begin(), hft.end(), vtr.begin()+hbt.size()+het.size() ) ; copy( hot.begin(), hot.end(), vtr.begin()+hbt.size()+het.size()+hft.size() ) ; return ali ; }