#include <Geometry/CaloEventSetup/interface/CaloGeometryEP.h>
Public Types | |
typedef CaloGeometryLoader< T > | LoaderType |
typedef LoaderType::PtrType | PtrType |
Public Member Functions | |
CaloGeometryEP (const edm::ParameterSet &ps) | |
void | idealRecordCallBack (const typename T::IdealRecord &iRecord) |
PtrType | produceAligned (const typename T::AlignedRecord &iRecord) |
PtrType | produceIdeal (const typename T::IdealRecord &iRecord) |
virtual | ~CaloGeometryEP () |
Private Attributes | |
bool | m_applyAlignment |
const DDCompactView * | m_cpv |
Definition at line 27 of file CaloGeometryEP.h.
typedef CaloGeometryLoader<T> CaloGeometryEP< T >::LoaderType |
Definition at line 31 of file CaloGeometryEP.h.
typedef LoaderType::PtrType CaloGeometryEP< T >::PtrType |
Definition at line 32 of file CaloGeometryEP.h.
CaloGeometryEP< T >::CaloGeometryEP | ( | const edm::ParameterSet & | ps | ) | [inline] |
virtual CaloGeometryEP< T >::~CaloGeometryEP | ( | ) | [inline, virtual] |
void CaloGeometryEP< T >::idealRecordCallBack | ( | const typename T::IdealRecord & | iRecord | ) | [inline] |
Definition at line 79 of file CaloGeometryEP.h.
References CaloGeometryEP< T >::m_cpv.
Referenced by CaloGeometryEP< T >::produceIdeal().
00080 { 00081 edm::ESHandle< DDCompactView > cpv ; 00082 iRecord.get( cpv ) ; 00083 00084 m_cpv = &( *cpv ) ; 00085 }
PtrType CaloGeometryEP< T >::produceAligned | ( | const typename T::AlignedRecord & | iRecord | ) | [inline] |
Definition at line 50 of file CaloGeometryEP.h.
References edm::ESHandle< T >::isValid(), CaloGeometryLoader< T >::load(), CaloGeometryEP< T >::m_applyAlignment, CaloGeometryEP< T >::m_cpv, edm::ESHandle< T >::product(), and ptr.
00051 { 00052 assert( 0 != m_cpv ) ; // should have been filled by call to callback method below 00053 00054 const Alignments* alignPtr ( 0 ) ; 00055 if( m_applyAlignment ) // get ptr if necessary 00056 { 00057 edm::ESHandle< Alignments > alignments ; 00058 iRecord.template getRecord< typename T::AlignmentRecord >().get( alignments ) ; 00059 00060 assert( alignments.isValid() && // require valid alignments and expected size 00061 ( alignments->m_align.size() == T::numberOfAlignments() ) ) ; 00062 alignPtr = alignments.product() ; 00063 } 00064 LoaderType loader ; 00065 PtrType ptr ( loader.load( m_cpv, alignPtr ) ) ; // no temporaries for shared+ptr!! 00066 return ptr ; 00067 }
PtrType CaloGeometryEP< T >::produceIdeal | ( | const typename T::IdealRecord & | iRecord | ) | [inline] |
Definition at line 69 of file CaloGeometryEP.h.
References CaloGeometryEP< T >::idealRecordCallBack(), CaloGeometryLoader< T >::load(), CaloGeometryEP< T >::m_applyAlignment, CaloGeometryEP< T >::m_cpv, and ptr.
00070 { 00071 assert( !m_applyAlignment ) ; 00072 idealRecordCallBack( iRecord ) ; // must call manually because is same record 00073 assert( 0 != m_cpv ) ; 00074 LoaderType loader ; 00075 PtrType ptr ( loader.load( m_cpv ) ) ; // no temporaries for shared+ptr!! 00076 return ptr ; 00077 }
bool CaloGeometryEP< T >::m_applyAlignment [private] |
Definition at line 91 of file CaloGeometryEP.h.
Referenced by CaloGeometryEP< T >::produceAligned(), and CaloGeometryEP< T >::produceIdeal().
const DDCompactView* CaloGeometryEP< T >::m_cpv [private] |
Definition at line 89 of file CaloGeometryEP.h.
Referenced by CaloGeometryEP< T >::idealRecordCallBack(), CaloGeometryEP< T >::produceAligned(), and CaloGeometryEP< T >::produceIdeal().