CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloGeometryEP< T > Class Template Reference

#include <CaloGeometryEP.h>

Inheritance diagram for CaloGeometryEP< T >:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef CaloGeometryLoader< TLoaderType
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

Detailed Description

template<class T>
class CaloGeometryEP< T >

Definition at line 29 of file CaloGeometryEP.h.


Member Typedef Documentation

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

Definition at line 33 of file CaloGeometryEP.h.

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

Definition at line 34 of file CaloGeometryEP.h.


Constructor & Destructor Documentation

template<class T >
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() ) ) ;
      }
template<class T >
virtual CaloGeometryEP< T >::~CaloGeometryEP ( ) [inline, virtual]

Definition at line 45 of file CaloGeometryEP.h.

{}

Member Function Documentation

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

Member Data Documentation

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

Definition at line 77 of file CaloGeometryEP.h.

Referenced by CaloGeometryEP< T >::produceAligned().