CMS 3D CMS Logo

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, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Public Member Functions

 CaloGeometryEP (const edm::ParameterSet &ps)
 
PtrType produceAligned (const typename T::AlignedRecord &iRecord)
 
 ~CaloGeometryEP () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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 () noexcept(false)
 

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::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 28 of file CaloGeometryEP.h.

Member Typedef Documentation

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

Definition at line 32 of file CaloGeometryEP.h.

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

Definition at line 33 of file CaloGeometryEP.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file CaloGeometryEP.h.

References edm::ESProducer::setWhatProduced().

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

Definition at line 44 of file CaloGeometryEP.h.

44 {}

Member Function Documentation

template<class T >
PtrType CaloGeometryEP< T >::produceAligned ( const typename T::AlignedRecord &  iRecord)
inline

Definition at line 45 of file CaloGeometryEP.h.

References edm::ESHandleBase::isValid(), web.browse_db::loader, Alignments::m_align, CaloGeometryEP< T >::m_applyAlignment, and edm::ESHandle< T >::product().

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

Member Data Documentation

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

Definition at line 76 of file CaloGeometryEP.h.

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