CMS 3D CMS Logo

CaloGeometryEP< T > Class Template Reference

#include <Geometry/CaloEventSetup/interface/CaloGeometryEP.h>

Inheritance diagram for CaloGeometryEP< T >:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

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 DDCompactViewm_cpv


Detailed Description

template<class T>
class CaloGeometryEP< T >

Definition at line 27 of file CaloGeometryEP.h.


Member Typedef Documentation

template<class T>
typedef CaloGeometryLoader<T> CaloGeometryEP< T >::LoaderType

Definition at line 31 of file CaloGeometryEP.h.

template<class T>
typedef LoaderType::PtrType CaloGeometryEP< T >::PtrType

Definition at line 32 of file CaloGeometryEP.h.


Constructor & Destructor Documentation

template<class T>
CaloGeometryEP< T >::CaloGeometryEP ( const edm::ParameterSet ps  )  [inline]

template<class T>
virtual CaloGeometryEP< T >::~CaloGeometryEP (  )  [inline, virtual]


Member Function Documentation

template<class T>
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       }

template<class T>
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       }

template<class T>
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       }


Member Data Documentation

template<class T>
bool CaloGeometryEP< T >::m_applyAlignment [private]

Definition at line 91 of file CaloGeometryEP.h.

Referenced by CaloGeometryEP< T >::produceAligned(), and CaloGeometryEP< T >::produceIdeal().

template<class T>
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().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:15:44 2009 for CMSSW by  doxygen 1.5.4