CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

Public Types

typedef CaloGeometryLoader< TLoaderType
 
typedef LoaderType::PtrType PtrType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 CaloGeometryEP (const edm::ParameterSet &ps)
 
PtrType produceAligned (const typename T::AlignedRecord &iRecord)
 
virtual ~CaloGeometryEP ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

bool m_applyAlignment
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

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().

36  :
37  m_applyAlignment ( ps.getParameter<bool>("applyAlignment") )
38  {
39  setWhatProduced( this,
41 // dependsOn( &CaloGeometryEP<T>::idealRecordCallBack ),
42  edm::es::Label( T::producerTag() ) ) ;
43  }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
template<class T >
virtual CaloGeometryEP< T >::~CaloGeometryEP ( )
inlinevirtual

Definition at line 45 of file CaloGeometryEP.h.

45 {}

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(), CaloGeometryEP< T >::m_applyAlignment, and edm::ESHandle< class >::product().

47  {
48  const Alignments* alignPtr ( 0 ) ;
49  const Alignments* globalPtr ( 0 ) ;
50  if( m_applyAlignment ) // get ptr if necessary
51  {
52  edm::ESHandle< Alignments > alignments ;
53  iRecord.template getRecord< typename T::AlignmentRecord >().get( alignments ) ;
54 
55  assert( alignments.isValid() && // require valid alignments and expected size
56  ( alignments->m_align.size() == T::numberOfAlignments() ) ) ;
57  alignPtr = alignments.product() ;
58 
60  iRecord.template getRecord<GlobalPositionRcd>().get( globals ) ;
61 
62  assert( globals.isValid() ) ;
63  globalPtr = globals.product() ;
64  }
66  iRecord.template getRecord<IdealGeometryRecord>().get( cpv ) ;
67 
68  LoaderType loader ;
69  PtrType ptr ( loader.load( &(*cpv), alignPtr, globalPtr ) ) ; // no temporaries for shared+ptr!!
70 
71  return ptr ;
72  }
T const * product() const
Definition: ESHandle.h:86
CaloGeometryLoader< T > LoaderType
bool isValid() const
Definition: ESHandle.h:47
LoaderType::PtrType PtrType

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().