#include <CaloGeometryEP.h>
Public Types | |
typedef CaloGeometryLoader< T > | LoaderType |
typedef LoaderType::PtrType | PtrType |
Public Member Functions | |
CaloGeometryEP (const edm::ParameterSet &ps) | |
PtrType | produceAligned (const typename T::AlignedRecord &iRecord) |
virtual | ~CaloGeometryEP () |
Private Attributes | |
bool | m_applyAlignment |
Definition at line 29 of file CaloGeometryEP.h.
typedef CaloGeometryLoader<T> CaloGeometryEP< T >::LoaderType |
Definition at line 33 of file CaloGeometryEP.h.
typedef LoaderType::PtrType CaloGeometryEP< T >::PtrType |
Definition at line 34 of file CaloGeometryEP.h.
CaloGeometryEP< T >::CaloGeometryEP | ( | const edm::ParameterSet & | ps | ) | [inline] |
Definition at line 36 of file CaloGeometryEP.h.
References edm::ESProducer::setWhatProduced().
: m_applyAlignment ( ps.getParameter<bool>("applyAlignment") ) { setWhatProduced( this, &CaloGeometryEP<T>::produceAligned, // dependsOn( &CaloGeometryEP<T>::idealRecordCallBack ), edm::es::Label( T::producerTag() ) ) ; }
virtual CaloGeometryEP< T >::~CaloGeometryEP | ( | ) | [inline, virtual] |
Definition at line 45 of file CaloGeometryEP.h.
{}
PtrType CaloGeometryEP< T >::produceAligned | ( | const typename T::AlignedRecord & | iRecord | ) | [inline] |
Definition at line 46 of file CaloGeometryEP.h.
References edm::ESHandleBase::isValid(), CaloGeometryLoader< T >::load(), CaloGeometryEP< T >::m_applyAlignment, and edm::ESHandle< T >::product().
{ const Alignments* alignPtr ( 0 ) ; const Alignments* globalPtr ( 0 ) ; if( m_applyAlignment ) // get ptr if necessary { edm::ESHandle< Alignments > alignments ; iRecord.template getRecord< typename T::AlignmentRecord >().get( alignments ) ; assert( alignments.isValid() && // require valid alignments and expected size ( alignments->m_align.size() == T::numberOfAlignments() ) ) ; alignPtr = alignments.product() ; edm::ESHandle< Alignments > globals ; iRecord.template getRecord<GlobalPositionRcd>().get( globals ) ; assert( globals.isValid() ) ; globalPtr = globals.product() ; } edm::ESTransientHandle<DDCompactView> cpv ; iRecord.template getRecord<IdealGeometryRecord>().get( cpv ) ; LoaderType loader ; PtrType ptr ( loader.load( &(*cpv), alignPtr, globalPtr ) ) ; // no temporaries for shared+ptr!! return ptr ; }
bool CaloGeometryEP< T >::m_applyAlignment [private] |
Definition at line 77 of file CaloGeometryEP.h.
Referenced by CaloGeometryEP< T >::produceAligned().